Skip to content

Commit

Permalink
Dev: uninstall broken template
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Nov 23, 2017
1 parent b98862c commit a3e0300
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion application/models/TemplateConfig.php
Expand Up @@ -117,7 +117,9 @@ public function getTemplateForFile($sFile, $oRTemplate)
while (!file_exists($oRTemplate->path.$sFile) && !file_exists($oRTemplate->viewPath.$sFile) && !file_exists($oRTemplate->filesPath.$sFile)) {
$oMotherTemplate = $oRTemplate->oMotherTemplate;
if (!($oMotherTemplate instanceof TemplateConfiguration)) {
throw new Exception("No template found for $sFile! Last template searched: ".$oRTemplate->sTemplateName);
TemplateConfiguration::uninstall($this->template_name);
Yii::app()->setFlashMessage(sprintf(gT("Theme '%s' has been uninstalled because it's not compatible with this LimeSurvey version."), $this->template_name), 'error');
Yii::app()->getController()->redirect(array("admin/themeoptions"));
break;
}
$oRTemplate = $oMotherTemplate;
Expand Down

0 comments on commit a3e0300

Please sign in to comment.