Fix: Error when deleting lock file by doliwamp

This commit is contained in:
Laurent Destailleur 2010-08-19 22:32:51 +00:00
parent be2a500d70
commit aef3fde5db
4 changed files with 9 additions and 7 deletions

View File

@ -12,5 +12,5 @@ $force_install_databaserootlogin='__SUPERUSERLOGIN__';
$force_install_databaserootpass='__SUPERUSERPASSWORD__'; $force_install_databaserootpass='__SUPERUSERPASSWORD__';
$force_install_dolibarrlogin='admin'; $force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1'; $force_install_nophpinfo='1';
$force_install_lockinstall='1'; $force_install_lockinstall='444';
?> ?>

View File

@ -12,5 +12,5 @@ $force_install_databaserootlogin='root';
$force_install_databaserootpass='root'; $force_install_databaserootpass='root';
$force_install_dolibarrlogin='admin'; $force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1'; $force_install_nophpinfo='1';
$force_install_lockinstall='1'; $force_install_lockinstall='444';
?> ?>

View File

@ -12,5 +12,5 @@ $force_install_databaserootlogin='root';
$force_install_databaserootpass='WAMPMYSQLNEWPASSWORD'; $force_install_databaserootpass='WAMPMYSQLNEWPASSWORD';
$force_install_dolibarrlogin='admin'; $force_install_dolibarrlogin='admin';
$force_install_nophpinfo='1'; $force_install_nophpinfo='1';
$force_install_lockinstall='1'; $force_install_lockinstall='644';
?> ?>

View File

@ -288,9 +288,10 @@ if ($_POST["action"] == "set")
$fp = @fopen($lockfile, "w"); $fp = @fopen($lockfile, "w");
if ($fp) if ($fp)
{ {
fwrite($fp, "This is a lock file to prevent use of install pages"); if ($force_install_lockinstall == 1) $force_install_lockinstall=444; // For backward compatibility
fwrite($fp, "This is a lock file to prevent use of install pages (set with permission ".$force_install_lockinstall.")");
fclose($fp); fclose($fp);
@chmod($lockfile, octdec(444)); @chmod($lockfile, octdec($force_install_lockinstall));
$createlock=1; $createlock=1;
} }
} }
@ -337,9 +338,10 @@ elseif (preg_match('/upgrade/i',$_POST["action"]))
$fp = @fopen($lockfile, "w"); $fp = @fopen($lockfile, "w");
if ($fp) if ($fp)
{ {
fwrite($fp, "This is a lock file to prevent use of install pages"); if ($force_install_lockinstall == 1) $force_install_lockinstall=444; // For backward compatibility
fwrite($fp, "This is a lock file to prevent use of install pages (set with permission ".$force_install_lockinstall.")");
fclose($fp); fclose($fp);
@chmod($lockfile, octdec(444)); @chmod($lockfile, octdec($force_install_lockinstall));
$createlock=1; $createlock=1;
} }
} }