use last changes form Dotclear 2.28

This commit is contained in:
Jean-Christian Denis 2023-11-04 11:42:31 +01:00
parent 8cc697c7da
commit b7414f1ff7
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -61,12 +61,11 @@ class UrlHandler extends Url
} }
# Set default-templates path for disclaimer files # Set default-templates path for disclaimer files
$tplset = App::themes()->moduleInfo(App::blog()->settings()->get('system')->get('theme'), 'tplset'); $tplset = App::themes()->getDefine(App::blog()->settings()->get('system')->get('theme'))->get('tplset');
if (!empty($tplset) && is_dir(My::path() . '/default-templates/' . $tplset)) { if (empty($tplset) || !is_dir(implode(DIRECTORY_SEPARATOR, [My::path(), 'default-templates', $tplset]))) {
App::frontend()->template()->setPath(App::frontend()->template()->getPath(), My::path() . '/default-templates/' . $tplset); $tplset = App::config()->defaultTplset();
} else {
App::frontend()->template()->setPath(App::frontend()->template()->getPath(), My::path() . '/default-templates/' . App::config()->defaultTplset());
} }
App::frontend()->template()->appendPath(implode(DIRECTORY_SEPARATOR, [My::path(), 'default-templates', $tplset]));
# New URL handler # New URL handler
$urlHandler = new HelperHandler(); $urlHandler = new HelperHandler();