Skip to content

Commit

Permalink
- Fixed issue : unzip didn't replace newer files
Browse files Browse the repository at this point in the history
- Dev : add REPLACE_NEWER to PCLzip

- Fixed issue : no aData for for _final view
- Dev : just replaced it by an empty array
  • Loading branch information
louis committed Jul 29, 2015
1 parent c922625 commit ecf35f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/update.php
Expand Up @@ -272,7 +272,7 @@ function step4()
$updateModel->updateVersion($destinationBuild);
$updateModel->destroyGlobalSettings();
// TODO : aData should contains information about each step
return $this->controller->renderPartial('update/updater/steps/_final', $aData, false, true);
return $this->controller->renderPartial('update/updater/steps/_final', array(), false, true);
}
else
{
Expand Down
3 changes: 1 addition & 2 deletions application/models/UpdateForm.php
Expand Up @@ -280,9 +280,8 @@ public function unzipUpdateFile($file_to_unzip = 'update.zip')
$archive = new PclZip($this->tempdir.DIRECTORY_SEPARATOR.$file_to_unzip);

// TODO : RESTORE REPLACE NEWER !!
// TODO : TEST IF '/' should be replaced with DIRECTORY_SEPARATOR
//if ($archive->extract(PCLZIP_OPT_PATH, $this->rootdir.'/', PCLZIP_OPT_REPLACE_NEWER)== 0)
if ($archive->extract(PCLZIP_OPT_PATH, $this->rootdir.DIRECTORY_SEPARATOR)== 0)
if ($archive->extract(PCLZIP_OPT_PATH, $this->rootdir.DIRECTORY_SEPARATOR, PCLZIP_OPT_REPLACE_NEWER)== 0)
{
//PclTraceDisplay(); die();
$return = array('result'=>FALSE, 'error'=>'unzip_error', 'message'=>$archive->errorInfo(true));
Expand Down

0 comments on commit ecf35f7

Please sign in to comment.