@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | // Comparer l'appartenance d'un fichier cree par PHP |
| 38 | 38 | // avec celle du script et du repertoire courant |
| 39 | - if(!$chmod) { |
|
| 39 | + if (!$chmod) { |
|
| 40 | 40 | @rmdir('test'); |
| 41 | 41 | spip_unlink('test'); // effacer au cas ou |
| 42 | 42 | @touch('test'); |
@@ -67,12 +67,12 @@ discard block |
||
| 67 | 67 | function install_etape_chmod_dist() |
| 68 | 68 | { |
| 69 | 69 | global $test_dirs; |
| 70 | - $test_dir = _request('test_dir'); |
|
| 70 | + $test_dir = _request('test_dir'); |
|
| 71 | 71 | $chmod = 0; |
| 72 | 72 | |
| 73 | 73 | if ($test_dir) { |
| 74 | - if (substr($test_dir,-1)!=='/') $test_dir .= '/'; |
|
| 75 | - if (!in_array($test_dir, $test_dirs)) $test_dirs[] = _DIR_RACINE . $test_dir; |
|
| 74 | + if (substr($test_dir, -1) !== '/') $test_dir .= '/'; |
|
| 75 | + if (!in_array($test_dir, $test_dirs)) $test_dirs[] = _DIR_RACINE.$test_dir; |
|
| 76 | 76 | } else { |
| 77 | 77 | if (!_FILE_CONNECT) { |
| 78 | 78 | $test_dirs[] = _DIR_CONNECT; |
@@ -81,12 +81,12 @@ discard block |
||
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | $bad_dirs = array(); |
| 84 | - $absent_dirs = array();; |
|
| 84 | + $absent_dirs = array(); ; |
|
| 85 | 85 | |
| 86 | 86 | while (list(, $my_dir) = each($test_dirs)) { |
| 87 | 87 | $test = test_ecrire($my_dir); |
| 88 | 88 | if (!$test) { |
| 89 | - $m = spip_htmlspecialchars(preg_replace(',^' . _DIR_RACINE . ',', '',$my_dir)); |
|
| 89 | + $m = spip_htmlspecialchars(preg_replace(',^'._DIR_RACINE.',', '', $my_dir)); |
|
| 90 | 90 | if (@file_exists($my_dir)) { |
| 91 | 91 | $bad_dirs["<li>".$m."</li>"] = 1; |
| 92 | 92 | } else |
@@ -98,35 +98,34 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | if (!_FILE_CONNECT) { |
| 100 | 100 | $titre = _T('dirs_preliminaire'); |
| 101 | - $continuer = ' '._T('dirs_commencer') . '.'; |
|
| 101 | + $continuer = ' '._T('dirs_commencer').'.'; |
|
| 102 | 102 | } else |
| 103 | 103 | $titre = _T('dirs_probleme_droits'); |
| 104 | 104 | |
| 105 | 105 | |
| 106 | - $res = "<div align='right'>". menu_langues('var_lang_ecrire')."</div>\n"; |
|
| 106 | + $res = "<div align='right'>".menu_langues('var_lang_ecrire')."</div>\n"; |
|
| 107 | 107 | |
| 108 | 108 | if ($bad_dirs) { |
| 109 | 109 | $res .= |
| 110 | 110 | _T('dirs_repertoires_suivants', |
| 111 | - array('bad_dirs' => join("\n", array_keys($bad_dirs)))) . |
|
| 112 | - "<b>". _T('login_recharger')."</b>."; |
|
| 111 | + array('bad_dirs' => join("\n", array_keys($bad_dirs)))). |
|
| 112 | + "<b>"._T('login_recharger')."</b>."; |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | if ($absent_dirs) { |
| 116 | 116 | $res .= |
| 117 | 117 | _T('dirs_repertoires_absents', |
| 118 | - array('bad_dirs' => join("\n", array_keys($absent_dirs)))) . |
|
| 119 | - "<b>". _T('login_recharger')."</b>."; |
|
| 118 | + array('bad_dirs' => join("\n", array_keys($absent_dirs)))). |
|
| 119 | + "<b>"._T('login_recharger')."</b>."; |
|
| 120 | 120 | } |
| 121 | - $res = "<p>" . $continuer . $res . aide ("install0", true) . "</p>"; |
|
| 121 | + $res = "<p>".$continuer.$res.aide("install0", true)."</p>"; |
|
| 122 | 122 | |
| 123 | 123 | $t = _T('login_recharger'); |
| 124 | - $t = (!$test_dir ? '' : |
|
| 125 | - "<input type='hidden' name='test_dir' value='" . spip_htmlspecialchars($test_dir, ENT_QUOTES) . "' />") |
|
| 124 | + $t = (!$test_dir ? '' : "<input type='hidden' name='test_dir' value='".spip_htmlspecialchars($test_dir, ENT_QUOTES)."' />") |
|
| 126 | 125 | . "<input type='hidden' name='etape' value='chmod' />" |
| 127 | - . "<div style='text-align: right'><input type='submit' value='" . attribut_html($t) . "' /></div>"; |
|
| 126 | + . "<div style='text-align: right'><input type='submit' value='".attribut_html($t)."' /></div>"; |
|
| 128 | 127 | |
| 129 | - echo minipres($titre, $res . generer_form_ecrire('install', $t)); |
|
| 128 | + echo minipres($titre, $res.generer_form_ecrire('install', $t)); |
|
| 130 | 129 | |
| 131 | 130 | } else { |
| 132 | 131 | $deja = (_FILE_CONNECT AND analyse_fichier_connection(_FILE_CONNECT)); |