@@ -185,8 +185,7 @@ |
||
| 185 | 185 | $trads = $m['trads']; |
| 186 | 186 | if (empty($trads)) { |
| 187 | 187 | $trad = ''; |
| 188 | - } |
|
| 189 | - elseif ($l = approcher_langue($trads, $lang)) { |
|
| 188 | + } elseif ($l = approcher_langue($trads, $lang)) { |
|
| 190 | 189 | $trad = $trads[$l]; |
| 191 | 190 | } else { |
| 192 | 191 | if ($lang_defaut == 'aucune') { |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | if (!is_null($options['range'])) { |
| 55 | 55 | spip_livrer_fichier_partie($fichier, $options['range']); |
| 56 | - } |
|
| 57 | - else { |
|
| 56 | + } else { |
|
| 58 | 57 | spip_livrer_fichier_entier($fichier); |
| 59 | 58 | } |
| 60 | 59 | } |
@@ -92,8 +91,7 @@ discard block |
||
| 92 | 91 | header('Expires: 0'); // set expiration time |
| 93 | 92 | header('Pragma: public'); |
| 94 | 93 | header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
| 95 | - } |
|
| 96 | - else { |
|
| 94 | + } else { |
|
| 97 | 95 | $f = (is_string($attachment) ? $attachment : basename($fichier)); |
| 98 | 96 | header("Content-Disposition: inline; filename=\"$f\";"); |
| 99 | 97 | header('Expires: ' . $expires); // set expiration time |
@@ -160,8 +158,7 @@ discard block |
||
| 160 | 158 | } |
| 161 | 159 | |
| 162 | 160 | $cr_header = sprintf('Content-Range: bytes %d-%d/%d', $byteOffset, $finishBytes, $fileSize); |
| 163 | - } |
|
| 164 | - else { |
|
| 161 | + } else { |
|
| 165 | 162 | // si pas de range valide, on delegue a la methode d'envoi complet |
| 166 | 163 | spip_livrer_fichier_entier($fichier); |
| 167 | 164 | // redondant, mais facilite la comprehension du code |
@@ -545,8 +545,7 @@ |
||
| 545 | 545 | || empty($oups['oups_value']) |
| 546 | 546 | ) { |
| 547 | 547 | $oups = null; |
| 548 | - } |
|
| 549 | - else { |
|
| 548 | + } else { |
|
| 550 | 549 | $oups = $oups['oups_value']; |
| 551 | 550 | // controler le contenu |
| 552 | 551 | foreach ($oups as $k => $oup) { |
@@ -251,8 +251,7 @@ |
||
| 251 | 251 | if (_request('login')) { |
| 252 | 252 | // on n'est jamais cense poster le name 'login' |
| 253 | 253 | $erreurs['login'] = _T('info_non_modifiable'); |
| 254 | - } |
|
| 255 | - elseif ( |
|
| 254 | + } elseif ( |
|
| 256 | 255 | ($login = _request('new_login')) && $login !== sql_getfetsel('login', 'spip_auteurs', 'id_auteur=' . (int) $id_auteur) |
| 257 | 256 | ) { |
| 258 | 257 | // on verifie la meme chose que dans auteurs_edit_config() |
@@ -282,8 +282,7 @@ discard block |
||
| 282 | 282 | if ($ids) { |
| 283 | 283 | $ids = array_column($ids, 'id_objet'); |
| 284 | 284 | return implode(',', $ids); |
| 285 | - } |
|
| 286 | - else { |
|
| 285 | + } else { |
|
| 287 | 286 | return '0'; |
| 288 | 287 | } |
| 289 | 288 | } |
@@ -651,8 +650,7 @@ discard block |
||
| 651 | 650 | $logo_bg = timestamp($logo_bg); |
| 652 | 651 | $styles .= ".page_login, .page_spip_pass {background-image:url($logo_bg), url($logo_mini);}\n"; |
| 653 | 652 | $Pile[0]['body_class'] = 'fond_image'; |
| 654 | - } |
|
| 655 | - else { |
|
| 653 | + } else { |
|
| 656 | 654 | $Pile[0]['body_class'] = 'sans_fond'; |
| 657 | 655 | } |
| 658 | 656 | if ($styles) { |
@@ -379,8 +379,7 @@ |
||
| 379 | 379 | function executer_balise_dynamique_dans_un_modele(...$args) { |
| 380 | 380 | if (test_espace_prive()) { |
| 381 | 381 | return executer_balise_dynamique(...$args); |
| 382 | - } |
|
| 383 | - else { |
|
| 382 | + } else { |
|
| 384 | 383 | $str_args = base64_encode(serialize($args)); |
| 385 | 384 | return '<?' . "php \$_zargs=unserialize(base64_decode('$str_args'));echo executer_balise_dynamique(...\$_zargs); ?" . ">\n"; |
| 386 | 385 | } |
@@ -18,15 +18,13 @@ discard block |
||
| 18 | 18 | if ($trace === '?' || defined('_DEBUG_TRACE_QUERIES')) { |
| 19 | 19 | if (defined('_DEBUG_TRACE_QUERIES') && _DEBUG_TRACE_QUERIES) { |
| 20 | 20 | $trace = true; |
| 21 | - } |
|
| 22 | - else { |
|
| 21 | + } else { |
|
| 23 | 22 | if (empty($GLOBALS['visiteur_session'])) { |
| 24 | 23 | // si un anonyme fait un var_profile on est oblige de remplir le tableau des temps en attendant de savoir |
| 25 | 24 | // car ici on ne sait pas si c'est un hit anonyme |
| 26 | 25 | // ou une requete SQL faite avant chargement de la session |
| 27 | 26 | $trace = (empty($_GET['var_profile']) ? false : '?'); |
| 28 | - } |
|
| 29 | - else { |
|
| 27 | + } else { |
|
| 30 | 28 | include_spip('inc/autoriser'); |
| 31 | 29 | // gare au bouclage sur calcul de droits au premier appel |
| 32 | 30 | // A fortiori quand on demande une trace |
@@ -47,8 +45,7 @@ discard block |
||
| 47 | 45 | // car ici on ne sait pas si c'est un hit anonyme |
| 48 | 46 | // ou une requete SQL faite avant chargement de la session |
| 49 | 47 | $trace = (empty($_GET['var_profile']) ? false : '?'); |
| 50 | - } |
|
| 51 | - else { |
|
| 48 | + } else { |
|
| 52 | 49 | include_spip('inc/autoriser'); |
| 53 | 50 | // gare au bouclage sur calcul de droits au premier appel |
| 54 | 51 | // A fortiori quand on demande une trace |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | if (!is_array($id_ou_options)) { |
| 80 | 80 | $options = ['id' => (int) $id_ou_options]; |
| 81 | 81 | $id = $options['id']; |
| 82 | - }else { |
|
| 82 | + } else { |
|
| 83 | 83 | $options = $id_ou_options; |
| 84 | 84 | $id = (int) ($id_ou_options['id'] ?? 0); |
| 85 | 85 | } |
@@ -160,8 +160,7 @@ |
||
| 160 | 160 | $type = objet_type($type); |
| 161 | 161 | $id = (int) $ref; |
| 162 | 162 | $ref = $type . $ref; |
| 163 | - } |
|
| 164 | - else { |
|
| 163 | + } else { |
|
| 165 | 164 | // Si la référence ne correspond à rien, c'est fini |
| 166 | 165 | if (!($match = typer_raccourci($ref))) { |
| 167 | 166 | return json_export(false); |