diff --git a/admin/update/updater.php b/admin/update/updater.php index 2fa3f824c87..e12b181c34f 100644 --- a/admin/update/updater.php +++ b/admin/update/updater.php @@ -82,7 +82,7 @@ function RunUpdaterUpdate() { return true; } - + if (!is_writable($tempdir)) { echo "
  • ".sprintf($clang->gT("Tempdir %s is not writable"),$tempdir)."
  • "; @@ -93,7 +93,7 @@ function RunUpdaterUpdate() echo "
  • ".sprintf($clang->gT("Updater file is not writable (%s). Please set according file permissions."),$homedir.DIRECTORY_SEPARATOR.'update'.DIRECTORY_SEPARATOR.'updater.php')."
  • "; $error=true; } - + // Download the zip file, unpack it and replace the updater file accordingly // Create DB and file backups now require_once("classes/pclzip/pclzip.lib.php"); @@ -153,8 +153,8 @@ function RunUpdaterUpdate() echo $clang->gT('There was a problem downloading the updater file. Please try to restart the update process.').'
    '; $error=true; } - - + + } function UpdateStep1() @@ -182,7 +182,7 @@ function UpdateStep1() } else { echo "'; } - + if (count($modifiedfiles)>0) { echo $clang->gT('The following files will be modified or deleted but were already modified by someone else.').'
    '; @@ -540,13 +540,14 @@ function UpdateStep4() @unlink($tempdir.'/update.zip'); } elseif($error=='') { - $body=''; $full_body=''; + $body=''; + $pFile = fopen($tempdir.'/update.zip', 'w'); for(;;){ $error = $http->ReadReplyBody($body,100000); if($error != "" || strlen($body)==0) break; - $full_body .= $body; + fwrite($fp, $body); } - file_put_contents($tempdir.'/update.zip',$full_body); + fclose($pFile); } else { @@ -624,7 +625,7 @@ function CheckForDBUpgrades() $currentDBVersion=GetGlobalSetting('DBVersion'); if (intval($dbversionnumber)>intval($currentDBVersion)) { - if(isset($_GET['continue']) && $_GET['continue']==1) + if(isset($_GET['continue']) && $_GET['continue']==1) { echo getAdminHeader()."
    "; $upgradedbtype=$databasetype; @@ -649,14 +650,14 @@ function ShowDBUpgradeNotice() { $error=false; echo "
    ".$clang->gT('Database upgrade').'

    '; echo $clang->gT('Please verify the following information before continuing with the database upgrade:').'

    '; echo "
    "; - echo "" . $clang->gT('Click here to continue') . ""; + echo "" . $clang->gT('Click here to continue') . ""; echo "
    "; }