aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-01-03 11:42:21 +0100
committerArthurHoaro <arthur@hoa.ro>2017-01-05 16:16:23 +0100
commita0df06517bada0f811b464017ce385290e02c2bf (patch)
tree6bc3e99a9e9b93eb3e0f531f67a607dec748f407 /index.php
parentadc4aee80f7cd3242f65f0b316af2b560a64712c (diff)
downloadShaarli-a0df06517bada0f811b464017ce385290e02c2bf.tar.gz
Shaarli-a0df06517bada0f811b464017ce385290e02c2bf.tar.zst
Shaarli-a0df06517bada0f811b464017ce385290e02c2bf.zip
Minor improvements regarding #705 (coding style, unit tests, etc.)
Diffstat (limited to 'index.php')
-rw-r--r--index.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/index.php b/index.php
index 62d719e1..14754269 100644
--- a/index.php
+++ b/index.php
@@ -79,6 +79,7 @@ require_once 'application/Utils.php';
79require_once 'application/PluginManager.php'; 79require_once 'application/PluginManager.php';
80require_once 'application/Router.php'; 80require_once 'application/Router.php';
81require_once 'application/Updater.php'; 81require_once 'application/Updater.php';
82use \Shaarli\ThemeUtils;
82 83
83// Ensure the PHP version is supported 84// Ensure the PHP version is supported
84try { 85try {
@@ -122,7 +123,6 @@ if (isset($_COOKIE['shaarli']) && !is_session_id_valid($_COOKIE['shaarli'])) {
122$conf = new ConfigManager(); 123$conf = new ConfigManager();
123$conf->setEmpty('general.timezone', date_default_timezone_get()); 124$conf->setEmpty('general.timezone', date_default_timezone_get());
124$conf->setEmpty('general.title', 'Shared links on '. escape(index_url($_SERVER))); 125$conf->setEmpty('general.title', 'Shared links on '. escape(index_url($_SERVER)));
125$conf->setEmpty('resource.theme', 'default');
126RainTPL::$tpl_dir = $conf->get('resource.raintpl_tpl').'/'.$conf->get('resource.theme').'/'; // template directory 126RainTPL::$tpl_dir = $conf->get('resource.raintpl_tpl').'/'.$conf->get('resource.theme').'/'; // template directory
127RainTPL::$cache_dir = $conf->get('resource.raintpl_tmp'); // cache directory 127RainTPL::$cache_dir = $conf->get('resource.raintpl_tmp'); // cache directory
128 128
@@ -1155,7 +1155,7 @@ function renderPage($conf, $pluginManager, $LINKSDB)
1155 { 1155 {
1156 $PAGE->assign('title', $conf->get('general.title')); 1156 $PAGE->assign('title', $conf->get('general.title'));
1157 $PAGE->assign('theme', $conf->get('resource.theme')); 1157 $PAGE->assign('theme', $conf->get('resource.theme'));
1158 $PAGE->assign('theme_available', getAllTheme($conf->get('resource.raintpl_tpl'))); 1158 $PAGE->assign('theme_available', ThemeUtils::getThemes($conf->get('resource.raintpl_tpl')));
1159 $PAGE->assign('redirector', $conf->get('redirector.url')); 1159 $PAGE->assign('redirector', $conf->get('redirector.url'));
1160 list($timezone_form, $timezone_js) = generateTimeZoneForm($conf->get('general.timezone')); 1160 list($timezone_form, $timezone_js) = generateTimeZoneForm($conf->get('general.timezone'));
1161 $PAGE->assign('timezone_form', $timezone_form); 1161 $PAGE->assign('timezone_form', $timezone_form);