Amélioration reponse installation auto
This commit is contained in:
parent
9f2c9ac149
commit
a9cda0a75b
|
@ -278,10 +278,10 @@ class install extends common
|
||||||
}
|
}
|
||||||
// Nettoyage des fichiers d'installation précédents
|
// Nettoyage des fichiers d'installation précédents
|
||||||
if (file_exists(self::TEMP_DIR . 'update.tar.gz') && $success) {
|
if (file_exists(self::TEMP_DIR . 'update.tar.gz') && $success) {
|
||||||
$success = unlink(self::TEMP_DIR . 'update.tar.gz');
|
$success = $success || unlink(self::TEMP_DIR . 'update.tar.gz');
|
||||||
}
|
}
|
||||||
if (file_exists(self::TEMP_DIR . 'update.tar') && $success) {
|
if (file_exists(self::TEMP_DIR . 'update.tar') && $success) {
|
||||||
$success = unlink(self::TEMP_DIR . 'update.tar');
|
$success = $success || unlink(self::TEMP_DIR . 'update.tar');
|
||||||
}
|
}
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
|
@ -356,10 +356,11 @@ class install extends common
|
||||||
'</IfModule>' . PHP_EOL .
|
'</IfModule>' . PHP_EOL .
|
||||||
'# URL rewriting' . PHP_EOL;
|
'# URL rewriting' . PHP_EOL;
|
||||||
$fileContent = str_replace('# URL rewriting', $rewriteData, $fileContent);
|
$fileContent = str_replace('# URL rewriting', $rewriteData, $fileContent);
|
||||||
file_put_contents(
|
$r = file_put_contents(
|
||||||
'.htaccess',
|
'.htaccess',
|
||||||
$fileContent
|
$fileContent
|
||||||
);
|
);
|
||||||
|
$success = $r === false ? false : true;
|
||||||
}
|
}
|
||||||
// Recopie htaccess
|
// Recopie htaccess
|
||||||
if (
|
if (
|
||||||
|
@ -367,7 +368,7 @@ class install extends common
|
||||||
$success && file_exists('.htaccess.bak')
|
$success && file_exists('.htaccess.bak')
|
||||||
) {
|
) {
|
||||||
// L'écraser avec le backup
|
// L'écraser avec le backup
|
||||||
$success = copy('.htaccess.bak', '.htaccess');
|
$success = $success || copy('.htaccess.bak', '.htaccess');
|
||||||
// Effacer le backup
|
// Effacer le backup
|
||||||
unlink('.htaccess.bak');
|
unlink('.htaccess.bak');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue