[SPIP] ~v3.0.20-->v3.0.25
[lhc/web/clavette_www.git] / www / ecrire / install / etape_chmod.php
index 9c25740..9d07b3e 100644 (file)
@@ -3,7 +3,7 @@
 /***************************************************************************\
  *  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.     *
@@ -53,16 +53,9 @@ function test_ecrire($my_dir) {
                }
                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;
 }
 
 //