Skip to content

Commit

Permalink
Fixed issue #6279: "Cannot modify header information" warning after D…
Browse files Browse the repository at this point in the history
…B update
  • Loading branch information
c-schmitz committed Jul 6, 2012
1 parent deb7331 commit 4b03f4f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions application/controllers/admin/update.php
Expand Up @@ -533,20 +533,18 @@ function db($continue = null)
{
$clang = $this->getController()->lang;
Yii::app()->loadHelper("update/update");
$getHeader = true;
if(isset($continue) && $continue=="yes")
{
$aViewUrls['output'] = CheckForDBUpgrades($continue);
updateCheck();
$getHeader = false;
$aData['display']['header'] = false;
}
else
{
$aData['display']['header'] = true;
$aViewUrls['output'] = CheckForDBUpgrades();
}

$aData['display']['header'] = false;

$this->_renderWrappedTemplate('update', $aViewUrls, $aData);
}

Expand Down
4 changes: 2 additions & 2 deletions application/core/Survey_Common_Action.php
Expand Up @@ -195,13 +195,13 @@ protected function _renderWrappedTemplate($sAction = '', $aViewUrls = array(), $
$sViewPath .= $sAction . '/';
}

// Send HTTP header
header("Content-type: text/html; charset=UTF-8"); // needed for correct UTF-8 encoding


// Header
if(!isset($aData['display']['header']) || $aData['display']['header'] !== false)
{
// Send HTTP header
header("Content-type: text/html; charset=UTF-8"); // needed for correct UTF-8 encoding
Yii::app()->getController()->_getAdminHeader();
}

Expand Down
2 changes: 1 addition & 1 deletion application/helpers/update/update_helper.php
Expand Up @@ -55,7 +55,7 @@ function ShowDBUpgradeNotice() {
."<li><b>" .$clang->gT('Table prefix') . ":</b> " . Yii::app()->db->tablePrefix . "</li>"
."<li><b>" .$clang->gT('Site name') . ":</b> " . Yii::app()->getConfig("sitename") . "</li>"
."<li><b>" .$clang->gT('Root URL') . ":</b> " . Yii::app()->getController()->createUrl('') . "</li>"
.'</ul>'
.'</ul><br/>'
."<p>"
."<a href='".Yii::app()->getController()->createUrl("admin/update/db/continue/yes")."'>" . $clang->gT('Click here to continue') . "</a>"
."</p>"
Expand Down

0 comments on commit 4b03f4f

Please sign in to comment.