@@ -157,8 +157,7 @@ |
||
| 157 | 157 | if (count($autre_langue) == 1) { |
| 158 | 158 | $row['lang'] = reset($autre_langue); |
| 159 | 159 | } |
| 160 | - } |
|
| 161 | - else { |
|
| 160 | + } else { |
|
| 162 | 161 | $row['lang'] = 'en'; |
| 163 | 162 | } |
| 164 | 163 | |
@@ -85,8 +85,7 @@ |
||
| 85 | 85 | $url_action = self(); |
| 86 | 86 | $action = _request('action'); |
| 87 | 87 | $url_action = parametre_url($url_action, 'action', $action, '&'); |
| 88 | - } |
|
| 89 | - else { |
|
| 88 | + } else { |
|
| 90 | 89 | $action = parametre_url($url_action, 'action'); |
| 91 | 90 | } |
| 92 | 91 | |
@@ -20,15 +20,13 @@ discard block |
||
| 20 | 20 | if ($trace === '?' or defined('_DEBUG_TRACE_QUERIES')) { |
| 21 | 21 | if (defined('_DEBUG_TRACE_QUERIES') and _DEBUG_TRACE_QUERIES) { |
| 22 | 22 | $trace = true; |
| 23 | - } |
|
| 24 | - else { |
|
| 23 | + } else { |
|
| 25 | 24 | if (empty($GLOBALS['visiteur_session'])) { |
| 26 | 25 | // si un anonyme fait un var_profile on est oblige de remplir le tableau des temps en attendant de savoir |
| 27 | 26 | // car ici on ne sait pas si c'est un hit anonyme |
| 28 | 27 | // ou une requete SQL faite avant chargement de la session |
| 29 | 28 | $trace = (!empty($_GET['var_profile']) ? '?' : false); |
| 30 | - } |
|
| 31 | - else { |
|
| 29 | + } else { |
|
| 32 | 30 | include_spip('inc/autoriser'); |
| 33 | 31 | // gare au bouclage sur calcul de droits au premier appel |
| 34 | 32 | // A fortiori quand on demande une trace |
@@ -50,8 +48,7 @@ discard block |
||
| 50 | 48 | // car ici on ne sait pas si c'est un hit anonyme |
| 51 | 49 | // ou une requete SQL faite avant chargement de la session |
| 52 | 50 | $trace = (!empty($_GET['var_profile']) ? '?' : false); |
| 53 | - } |
|
| 54 | - else { |
|
| 51 | + } else { |
|
| 55 | 52 | include_spip('inc/autoriser'); |
| 56 | 53 | // gare au bouclage sur calcul de droits au premier appel |
| 57 | 54 | // A fortiori quand on demande une trace |
@@ -920,8 +920,7 @@ |
||
| 920 | 920 | if (isset($boucles[$idb]->descr['sourcefile'])) { |
| 921 | 921 | $descr['sourcefile'] = $boucles[$idb]->descr['sourcefile']; |
| 922 | 922 | } |
| 923 | - } |
|
| 924 | - else { |
|
| 923 | + } else { |
|
| 925 | 924 | $descr = []; |
| 926 | 925 | } |
| 927 | 926 | } |
@@ -802,8 +802,7 @@ discard block |
||
| 802 | 802 | function public_compte_ligne($texte, $debut = 0, $fin = null) { |
| 803 | 803 | if (is_null($fin)) { |
| 804 | 804 | return substr_count($texte, "\n", $debut); |
| 805 | - } |
|
| 806 | - else { |
|
| 805 | + } else { |
|
| 807 | 806 | return substr_count($texte, "\n", $debut, $fin - $debut); |
| 808 | 807 | } |
| 809 | 808 | } |
@@ -850,8 +849,7 @@ discard block |
||
| 850 | 849 | erreur_squelette($err_b, $result); |
| 851 | 850 | |
| 852 | 851 | continue; |
| 853 | - } |
|
| 854 | - else { |
|
| 852 | + } else { |
|
| 855 | 853 | $boucle = [ |
| 856 | 854 | 'id_boucle' => $id_boucle, |
| 857 | 855 | 'id_boucle_err' => $id_boucle, |
@@ -991,8 +989,7 @@ discard block |
||
| 991 | 989 | // si c'est un appel pour memoriser une boucle, memorisons la |
| 992 | 990 | if (is_string($champ) and !empty($boucle_placeholder) and !empty($boucle)) { |
| 993 | 991 | $boucles_connues[$boucle_placeholder][$champ] = &$boucle; |
| 994 | - } |
|
| 995 | - else { |
|
| 992 | + } else { |
|
| 996 | 993 | if (!empty($champ->nom_champ) and !empty($boucles_connues[$champ->nom_champ])) { |
| 997 | 994 | $placeholder = $champ->nom_champ; |
| 998 | 995 | $id = reset($champ->param[0][1]); |
@@ -1135,8 +1132,7 @@ discard block |
||
| 1135 | 1132 | ]; |
| 1136 | 1133 | erreur_squelette($err_b, $result); |
| 1137 | 1134 | $pos_courante += strlen($fin_boucle); |
| 1138 | - } |
|
| 1139 | - else { |
|
| 1135 | + } else { |
|
| 1140 | 1136 | // verifier une eventuelle imbrication d'une boucle homonyme |
| 1141 | 1137 | // (interdite, generera une erreur plus loin, mais permet de signaler la bonne erreur) |
| 1142 | 1138 | $search_debut_boucle = BALISE_BOUCLE . $id_boucle_search . '('; |
@@ -207,8 +207,7 @@ discard block |
||
| 207 | 207 | $pagination['type_pagination'] = $modele; |
| 208 | 208 | if (trouver_fond('pagination_' . $modele, 'modeles')) { |
| 209 | 209 | $modele = '_' . $modele; |
| 210 | - } |
|
| 211 | - else { |
|
| 210 | + } else { |
|
| 212 | 211 | $modele = ''; |
| 213 | 212 | } |
| 214 | 213 | } |
@@ -295,8 +294,7 @@ discard block |
||
| 295 | 294 | if ($ids) { |
| 296 | 295 | $ids = array_column($ids, 'id_objet'); |
| 297 | 296 | return implode(',', $ids); |
| 298 | - } |
|
| 299 | - else { |
|
| 297 | + } else { |
|
| 300 | 298 | return '0'; |
| 301 | 299 | } |
| 302 | 300 | } |
@@ -1395,8 +1395,7 @@ |
||
| 1395 | 1395 | 'champ' => $parent_methode['champ'], |
| 1396 | 1396 | 'table' => $table, |
| 1397 | 1397 | ]; |
| 1398 | - } |
|
| 1399 | - elseif (isset($parent_methode['champ_type'])) { |
|
| 1398 | + } elseif (isset($parent_methode['champ_type'])) { |
|
| 1400 | 1399 | $parent = [ |
| 1401 | 1400 | 'objet' => $ligne[$parent_methode['champ_type']], |
| 1402 | 1401 | 'id_objet' => intval($ligne[$parent_methode['champ']]), |
@@ -561,11 +561,9 @@ discard block |
||
| 561 | 561 | if (!isset($msg[$p])) { |
| 562 | 562 | if (isset($resume['erreur']) and $resume['erreur']) { |
| 563 | 563 | $msg[$p] = [$resume['erreur']]; |
| 564 | - } |
|
| 565 | - elseif (!plugin_version_compatible($k['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) { |
|
| 564 | + } elseif (!plugin_version_compatible($k['compatibilite'], $GLOBALS['spip_version_branche'], 'spip')) { |
|
| 566 | 565 | $msg[$p] = [plugin_message_incompatibilite($k['compatibilite'], $GLOBALS['spip_version_branche'], 'SPIP', 'necessite')]; |
| 567 | - } |
|
| 568 | - elseif (!$msg[$p] = plugin_necessite($k['necessite'], $liste, 'necessite')) { |
|
| 566 | + } elseif (!$msg[$p] = plugin_necessite($k['necessite'], $liste, 'necessite')) { |
|
| 569 | 567 | $msg[$p] = plugin_necessite($k['utilise'], $liste, 'utilise'); |
| 570 | 568 | } |
| 571 | 569 | } else { |
@@ -954,8 +952,7 @@ discard block |
||
| 954 | 952 | if (is_dir(constant($dir_type) . $plug . '/squelettes/')) { |
| 955 | 953 | $chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'"; |
| 956 | 954 | } |
| 957 | - } |
|
| 958 | - else { |
|
| 955 | + } else { |
|
| 959 | 956 | foreach ($info['chemin'] as $chemin) { |
| 960 | 957 | if ( |
| 961 | 958 | !isset($chemin['version']) or plugin_version_compatible( |
@@ -1425,8 +1422,7 @@ discard block |
||
| 1425 | 1422 | echo "\n" . ($ok ? 'OK ' : '/!\ ') . textebrut($titre) . "\n", |
| 1426 | 1423 | $trace, |
| 1427 | 1424 | "\n"; |
| 1428 | - } |
|
| 1429 | - else { |
|
| 1425 | + } else { |
|
| 1430 | 1426 | include_spip('inc/filtres_boites'); |
| 1431 | 1427 | echo "<div class='install-plugins svp_retour'>" |
| 1432 | 1428 | . boite_ouvrir($titre, ($ok ? 'success' : 'error')) |
@@ -1463,8 +1459,7 @@ discard block |
||
| 1463 | 1459 | if (file_exists($nom)) { |
| 1464 | 1460 | if (substr($nom, -4) == '.php') { |
| 1465 | 1461 | $fichier_tmp = substr($nom, 0, -4) . '.tmp.php'; |
| 1466 | - } |
|
| 1467 | - else { |
|
| 1462 | + } else { |
|
| 1468 | 1463 | $fichier_tmp = $nom . '.tmp'; |
| 1469 | 1464 | } |
| 1470 | 1465 | file_put_contents($fichier_tmp, $contenu); |
@@ -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 | |