/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
- * Copyright (c) 2001-2014 *
+ * Copyright (c) 2001-2016 *
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
// liberer le verrou et fermer le fichier
@chmod($fichier, _SPIP_CHMOD & 0666);
if ($ok) {
- spip_clear_opcode_cache(realpath($fichier));
+ if (strpos($fichier,".php")!==false){
+ spip_clear_opcode_cache(realpath($fichier));
+ }
return $ok;
}
}
@mkdir($path, _SPIP_CHMOD);
@chmod($path, _SPIP_CHMOD);
- $ok = false;
- if ($test = @fopen("$path/dir_test.php", "w")) {
- @fputs($test, '<'.'?php $ok = true; ?'.'>');
- @fclose($test);
- @include("$path/dir_test.php");
- spip_unlink("$path/dir_test.php");
- }
- if ($ok) {
+ if (is_dir($path) && is_writable($path)) {
@touch ("$path/.ok");
spip_log("creation $base$subdir/");
return $baseaff.($dirs[$base.$subdir] = "$subdir/");
if (!_DIR_RESTREINT)
$base = preg_replace(',^' . _DIR_RACINE .',', '',$base);
$base .= $subdir;
- raler_fichier($base . ($test?'/.ok':'/dir_test.php'));
+ raler_fichier($base . '/.plat');
}
spip_log("faux sous-repertoire $base${subdir}");
return $baseaff.($dirs[$base.$subdir] = "${subdir}_");