@@ -193,11 +193,9 @@ |
||
| 193 | 193 | |
| 194 | 194 | if ($statut and test_espace_prive()) { |
| 195 | 195 | $corps = bouton_action(_T('public:accueil_site'), generer_url_ecrire('accueil')); |
| 196 | - } |
|
| 197 | - elseif (!empty($_COOKIE['spip_admin'])) { |
|
| 196 | + } elseif (!empty($_COOKIE['spip_admin'])) { |
|
| 198 | 197 | $corps = bouton_action(_T('public:lien_connecter'), generer_url_public('login')); |
| 199 | - } |
|
| 200 | - else { |
|
| 198 | + } else { |
|
| 201 | 199 | $corps = bouton_action(_T('public:accueil_site'), $GLOBALS['meta']['adresse_site']); |
| 202 | 200 | } |
| 203 | 201 | $corps = "<div class='boutons'>$corps</div>"; |
@@ -173,8 +173,7 @@ |
||
| 173 | 173 | // sinon on ecrit directement sur stdout |
| 174 | 174 | if ($options['envoyer'] and $options['envoyer'] !== 'attachment') { |
| 175 | 175 | $fichier = 'php://output'; |
| 176 | - } |
|
| 177 | - else { |
|
| 176 | + } else { |
|
| 178 | 177 | $fichier = sous_repertoire(_DIR_CACHE, 'export') . $filename; |
| 179 | 178 | } |
| 180 | 179 | |
@@ -341,8 +341,7 @@ |
||
| 341 | 341 | ) { |
| 342 | 342 | if ($use_copy) { |
| 343 | 343 | @copy($fichier_tmp, $fichier); |
| 344 | - } |
|
| 345 | - else { |
|
| 344 | + } else { |
|
| 346 | 345 | @rename($fichier_tmp, $fichier); |
| 347 | 346 | } |
| 348 | 347 | // eviter que PHP ne reserve le vieux timestamp |
@@ -364,8 +364,7 @@ discard block |
||
| 364 | 364 | } |
| 365 | 365 | if (!isset($regs[2])) { |
| 366 | 366 | $niveau = _LOG_INFO; |
| 367 | - } |
|
| 368 | - else { |
|
| 367 | + } else { |
|
| 369 | 368 | $niveau = intval($regs[2]); |
| 370 | 369 | } |
| 371 | 370 | |
@@ -1475,8 +1474,7 @@ discard block |
||
| 1475 | 1474 | ) { |
| 1476 | 1475 | if ($fsize = substr($f, 0, -6) . $m[1] . '.svg' and file_exists($fsize)) { |
| 1477 | 1476 | return $themefiles["$subdir$file"] = $fsize; |
| 1478 | - } |
|
| 1479 | - else { |
|
| 1477 | + } else { |
|
| 1480 | 1478 | return $themefiles["$subdir$file"] = "$f?" . $m[1] . 'px'; |
| 1481 | 1479 | } |
| 1482 | 1480 | } |
@@ -3496,8 +3494,7 @@ discard block |
||
| 3496 | 3494 | if (!in_array('svg', $formats)) { |
| 3497 | 3495 | $formats[] = 'svg'; |
| 3498 | 3496 | } |
| 3499 | - } |
|
| 3500 | - else { |
|
| 3497 | + } else { |
|
| 3501 | 3498 | $formats = array_diff($formats, ['svg']); |
| 3502 | 3499 | } |
| 3503 | 3500 | return $formats; |
@@ -398,8 +398,7 @@ discard block |
||
| 398 | 398 | if (lien_triables($table_lien)) { |
| 399 | 399 | if (isset($qualif['rang_lien'])) { |
| 400 | 400 | $rang = $qualif['rang_lien']; |
| 401 | - } |
|
| 402 | - else { |
|
| 401 | + } else { |
|
| 403 | 402 | $where = lien_where($primary, $id, $objet, $id_objet); |
| 404 | 403 | // si il y a deja un lien pour ce couple (avec un autre role?) on reprend le meme rang si non nul |
| 405 | 404 | if (!$rang = intval(sql_getfetsel('rang_lien', $table_lien, $where))) { |
@@ -545,8 +544,7 @@ discard block |
||
| 545 | 544 | $desc = $trouver_table($table_lien); |
| 546 | 545 | if ($desc and isset($desc['field']['rang_lien'])) { |
| 547 | 546 | $triables[$table_lien] = true; |
| 548 | - } |
|
| 549 | - else { |
|
| 547 | + } else { |
|
| 550 | 548 | $triables[$table_lien] = false; |
| 551 | 549 | } |
| 552 | 550 | } |
@@ -58,8 +58,7 @@ |
||
| 58 | 58 | $rep = sous_repertoire(_DIR_CACHE, '', false, true); |
| 59 | 59 | $rep = sous_repertoire($rep, 'calcul/', false, true); |
| 60 | 60 | $rep = sous_repertoire($rep, $d, false, true); |
| 61 | - } |
|
| 62 | - else { |
|
| 61 | + } else { |
|
| 63 | 62 | // en lecture on essaye pas de creer les repertoires, on va au plus vite |
| 64 | 63 | $rep = _DIR_CACHE . "calcul/$d/"; |
| 65 | 64 | } |
@@ -208,8 +208,7 @@ |
||
| 208 | 208 | spip_log("signature ajax form incorrecte : $form (formulaire signe mais ne correspond pas a la session)", 'formulaires' . _LOG_ERREUR); |
| 209 | 209 | return false; |
| 210 | 210 | } |
| 211 | - } |
|
| 212 | - else { |
|
| 211 | + } else { |
|
| 213 | 212 | if (!empty($sign)) { |
| 214 | 213 | spip_log("signature ajax form incorrecte : $form (formulaire signe mais pas de session)", 'formulaires' . _LOG_ERREUR); |
| 215 | 214 | return false; |
@@ -157,8 +157,7 @@ |
||
| 157 | 157 | ) { |
| 158 | 158 | $dest = substr($dest, 0, -strlen($m[0])) . '_' . $m[1]; |
| 159 | 159 | break; |
| 160 | - } |
|
| 161 | - else { |
|
| 160 | + } else { |
|
| 162 | 161 | $dest = substr($dest, 0, -strlen($m[0])); |
| 163 | 162 | $ext = $m[1] . '.' . $ext; |
| 164 | 163 | } |
@@ -32,13 +32,9 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | if (_request('supprimer_image_fond_login')) { |
| 34 | 34 | // rien à tester |
| 35 | - } |
|
| 36 | - |
|
| 37 | - elseif (_request('supprimer_couleur_login')) { |
|
| 35 | + } elseif (_request('supprimer_couleur_login')) { |
|
| 38 | 36 | // rien à tester |
| 39 | - } |
|
| 40 | - |
|
| 41 | - elseif (!empty($_FILES['upload_image_fond_login'])) { |
|
| 37 | + } elseif (!empty($_FILES['upload_image_fond_login'])) { |
|
| 42 | 38 | $file = $_FILES['upload_image_fond_login']; |
| 43 | 39 | include_spip('inc/documents'); |
| 44 | 40 | $extension = pathinfo($file['name'], PATHINFO_EXTENSION); |
@@ -74,14 +70,10 @@ discard block |
||
| 74 | 70 | |
| 75 | 71 | if (_request('supprimer_image_fond_login')) { |
| 76 | 72 | @unlink($dest); |
| 77 | - } |
|
| 78 | - |
|
| 79 | - elseif (_request('supprimer_couleur_login')) { |
|
| 73 | + } elseif (_request('supprimer_couleur_login')) { |
|
| 80 | 74 | effacer_config('couleur_login'); |
| 81 | 75 | set_request('couleur_login', null); |
| 82 | - } |
|
| 83 | - |
|
| 84 | - elseif (!empty($_FILES['upload_image_fond_login'])) { |
|
| 76 | + } elseif (!empty($_FILES['upload_image_fond_login'])) { |
|
| 85 | 77 | $file = $_FILES['upload_image_fond_login']; |
| 86 | 78 | include_spip('inc/documents'); |
| 87 | 79 | deplacer_fichier_upload($file['tmp_name'], $dest); |