|
|
|
@ -519,7 +519,7 @@ function SL_spip_clear_opcode_cache($filepath) {
|
|
|
|
|
|
|
|
|
|
// Zend OPcache |
|
|
|
|
if (function_exists('opcache_invalidate')) { |
|
|
|
|
$invalidate = @opcache_invalidate($filepath, true); |
|
|
|
|
$invalidate = opcache_invalidate($filepath, true) && opcache_invalidate(__DIR__ . '/version.php'); |
|
|
|
|
// si l'invalidation a echoue lever un flag |
|
|
|
|
if (!$invalidate and !defined('_spip_attend_invalidation_opcode_cache')) { |
|
|
|
|
define('_spip_attend_invalidation_opcode_cache', true); |
|
|
|
@ -534,6 +534,7 @@ function SL_spip_clear_opcode_cache($filepath) {
|
|
|
|
|
// not compiled yet. |
|
|
|
|
// @see http://php.net/apc-delete-file |
|
|
|
|
@apc_delete_file($filepath); |
|
|
|
|
@apc_delete_file(__DIR__ . '/version.php'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1509,11 +1510,11 @@ try {
|
|
|
|
|
//Update himself |
|
|
|
|
if (!empty($_REQUEST['spip_loader_update'])) { |
|
|
|
|
$spip_loader = SL_recuperer_page(_URL_SPIP_LOADER); |
|
|
|
|
if (! @file_put_contents(_SPIP_LOADER_SCRIPT, $spip_loader)) { |
|
|
|
|
if (!@file_put_contents(_DIR_BASE . basename(_URL_SPIP_LOADER), $spip_loader)) { |
|
|
|
|
throw new Exception('Impossible d’écrire le nouveau fichier de SPIP Loader.'); |
|
|
|
|
} |
|
|
|
|
SL_spip_clear_opcode_cache(_SPIP_LOADER_SCRIPT); |
|
|
|
|
SL_spip_redirige_boucle(_DIR_BASE . _SPIP_LOADER_SCRIPT); |
|
|
|
|
SL_spip_clear_opcode_cache(basename(_URL_SPIP_LOADER)); |
|
|
|
|
SL_spip_redirige_boucle('../' . basename(_URL_SPIP_LOADER)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// y a tout ce qu'il faut pour que cela marche |
|
|
|
|