mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-04-17 21:38:10 -04:00
Use the traditional "template" config key, update unit-tests
This commit is contained in:
@@ -46,7 +46,7 @@ class Configuration
|
||||
'syntaxhighlightingtheme' => '',
|
||||
'sizelimit' => 10485760,
|
||||
'templateselection' => false,
|
||||
'templatedefault' => '',
|
||||
'template' => 'bootstrap',
|
||||
'info' => 'More information on the <a href=\'https://privatebin.info/\'>project page</a>.',
|
||||
'notice' => '',
|
||||
'languageselection' => false,
|
||||
@@ -79,13 +79,13 @@ class Configuration
|
||||
'markdown' => 'Markdown',
|
||||
),
|
||||
'available_templates' => array(
|
||||
'bootstrap5',
|
||||
'bootstrap',
|
||||
'bootstrap-page',
|
||||
'bootstrap-dark',
|
||||
'bootstrap-dark-page',
|
||||
'bootstrap-compact',
|
||||
'bootstrap-compact-page',
|
||||
'bootstrap5',
|
||||
'page',
|
||||
),
|
||||
'traffic' => array(
|
||||
|
||||
@@ -213,9 +213,10 @@ class Controller
|
||||
$this->_conf = new Configuration;
|
||||
|
||||
$templates = $this->_conf->getSection('available_templates');
|
||||
$template = $this->_conf->getKey('templatedefault');
|
||||
$template = $this->_conf->getKey('template');
|
||||
TemplateSwitcher::setAvailableTemplates($templates);
|
||||
TemplateSwitcher::setTemplateFallback($template);
|
||||
|
||||
// force default template, if template selection is disabled and a default is set
|
||||
if (!$this->_conf->getKey('templateselection') && !empty($template)) {
|
||||
$_COOKIE['template'] = $template;
|
||||
|
||||
@@ -26,7 +26,7 @@ class TemplateSwitcher {
|
||||
* @static
|
||||
* @var string
|
||||
*/
|
||||
protected static $_templateFallback = "bootstrap";
|
||||
protected static $_templateFallback;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user