/***************************************************************************\
* 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. *
}
spip_unlink('test');
}
- // Verifier que les valeurs sont correctes
- $f = @fopen($my_dir.'test.php', 'w');
- if ($f) {
- @fputs($f, '<'.'?php $ok = true; ?'.'>');
- @fclose($f);
- @chmod($my_dir.'test.php', $chmod);
- include($my_dir.'test.php');
- }
- spip_unlink($my_dir.'test.php');
- return $ok?$chmod:false;
+ $ok = is_dir($my_dir) && is_writable($my_dir);
+
+ return $ok ? $chmod : false;
}
//