spip_fclose_unlock($fp);
}
- // liberer le verrou et fermer le fichier
+ // liberer le verrou et fermer le fichier
@chmod($fichier, _SPIP_CHMOD & 0666);
- if ($ok) return $ok;
+ if ($ok) {
+ if (!defined('_OPCACHE_BUG') AND function_exists('opcache_invalidate'))
+ opcache_invalidate($fichier, true);
+ return $ok;
+ }
}
if (!$ignorer_echec){
}
}
+/**
+ * clearstatcache adapte a la version PHP
+ * @param bool $clear_realpath_cache
+ * @param null $filename
+ */
+function spip_clearstatcache($clear_realpath_cache = false, $filename=null){
+ return (version_compare(PHP_VERSION, '5.3.0') >= 0)?
+ clearstatcache($clear_realpath_cache,$filename):clearstatcache();
+}
+
/*
* Suppression complete d'un repertoire.
*