Skip to content

Commit

Permalink
Dev: refined updatecontroller not to load general layout.
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Dec 28, 2017
1 parent 2bced78 commit 1203bc0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions application/controllers/admin/databaseupdate.php
Expand Up @@ -44,6 +44,7 @@ public function db($continue = null)
$aViewUrls['output'] = CheckForDBUpgrades();
}


$aData['updatedbaction'] = true;

$this->_renderWrappedTemplate('update', $aViewUrls, $aData, 'layout_minimal.php');
Expand Down
4 changes: 2 additions & 2 deletions application/core/Survey_Common_Action.php
Expand Up @@ -315,7 +315,7 @@ private function renderCentralContents($sAction, $aViewUrls, $aData = [])
* @param array|string $aViewUrls View url(s)
* @param array $aData Data to be passed on. Optional.
*/
protected function _renderWrappedTemplate($sAction = '', $aViewUrls = array(), $aData = array(), $sRenderFile = false);
protected function _renderWrappedTemplate($sAction = '', $aViewUrls = array(), $aData = array(), $sRenderFile = false)
{
// Gather the data
$aData = $this->_addPseudoParams($aData); //// the check of the surveyid should be done in the Admin controller it self.
Expand All @@ -330,7 +330,7 @@ protected function _renderWrappedTemplate($sAction = '', $aViewUrls = array(), $
$renderFile = $basePath.'/layout_main.php';
}
} else {
$renderFile = $basePath.$sRenderFile;
$renderFile = $basePath.'/'.$sRenderFile;
}

$content = $this->renderCentralContents($sAction, $aViewUrls, $aData);
Expand Down
6 changes: 1 addition & 5 deletions application/views/admin/super/_tutorial_menu.php
@@ -1,9 +1,5 @@
<?php
try{
$aTutorials = @Tutorials::model()->getActiveTutorials();
} catch(Exception $e){
$aTutorials = [];
}
$aTutorials = Tutorials::model()->getActiveTutorials();
?>

<li class="dropdown">
Expand Down

0 comments on commit 1203bc0

Please sign in to comment.