Permalink
Browse files

[xupdate]AbstractAction: use $this->Func->mainfile_to_readonly()

  • Loading branch information...
nao-pon committed Apr 20, 2015
1 parent cdd25c7 commit 965f0180d3cd6a27c6bb9f1ac63bc062026cc305
Showing with 3 additions and 11 deletions.
  1. +3 −11 xoops_trust_path/modules/xupdate/class/AbstractAction.class.php
@@ -297,18 +297,10 @@ protected function _removeInstallDir() {
$this->Func->write_mainfile_protector();
// write protect mainfile.php
if ($main_perm = @ fileperms(XOOPS_ROOT_PATH . '/mainfile.php')) {
$main_perm = substr(sprintf('%o', $main_perm), -3);
$set_perm = '';
for($i=0; $i < 3; $i++) {
$set_perm .= strval(intval($main_perm[$i], 8) & 5);
}
$set_perm = intval($set_perm, 8);
} else {
$set_perm = 0404;
}
$this->Func->mainfile_to_readonly();
// remove install directory
$this->Ftp->localRmdirRecursive(XOOPS_ROOT_PATH . '/install');
$this->Ftp->localChmod(XOOPS_ROOT_PATH . '/mainfile.php', $set_perm);
// set writable "mod_config['temp_path']"
if (! $this->Xupdate->params['is_writable']['result']) {

0 comments on commit 965f018

Please sign in to comment.