X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=www%2Fecrire%2Finc%2Fflock.php;h=b6c3677d1d85b94e4cc0d2707340b6b025aadfe7;hb=f489d45ae677afde12ba9c9f70f463ea34787b45;hp=271f662d37817e4abca7e732bdb23ee3e658227a;hpb=0dda6af18a04031b1ca8e217187966077e752fe3;p=ptitvelo%2Fweb%2Fwww.git diff --git a/www/ecrire/inc/flock.php b/www/ecrire/inc/flock.php index 271f662..b6c3677 100644 --- a/www/ecrire/inc/flock.php +++ b/www/ecrire/inc/flock.php @@ -284,6 +284,16 @@ function spip_unlink($f) { } } +/** + * 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. *