X-Git-Url: https://git.cweiske.de/anoweco.git/blobdiff_plain/1dd6167d9893d05d0d968f0aac90e71cb3a16003..c394828fb0aea51bcdfad1fd30432ef3adddcde4:/www/www-header.php diff --git a/www/www-header.php b/www/www-header.php index dbca097..37dd4b1 100644 --- a/www/www-header.php +++ b/www/www-header.php @@ -4,8 +4,8 @@ require_once __DIR__ . '/../src/anoweco/autoload.php'; header("Access-Control-Allow-Origin: *"); -$loader = new \Twig_Loader_Filesystem(__DIR__ . '/../data/templates/'); -$twig = new \Twig_Environment( +$loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/../data/templates/'); +$twig = new \Twig\Environment( $loader, array( //'cache' => '/path/to/compilation_cache', @@ -65,7 +65,7 @@ function error($description, $status = 'HTTP/1.0 400 Bad Request') function render($tplname, $vars = array(), $return = false) { - $template = $GLOBALS['twig']->loadTemplate($tplname . '.htm'); + $template = $GLOBALS['twig']->load($tplname . '.htm'); if ($return) { return $template->render($vars); @@ -73,4 +73,4 @@ function render($tplname, $vars = array(), $return = false) echo $template->render($vars); } } -?> \ No newline at end of file +?>