Skip to content

Commit

Permalink
Fixed issue #09609: Template with dash (-) in the name cannot be used…
Browse files Browse the repository at this point in the history
… as default site template

Dev: use same filter than Survey->tplfilter
Dev: todo : review filtering in 2.06
  • Loading branch information
Shnoulle committed Apr 21, 2015
1 parent fe12c14 commit 35d2803
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion application/controllers/admin/globalsettings.php
Expand Up @@ -158,7 +158,12 @@ private function _saveSettings()
setGlobalSetting('defaulttemplateeditormode', sanitize_paranoid_string($_POST['defaulttemplateeditormode']));
if (!Yii::app()->getConfig('demoMode'))
{
setGlobalSetting('defaulttemplate', sanitize_paranoid_string($_POST['defaulttemplate']));
$sTemplate=Yii::app()->getRequest()->getPost("defaulttemplate");
if(array_key_exists($sTemplate,getTemplateList()))// Filter template name
{
setGlobalSetting('defaulttemplate', $sTemplate);
}

}
setGlobalSetting('admintheme', sanitize_paranoid_string($_POST['admintheme']));
setGlobalSetting('adminthemeiconsize', trim(file_get_contents(Yii::app()->getConfig("styledir").DIRECTORY_SEPARATOR.sanitize_paranoid_string($_POST['admintheme']).DIRECTORY_SEPARATOR.'iconsize')));
Expand Down

0 comments on commit 35d2803

Please sign in to comment.