@@ -553,16 +553,14 @@ |
||
| 553 | 553 | if (stripos($suite, 'SELECT') !== false) { |
| 554 | 554 | if ($echappe_textes) { |
| 555 | 555 | [$suite_echap, $textes] = query_echappe_textes($suite); |
| 556 | - } |
|
| 557 | - else { |
|
| 556 | + } else { |
|
| 558 | 557 | $suite_echap = $suite; |
| 559 | 558 | } |
| 560 | 559 | if (preg_match('/^(.*?)([(]\s*SELECT\b.*)$/si', $suite_echap, $r)) { |
| 561 | 560 | $suite_echap = $r[1] . _mysql_traite_query($r[2], $db, $prefixe, false); |
| 562 | 561 | if ($echappe_textes) { |
| 563 | 562 | $suite = query_reinjecte_textes($suite_echap, $textes); |
| 564 | - } |
|
| 565 | - else { |
|
| 563 | + } else { |
|
| 566 | 564 | $suite = $suite_echap; |
| 567 | 565 | } |
| 568 | 566 | } |
@@ -245,8 +245,7 @@ discard block |
||
| 245 | 245 | if (_request('login')) { |
| 246 | 246 | // on n'est jamais cense poster le name 'login' |
| 247 | 247 | $erreurs['login'] = _T('info_non_modifiable'); |
| 248 | - } |
|
| 249 | - elseif ( |
|
| 248 | + } elseif ( |
|
| 250 | 249 | ($login = _request('new_login')) and |
| 251 | 250 | $login !== sql_getfetsel('login', 'spip_auteurs', 'id_auteur=' . intval($id_auteur)) |
| 252 | 251 | ) { |
@@ -483,8 +482,7 @@ discard block |
||
| 483 | 482 | if (!isset($contexte['lang']) or !$contexte['lang']) { |
| 484 | 483 | if (isset($row['lang']) and $row['lang']) { |
| 485 | 484 | $contexte['lang'] = $row['lang']; |
| 486 | - } |
|
| 487 | - else { |
|
| 485 | + } else { |
|
| 488 | 486 | $contexte['lang'] = $GLOBALS['meta']['langue_site']; |
| 489 | 487 | } |
| 490 | 488 | } |
@@ -2868,8 +2868,7 @@ |
||
| 2868 | 2868 | $_const = interprete_argument_balise(1, $p); |
| 2869 | 2869 | if (!strlen($_const ?? '')) { |
| 2870 | 2870 | $p->code = "''"; |
| 2871 | - } |
|
| 2872 | - else { |
|
| 2871 | + } else { |
|
| 2873 | 2872 | $p->code = "(defined($_const)?constant($_const):'')"; |
| 2874 | 2873 | } |
| 2875 | 2874 | $p->interdire_scripts = false; |
@@ -267,8 +267,7 @@ discard block |
||
| 267 | 267 | if ($id === '*') { |
| 268 | 268 | unset($GLOBALS['autoriser_exception'][$faire][$type]); |
| 269 | 269 | unset($autorisation[$faire][$type]); |
| 270 | - } |
|
| 271 | - else { |
|
| 270 | + } else { |
|
| 272 | 271 | unset($GLOBALS['autoriser_exception'][$faire][$type][$id]); |
| 273 | 272 | unset($autorisation[$faire][$type][$id]); |
| 274 | 273 | } |
@@ -652,8 +651,7 @@ discard block |
||
| 652 | 651 | function autoriser_rubrique_creer_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 653 | 652 | if (!empty($opt['id_parent'])) { |
| 654 | 653 | return autoriser('creerrubriquedans', 'rubrique', $opt['id_parent'], $qui); |
| 655 | - } |
|
| 656 | - else { |
|
| 654 | + } else { |
|
| 657 | 655 | return autoriser('defaut', null, 0, $qui, $opt); |
| 658 | 656 | } |
| 659 | 657 | } |
@@ -814,8 +812,7 @@ discard block |
||
| 814 | 812 | if (!empty($opt['id_parent'])) { |
| 815 | 813 | // creerarticledans rappelle autoriser(creer,article) sans id, donc on verifiera condition du else aussi |
| 816 | 814 | return autoriser('creerarticledans', 'rubrique', $opt['id_parent'], $qui); |
| 817 | - } |
|
| 818 | - else { |
|
| 815 | + } else { |
|
| 819 | 816 | return (sql_countsel('spip_rubriques') > 0 and in_array($qui['statut'], ['0minirezo', '1comite'])); |
| 820 | 817 | } |
| 821 | 818 | } |
@@ -448,8 +448,7 @@ |
||
| 448 | 448 | and strpos($query_echappees, $part . $next, $currentpos) === $nextpos |
| 449 | 449 | ) { |
| 450 | 450 | $part .= array_shift($textes); |
| 451 | - } |
|
| 452 | - else { |
|
| 451 | + } else { |
|
| 453 | 452 | break; |
| 454 | 453 | } |
| 455 | 454 | } |
@@ -339,8 +339,7 @@ |
||
| 339 | 339 | if (!autoriser('modifier', $type, intval($id))) { |
| 340 | 340 | $contexte['editable'] = ''; |
| 341 | 341 | } |
| 342 | - } |
|
| 343 | - else { |
|
| 342 | + } else { |
|
| 344 | 343 | if (!autoriser('creer', $type, 0, null, ['id_parent' => $id_parent])) { |
| 345 | 344 | $contexte['editable'] = ''; |
| 346 | 345 | } |
@@ -39,8 +39,7 @@ |
||
| 39 | 39 | } else { |
| 40 | 40 | $tls = true; |
| 41 | 41 | } |
| 42 | - } |
|
| 43 | - else { |
|
| 42 | + } else { |
|
| 44 | 43 | $tls_ldap == 'non'; |
| 45 | 44 | } |
| 46 | 45 | |
@@ -121,8 +121,7 @@ discard block |
||
| 121 | 121 | if (!$res or (!$res['length'] and $res['status'] != 304)) { |
| 122 | 122 | spip_log("copie_locale : Echec recuperation $source sur $localrac_tmp status : " . ($res ? $res['status'] : '-'), 'distant' . _LOG_INFO_IMPORTANTE); |
| 123 | 123 | @unlink($localrac_tmp); |
| 124 | - } |
|
| 125 | - else { |
|
| 124 | + } else { |
|
| 126 | 125 | spip_log("copie_locale : recuperation $source sur $localrac_tmp OK | taille " . $res['length'] . ' status ' . $res['status'], 'distant'); |
| 127 | 126 | } |
| 128 | 127 | if (!$res or !$res['length']) { |
@@ -240,8 +239,7 @@ discard block |
||
| 240 | 239 | break; |
| 241 | 240 | } |
| 242 | 241 | } |
| 243 | - } |
|
| 244 | - else { |
|
| 242 | + } else { |
|
| 245 | 243 | $ip = false; |
| 246 | 244 | } |
| 247 | 245 | } |
@@ -312,8 +312,7 @@ |
||
| 312 | 312 | ecrire_meta($casier, $serialized_store, null, $table); |
| 313 | 313 | } |
| 314 | 314 | } |
| 315 | - } |
|
| 316 | - else { |
|
| 315 | + } else { |
|
| 317 | 316 | ecrire_meta($casier, $store, null, $table); |
| 318 | 317 | } |
| 319 | 318 | } |