From b7414f1ff7faf93563d184203e59910f2fe64948 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 4 Nov 2023 11:42:31 +0100 Subject: [PATCH] use last changes form Dotclear 2.28 --- src/UrlHandler.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/UrlHandler.php b/src/UrlHandler.php index dba0cca..7bf3d6c 100644 --- a/src/UrlHandler.php +++ b/src/UrlHandler.php @@ -61,12 +61,11 @@ class UrlHandler extends Url } # Set default-templates path for disclaimer files - $tplset = App::themes()->moduleInfo(App::blog()->settings()->get('system')->get('theme'), 'tplset'); - if (!empty($tplset) && is_dir(My::path() . '/default-templates/' . $tplset)) { - App::frontend()->template()->setPath(App::frontend()->template()->getPath(), My::path() . '/default-templates/' . $tplset); - } else { - App::frontend()->template()->setPath(App::frontend()->template()->getPath(), My::path() . '/default-templates/' . App::config()->defaultTplset()); + $tplset = App::themes()->getDefine(App::blog()->settings()->get('system')->get('theme'))->get('tplset'); + if (empty($tplset) || !is_dir(implode(DIRECTORY_SEPARATOR, [My::path(), 'default-templates', $tplset]))) { + $tplset = App::config()->defaultTplset(); } + App::frontend()->template()->appendPath(implode(DIRECTORY_SEPARATOR, [My::path(), 'default-templates', $tplset])); # New URL handler $urlHandler = new HelperHandler();