Skip to content

Commit

Permalink
Fixed issue #17922: ComfortUpdate deletes essential files
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Mar 2, 2022
1 parent d6f3825 commit 7e9e35c
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion application/controllers/admin/Update.php
Expand Up @@ -61,8 +61,30 @@
* @package LimeSurvey
* @subpackage Backend
*/
class Update extends SurveyCommonAction

// Backward compatibility function for updates to 5.3 from any previous version
if (class_exists('Survey_Common_Action')) {
class DynamicSurveyCommonAction extends Survey_Common_Action {}
} else {
class DynamicSurveyCommonAction extends SurveyCommonAction {}
}

class Update extends DynamicSurveyCommonAction
{
/**
* Backward compatibility function for updates to 5.3 from any previous version
*
* @inheritDoc
*/
protected function renderWrappedTemplate ($sAction = '', $aViewUrls = array(), $aData = array(), $sRenderFile = false)
{
if (method_exists(get_parent_class($this), 'renderWrappedTemplate')) {
parent::renderWrappedTemplate($sAction, $aViewUrls, $aData, $sRenderFile);
} else {
parent::_renderWrappedTemplate($sAction, $aViewUrls, $aData, $sRenderFile);
}
}

/**
* First function to be called, when coming to admin/update
*
Expand Down

0 comments on commit 7e9e35c

Please sign in to comment.