X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fweb%2Fclavette_www.git;a=blobdiff_plain;f=www%2Fecrire%2Finstall%2Fetape_chmod.php;h=9d07b3eb81f0e09a1126fa0af37ab4ba31cd6010;hp=9c257402a4271cad94377ae83fa4777a1dcb7afd;hb=cc641eb476987612f6d6df1a5417c1c5582a8ab8;hpb=7d84a490677fb716a1fd4df260f8eab35f6a8506 diff --git a/www/ecrire/install/etape_chmod.php b/www/ecrire/install/etape_chmod.php index 9c25740..9d07b3e 100644 --- a/www/ecrire/install/etape_chmod.php +++ b/www/ecrire/install/etape_chmod.php @@ -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; } //