Fix precompile_smarty3.php

The Smarty class is in the Smarty namespace, and should not be loaded
manually, but through composer. This is taken care of by requiring
`boot.php`. Also make the script slightly more robust as to where it is
invoked from.
This commit is contained in:
Harald Eilertsen
2025-09-09 15:02:37 +02:00
parent 3a102d9dc3
commit 50f439ae8e

View File

@@ -4,12 +4,11 @@
* @package util
*/
require_once('boot.php');
require_once('vendor/smarty/smarty/libs/Smarty.class.php');
require_once dirname(__DIR__) . '/boot.php';
$folders = array_merge(array('view/tpl/'), glob('view/theme/*/tpl/*', GLOB_ONLYDIR));
$s = new Smarty();
$s = new \Smarty\Smarty();
$s->setTemplateDir($folders);