@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $row = sql_fetsel( |
| 109 | 109 | 'statut, id_auteur, login, email', |
| 110 | 110 | 'spip_auteurs', |
| 111 | - 'email=' . sql_quote($declaration['email']) |
|
| 111 | + 'email='.sql_quote($declaration['email']) |
|
| 112 | 112 | ) |
| 113 | 113 | ) { |
| 114 | 114 | if ($row['statut'] == '5poubelle' && empty($declaration['pass'])) { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | - spip_logger()->info($row['id_auteur'] . ' veut se resinscrire'); |
|
| 127 | + spip_logger()->info($row['id_auteur'].' veut se resinscrire'); |
|
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | return sql_fetsel( |
| 21 | 21 | '*', |
| 22 | 22 | 'spip_auteurs', |
| 23 | - ['id_auteur=' . (int) $id_auteur, "statut<>'5poubelle'", "pass<>''", "login<>''"] |
|
| 23 | + ['id_auteur='.(int) $id_auteur, "statut<>'5poubelle'", "pass<>''", "login<>''"] |
|
| 24 | 24 | ); |
| 25 | 25 | } elseif ($jeton) { |
| 26 | 26 | include_spip('action/inscrire_auteur'); |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | if ($auteur) { |
| 60 | 60 | $valeurs['id_auteur'] = $id_auteur; // a toutes fins utiles pour le formulaire |
| 61 | 61 | if ($jeton) { |
| 62 | - $valeurs['_hidden'] = '<input type="hidden" name="p" value="' . $jeton . '" />'; |
|
| 62 | + $valeurs['_hidden'] = '<input type="hidden" name="p" value="'.$jeton.'" />'; |
|
| 63 | 63 | } |
| 64 | 64 | } else { |
| 65 | 65 | $valeurs['message_erreur'] = _T('pass_erreur_code_inconnu'); |
@@ -150,8 +150,8 @@ discard block |
||
| 150 | 150 | 'id_auteur', |
| 151 | 151 | 'spip_auteurs', |
| 152 | 152 | [ |
| 153 | - '(email=' . sql_quote($row['email']) . ' or login=' . sql_quote($row['email']) . ')', |
|
| 154 | - 'id_auteur != ' . $id_auteur |
|
| 153 | + '(email='.sql_quote($row['email']).' or login='.sql_quote($row['email']).')', |
|
| 154 | + 'id_auteur != '.$id_auteur |
|
| 155 | 155 | ], |
| 156 | 156 | '', |
| 157 | 157 | '', |
@@ -164,13 +164,13 @@ discard block |
||
| 164 | 164 | else { |
| 165 | 165 | $identifiant = $row['login']; |
| 166 | 166 | } |
| 167 | - $res['message_ok'] = '<b>' . _T('pass_nouveau_enregistre') . '</b>' . |
|
| 168 | - '<br />' . _T('pass_rappel_login', ['login' => $identifiant]); |
|
| 167 | + $res['message_ok'] = '<b>'._T('pass_nouveau_enregistre').'</b>'. |
|
| 168 | + '<br />'._T('pass_rappel_login', ['login' => $identifiant]); |
|
| 169 | 169 | |
| 170 | 170 | include_spip('inc/auth'); |
| 171 | 171 | $auth = auth_identifier_login($row['login'], $oubli); |
| 172 | 172 | if (!is_array($auth)) { |
| 173 | - spip_logger()->error('Erreur identification ' . $row['login'] . " après changement de mot de passe: $auth"); |
|
| 173 | + spip_logger()->error('Erreur identification '.$row['login']." après changement de mot de passe: $auth"); |
|
| 174 | 174 | } |
| 175 | 175 | elseif ($auth['id_auteur'] == $id_auteur) { |
| 176 | 176 | auth_loger($auth); |
@@ -89,12 +89,12 @@ discard block |
||
| 89 | 89 | $cles = \Spip\Chiffrer\SpipCles::instance(); |
| 90 | 90 | $secret = $cles->getSecretAuth(); |
| 91 | 91 | |
| 92 | - $id_auteur = sql_getfetsel('id_auteur', 'spip_auteurs', 'login=' . sql_quote($login)); |
|
| 92 | + $id_auteur = sql_getfetsel('id_auteur', 'spip_auteurs', 'login='.sql_quote($login)); |
|
| 93 | 93 | if ($id_auteur !== null) { |
| 94 | 94 | // c'est un auteur connu : si on a pas de secret il faut absolument qu'il se reconnecte avec le meme mot de passe |
| 95 | 95 | // pour restaurer la copie des cles |
| 96 | 96 | if (!$secret && !auth_spip_initialiser_secret()) { |
| 97 | - $row = sql_fetsel('backup_cles, pass', 'spip_auteurs', 'id_auteur=' . (int) $id_auteur); |
|
| 97 | + $row = sql_fetsel('backup_cles, pass', 'spip_auteurs', 'id_auteur='.(int) $id_auteur); |
|
| 98 | 98 | if (empty($row['backup_cles']) || !$cles->restore($row['backup_cles'], $pass, $row['pass'], $id_auteur)) { |
| 99 | 99 | $echec = _T('avis_connexion_erreur_fichier_cle_manquant_1'); |
| 100 | 100 | echouer_etape_3b($echec); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | 'email' => $email, |
| 109 | 109 | 'login' => $login, |
| 110 | 110 | 'statut' => '0minirezo' |
| 111 | - ], 'id_auteur=' . (int) $id_auteur); |
|
| 111 | + ], 'id_auteur='.(int) $id_auteur); |
|
| 112 | 112 | // le passer webmestre separement du reste, au cas ou l'alter n'aurait pas fonctionne |
| 113 | 113 | @sql_updateq('spip_auteurs', ['webmestre' => 'oui'], "id_auteur=$id_auteur"); |
| 114 | 114 | if (!auth_spip_modifier_pass($login, $pass, $id_auteur)) { |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | include_spip('inc/auth'); |
| 149 | 149 | $auteur = auth_identifier_login($login, $pass); |
| 150 | 150 | if (!$auteur || !auth_loger($auteur)) { |
| 151 | - $logger->info("login automatique impossible $auth_spip $session" . (is_countable($row) ? count($row) : 0)); |
|
| 151 | + $logger->info("login automatique impossible $auth_spip $session".(is_countable($row) ? count($row) : 0)); |
|
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | 154 | |
@@ -170,9 +170,9 @@ discard block |
||
| 170 | 170 | function echouer_etape_3b($echec): never { |
| 171 | 171 | echo minipres( |
| 172 | 172 | 'AUTO', |
| 173 | - info_progression_etape(3, 'etape_', 'install/', true) . |
|
| 174 | - "<div class='error'><h3>$echec</h3>\n" . |
|
| 175 | - '<p>' . _T('avis_connexion_echec_2') . '</p>' . |
|
| 173 | + info_progression_etape(3, 'etape_', 'install/', true). |
|
| 174 | + "<div class='error'><h3>$echec</h3>\n". |
|
| 175 | + '<p>'._T('avis_connexion_echec_2').'</p>'. |
|
| 176 | 176 | '</div>' |
| 177 | 177 | ); |
| 178 | 178 | exit; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | = spip_connect_db($adresse_db, $port, $login_db, $pass_db, '', $server_db); |
| 48 | 48 | |
| 49 | 49 | $GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']] |
| 50 | - = $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']]; |
|
| 50 | + = $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']]; |
|
| 51 | 51 | |
| 52 | 52 | $fquery = sql_serveur('query', $server_db); |
| 53 | 53 | if ($choix_db == 'new_spip') { |
@@ -57,13 +57,13 @@ discard block |
||
| 57 | 57 | if (!$ok) { |
| 58 | 58 | $re = "Impossible de creer la base $re"; |
| 59 | 59 | $logger->info($re); |
| 60 | - return '<p>' . _T('avis_connexion_erreur_creer_base') . "</p><!--\n$re\n-->"; |
|
| 60 | + return '<p>'._T('avis_connexion_erreur_creer_base')."</p><!--\n$re\n-->"; |
|
| 61 | 61 | } |
| 62 | 62 | } else { |
| 63 | 63 | $re = "Le nom de la base doit correspondre a $re"; |
| 64 | 64 | $logger->info($re); |
| 65 | 65 | |
| 66 | - return '<p>' . _T('avis_connexion_erreur_nom_base') . "</p><!--\n$re\n-->"; |
|
| 66 | + return '<p>'._T('avis_connexion_erreur_nom_base')."</p><!--\n$re\n-->"; |
|
| 67 | 67 | } |
| 68 | 68 | } |
| 69 | 69 | |
@@ -74,14 +74,14 @@ discard block |
||
| 74 | 74 | = spip_connect_db($adresse_db, $port, $login_db, $pass_db, $sel_db, $server_db); |
| 75 | 75 | |
| 76 | 76 | $GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']] |
| 77 | - = $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']]; |
|
| 77 | + = $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']]; |
|
| 78 | 78 | |
| 79 | 79 | // Completer le tableau decrivant la connexion |
| 80 | 80 | |
| 81 | 81 | $GLOBALS['connexions'][$server_db]['prefixe'] = $table_prefix; |
| 82 | 82 | $GLOBALS['connexions'][$server_db]['db'] = $sel_db; |
| 83 | 83 | |
| 84 | - $old = sql_showbase($table_prefix . '_meta', $server_db); |
|
| 84 | + $old = sql_showbase($table_prefix.'_meta', $server_db); |
|
| 85 | 85 | if ($old) { |
| 86 | 86 | $old = sql_fetch($old, $server_db); |
| 87 | 87 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $charset['charset']; |
| 101 | 101 | $charsetbase = $charset['charset']; |
| 102 | 102 | } else { |
| 103 | - $logger->info(_DEFAULT_CHARSET . ' inconnu du serveur SQL'); |
|
| 103 | + $logger->info(_DEFAULT_CHARSET.' inconnu du serveur SQL'); |
|
| 104 | 104 | $charsetbase = 'standard'; |
| 105 | 105 | } |
| 106 | 106 | $logger->info("Creation des tables. Codage $charsetbase"); |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | if ($r) { |
| 151 | 151 | $r = sql_fetch($r, $server_db); |
| 152 | 152 | } |
| 153 | - $version_installee = $r ? (double)$r['valeur'] : 0; |
|
| 153 | + $version_installee = $r ? (double) $r['valeur'] : 0; |
|
| 154 | 154 | if (!$version_installee || $GLOBALS['spip_version_base'] < $version_installee) { |
| 155 | 155 | $fupdateq( |
| 156 | 156 | 'spip_meta', |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | '', |
| 160 | 160 | $server_db |
| 161 | 161 | ); |
| 162 | - $logger->info('nouvelle version installee: ' . $GLOBALS['spip_version_base']); |
|
| 162 | + $logger->info('nouvelle version installee: '.$GLOBALS['spip_version_base']); |
|
| 163 | 163 | } |
| 164 | 164 | // eliminer la derniere operation d'admin mal terminee |
| 165 | 165 | // notamment la mise a jour |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | if ($chmod_db) { |
| 187 | 187 | install_fichier_connexion( |
| 188 | 188 | _FILE_CHMOD_TMP, |
| 189 | - "if (!defined('_SPIP_CHMOD')) define('_SPIP_CHMOD', " . sprintf('0%3o', $chmod_db) . ");\n" |
|
| 189 | + "if (!defined('_SPIP_CHMOD')) define('_SPIP_CHMOD', ".sprintf('0%3o', $chmod_db).");\n" |
|
| 190 | 190 | ); |
| 191 | 191 | } |
| 192 | 192 | |
@@ -249,16 +249,16 @@ discard block |
||
| 249 | 249 | |
| 250 | 250 | |
| 251 | 251 | function install_premier_auteur($email, $login, $nom, #[\SensitiveParameter] $pass, $hidden, $auteur_obligatoire) { |
| 252 | - return info_progression_etape(3, 'etape_', 'install/') . |
|
| 252 | + return info_progression_etape(3, 'etape_', 'install/'). |
|
| 253 | 253 | info_etape( |
| 254 | 254 | _T('info_informations_personnelles'), |
| 255 | - '<b>' . _T('texte_informations_personnelles_1') . '</b>' . |
|
| 256 | - aider('install5', true) . |
|
| 257 | - '<p>' . |
|
| 255 | + '<b>'._T('texte_informations_personnelles_1').'</b>'. |
|
| 256 | + aider('install5', true). |
|
| 257 | + '<p>'. |
|
| 258 | 258 | ($auteur_obligatoire ? |
| 259 | 259 | '' |
| 260 | 260 | : |
| 261 | - _T('texte_informations_personnelles_2') . ' ' . _T('info_laisser_champs_vides') |
|
| 261 | + _T('texte_informations_personnelles_2').' '._T('info_laisser_champs_vides') |
|
| 262 | 262 | ) |
| 263 | 263 | ) |
| 264 | 264 | . generer_form_ecrire('install', ( |
@@ -268,12 +268,12 @@ discard block |
||
| 268 | 268 | _T('info_identification_publique'), |
| 269 | 269 | [ |
| 270 | 270 | 'nom' => [ |
| 271 | - 'label' => '<b>' . _T('entree_signature') . "</b><br />\n" . _T('entree_nom_pseudo_1') . "\n", |
|
| 271 | + 'label' => '<b>'._T('entree_signature')."</b><br />\n"._T('entree_nom_pseudo_1')."\n", |
|
| 272 | 272 | 'valeur' => $nom, |
| 273 | 273 | 'required' => $auteur_obligatoire, |
| 274 | 274 | ], |
| 275 | 275 | 'email' => [ |
| 276 | - 'label' => '<b>' . _T('entree_adresse_email') . "</b>\n", |
|
| 276 | + 'label' => '<b>'._T('entree_adresse_email')."</b>\n", |
|
| 277 | 277 | 'valeur' => $email, |
| 278 | 278 | ] |
| 279 | 279 | ] |
@@ -283,23 +283,23 @@ discard block |
||
| 283 | 283 | _T('entree_identifiants_connexion'), |
| 284 | 284 | [ |
| 285 | 285 | 'login' => [ |
| 286 | - 'label' => '<b>' . _T('entree_login') . "</b><br />\n" . _T( |
|
| 286 | + 'label' => '<b>'._T('entree_login')."</b><br />\n"._T( |
|
| 287 | 287 | 'info_login_trop_court_car_pluriel', |
| 288 | 288 | ['nb' => _LOGIN_TROP_COURT] |
| 289 | - ) . "\n", |
|
| 289 | + )."\n", |
|
| 290 | 290 | 'valeur' => $login, |
| 291 | 291 | 'required' => $auteur_obligatoire, |
| 292 | 292 | ], |
| 293 | 293 | 'pass' => [ |
| 294 | - 'label' => '<b>' . _T('entree_mot_passe') . "</b><br />\n" . _T( |
|
| 294 | + 'label' => '<b>'._T('entree_mot_passe')."</b><br />\n"._T( |
|
| 295 | 295 | 'info_passe_trop_court_car_pluriel', |
| 296 | 296 | ['nb' => _PASS_LONGUEUR_MINI] |
| 297 | - ) . "\n", |
|
| 297 | + )."\n", |
|
| 298 | 298 | 'valeur' => $pass, |
| 299 | 299 | 'required' => $auteur_obligatoire, |
| 300 | 300 | ], |
| 301 | 301 | 'pass_verif' => [ |
| 302 | - 'label' => '<b>' . _T('info_confirmer_passe') . "</b><br />\n", |
|
| 302 | + 'label' => '<b>'._T('info_confirmer_passe')."</b><br />\n", |
|
| 303 | 303 | 'valeur' => $pass, |
| 304 | 304 | 'required' => $auteur_obligatoire, |
| 305 | 305 | ] |
@@ -343,9 +343,9 @@ discard block |
||
| 343 | 343 | |
| 344 | 344 | if ($res) { |
| 345 | 345 | $res = info_progression_etape(2, 'etape_', 'install/', true) |
| 346 | - . "<div class='error'><h3>" . _T('avis_operation_echec') . '</h3>' |
|
| 346 | + . "<div class='error'><h3>"._T('avis_operation_echec').'</h3>' |
|
| 347 | 347 | . $res |
| 348 | - . '<p>' . _T('texte_operation_echec') . '</p>' |
|
| 348 | + . '<p>'._T('texte_operation_echec').'</p>' |
|
| 349 | 349 | . '</div>'; |
| 350 | 350 | } |
| 351 | 351 | } else { |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | |
| 370 | 370 | $hidden = predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db) |
| 371 | 371 | . (defined('_INSTALL_NAME_DB') ? '' |
| 372 | - : "\n<input type='hidden' name='sel_db' value=\"" . spip_htmlspecialchars($sel_db) . '" />'); |
|
| 372 | + : "\n<input type='hidden' name='sel_db' value=\"".spip_htmlspecialchars($sel_db).'" />'); |
|
| 373 | 373 | |
| 374 | 374 | $auteur_obligatoire = ($ldap_present ? 0 : !sql_countsel('spip_auteurs', '', '', '', $server_db)); |
| 375 | 375 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | } else { |
| 80 | 80 | // Preparer l'appel de la fonction principale du squelette |
| 81 | 81 | |
| 82 | - spip_timer($a = 'calcul page ' . random_int(0, 1000)); |
|
| 82 | + spip_timer($a = 'calcul page '.random_int(0, 1000)); |
|
| 83 | 83 | |
| 84 | 84 | // On cree un marqueur de notes unique lie a cette composition |
| 85 | 85 | // et on enregistre l'etat courant des globales de notes... |
@@ -111,8 +111,8 @@ discard block |
||
| 111 | 111 | try { |
| 112 | 112 | $page = $fonc(['cache' => $cache], [$contexte]); |
| 113 | 113 | } catch (Throwable $e) { |
| 114 | - $msg = _T('zbug_erreur_execution_page') . " $sourcefile"; |
|
| 115 | - $full_msg = $msg . ' | File ' . $e->getFile() . ' Line ' . $e->getLine() . ' : ' . $e->getMessage(); |
|
| 114 | + $msg = _T('zbug_erreur_execution_page')." $sourcefile"; |
|
| 115 | + $full_msg = $msg.' | File '.$e->getFile().' Line '.$e->getLine().' : '.$e->getMessage(); |
|
| 116 | 116 | $full_msg = str_replace(_ROOT_RACINE, '[…]/', $full_msg); |
| 117 | 117 | $corps = "<pre>$msg</pre>"; |
| 118 | 118 | $page = analyse_resultat_skel($fond, ['cache' => $cache], $corps, $sourcefile); |
@@ -143,17 +143,17 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | $profile = spip_timer($a); |
| 145 | 145 | spip_logger()->info("calcul ($profile) [$skel] $infos" |
| 146 | - . ' (' . strlen((string) $page['texte']) . ' octets)'); |
|
| 146 | + . ' ('.strlen((string) $page['texte']).' octets)'); |
|
| 147 | 147 | |
| 148 | 148 | if (defined('_CALCUL_PROFILER') && (int) $profile > _CALCUL_PROFILER) { |
| 149 | 149 | spip_logger('profiler')->notice("calcul ($profile) [$skel] $infos" |
| 150 | - . ' (' . strlen((string) $page['texte']) . ' octets) | ' . $_SERVER['REQUEST_URI']); |
|
| 150 | + . ' ('.strlen((string) $page['texte']).' octets) | '.$_SERVER['REQUEST_URI']); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | if ($debug) { |
| 154 | 154 | // si c'est ce que demande le debusqueur, lui passer la main |
| 155 | 155 | $t = strlen((string) $page['texte']) ? $page['texte'] : ' '; |
| 156 | - $GLOBALS['debug_objets']['resultat'][$fonc . 'tout'] = $t; |
|
| 156 | + $GLOBALS['debug_objets']['resultat'][$fonc.'tout'] = $t; |
|
| 157 | 157 | $GLOBALS['debug_objets']['courant'] = $courant; |
| 158 | 158 | $GLOBALS['debug_objets']['profile'][$sourcefile] = $profile; |
| 159 | 159 | if ( |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | if (defined('_VAR_INCLURE') && _VAR_INCLURE) { |
| 185 | 185 | $page['sourcefile'] = $sourcefile; |
| 186 | 186 | $page['texte'] = |
| 187 | - "<div class='inclure_blocs'><h6>" . $page['sourcefile'] . '</h6>' . $page['texte'] . '</div>' |
|
| 187 | + "<div class='inclure_blocs'><h6>".$page['sourcefile'].'</h6>'.$page['texte'].'</div>' |
|
| 188 | 188 | . ($js_inclus ? '' : "<script type='text/javascript'>jQuery(function(){jQuery('.inclure_blocs > h6:first-child').hover(function(){jQuery(this).parent().addClass('hover')},function(){jQuery(this).parent().removeClass('hover')})});</script>"); |
| 189 | 189 | $js_inclus = true; |
| 190 | 190 | } |
@@ -221,14 +221,14 @@ discard block |
||
| 221 | 221 | $val = ''; |
| 222 | 222 | } elseif (is_array($val)) { |
| 223 | 223 | if ($profondeur_max > 0) { |
| 224 | - $val = 'array:' . count($val) . '(' . presenter_contexte($val, $profondeur_max - 1, 3) . ')'; |
|
| 224 | + $val = 'array:'.count($val).'('.presenter_contexte($val, $profondeur_max - 1, 3).')'; |
|
| 225 | 225 | } else { |
| 226 | - $val = 'array:' . count($val); |
|
| 226 | + $val = 'array:'.count($val); |
|
| 227 | 227 | } |
| 228 | 228 | } elseif (is_object($val)) { |
| 229 | 229 | $val = $val::class; |
| 230 | 230 | } elseif (strlen("$val") > 30) { |
| 231 | - $val = substr("$val", 0, 29) . '…'; |
|
| 231 | + $val = substr("$val", 0, 29).'…'; |
|
| 232 | 232 | if (strstr($val, ' ')) { |
| 233 | 233 | $val = "'$val'"; |
| 234 | 234 | } |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | } elseif (!strlen((string) $val)) { |
| 238 | 238 | $val = "''"; |
| 239 | 239 | } |
| 240 | - $infos[] = $var . '=' . $val; |
|
| 240 | + $infos[] = $var.'='.$val; |
|
| 241 | 241 | } |
| 242 | 242 | return implode(', ', $infos); |
| 243 | 243 | } |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | . "?php include_spip('inc/headers');redirige_par_entete('" |
| 306 | 306 | . texte_script($url) |
| 307 | 307 | . "','',$status);" |
| 308 | - . '?' . '>', |
|
| 308 | + . '?'.'>', |
|
| 309 | 309 | 'process_ins' => 'php', |
| 310 | 310 | 'status' => $status |
| 311 | 311 | ]; |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $select = true |
| 127 | 127 | ) { |
| 128 | 128 | if (!is_string($defaut)) { |
| 129 | - $defaut = '($Pile[0][\'' . strtolower($nom_champ) . '\'] ?? null)'; |
|
| 129 | + $defaut = '($Pile[0][\''.strtolower($nom_champ).'\'] ?? null)'; |
|
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | $idb_origine = $idb; |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | // renseigner la boucle source de ce champ pour les traitements |
| 161 | 161 | $boucles[$idb_origine]->index_champ[$nom_champ_origine] = $idb; |
| 162 | - $champ = '$Pile[$SP' . ($i ? "-$i" : '') . '][\'' . $c . '\']'; |
|
| 162 | + $champ = '$Pile[$SP'.($i ? "-$i" : '').'][\''.$c.'\']'; |
|
| 163 | 163 | if (!$joker) { |
| 164 | 164 | return index_compose($conditionnel, $champ); |
| 165 | 165 | } |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | function index_compose($conditionnel, $defaut) { |
| 201 | 201 | while ($c = array_pop($conditionnel)) { |
| 202 | 202 | // si on passe defaut = '', ne pas générer d'erreur de compilation. |
| 203 | - $defaut = "($c:(" . ($defaut ?: "''") . '))'; |
|
| 203 | + $defaut = "($c:(".($defaut ?: "''").'))'; |
|
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | return $defaut; |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | if (!$r) { |
| 248 | 248 | $joker = false; // indiquer a l'appelant |
| 249 | 249 | # continuer pour chercher l'erreur suivante |
| 250 | - return ["'#" . $r . ':' . $nom_champ . "'", '']; |
|
| 250 | + return ["'#".$r.':'.$nom_champ."'", '']; |
|
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | $desc = $boucles[$idb]->show; |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | if (preg_match('/^(.*)\.(.*)$/', $nom_champ, $r)) { |
| 291 | 291 | [, $_table, $_nom_champ] = $r; |
| 292 | 292 | if ($cle = trouver_jointure_champ($_nom_champ, $boucles[$idb], [$_table])) { |
| 293 | - $_alias = $cle . '_' . $_nom_champ; |
|
| 293 | + $_alias = $cle.'_'.$_nom_champ; |
|
| 294 | 294 | return index_exception( |
| 295 | 295 | $boucles[$idb], |
| 296 | 296 | $desc, |
@@ -371,8 +371,8 @@ discard block |
||
| 371 | 371 | $t = $index_exception_derogatoire($boucle, $desc, $nom_champ, $excep); |
| 372 | 372 | } |
| 373 | 373 | if ($t == null) { |
| 374 | - [$e, $x] = $excep; #PHP4 affecte de gauche a droite |
|
| 375 | - $excep = $x; #PHP5 de droite a gauche ! |
|
| 374 | + [$e, $x] = $excep; #PHP4 affecte de gauche a droite |
|
| 375 | + $excep = $x; #PHP5 de droite a gauche ! |
|
| 376 | 376 | $j = $trouver_table($e, $boucle->sql_serveur); |
| 377 | 377 | if (!$j) { |
| 378 | 378 | return ['', '']; |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | $l = (preg_split('/\s*,\s*/', $k)); |
| 385 | 385 | $k = $desc['key']['PRIMARY KEY']; |
| 386 | 386 | if (!in_array($k, $l)) { |
| 387 | - spip_logger()->info("jointure impossible $e " . implode(',', $l)); |
|
| 387 | + spip_logger()->info("jointure impossible $e ".implode(',', $l)); |
|
| 388 | 388 | |
| 389 | 389 | return ['', '']; |
| 390 | 390 | } |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | // demander a SQL de gerer le synonyme |
| 401 | 401 | // ca permet que excep soit dynamique (Cedric, 2/3/06) |
| 402 | 402 | if ($excep != $nom_champ) { |
| 403 | - $excep .= ' AS ' . $nom_champ; |
|
| 403 | + $excep .= ' AS '.$nom_champ; |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | return ["$t.$excep", $nom_champ]; |
@@ -648,7 +648,7 @@ discard block |
||
| 648 | 648 | implode(',', $collecte), |
| 649 | 649 | ($collecte ? $param : substr($param, 1)), # virer la virgule |
| 650 | 650 | memoriser_contexte_compil($p), |
| 651 | - ($supp ? ', ' . implode(',', $supp) : ('')) |
|
| 651 | + ($supp ? ', '.implode(',', $supp) : ('')) |
|
| 652 | 652 | ); |
| 653 | 653 | |
| 654 | 654 | $p->interdire_scripts = false; |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | * @return array |
| 683 | 683 | * Liste des codes PHP d'éxecution des balises collectées |
| 684 | 684 | **/ |
| 685 | -function collecter_balise_dynamique(array $l, Champ &$p, string $nom): array { |
|
| 685 | +function collecter_balise_dynamique(array $l, Champ & $p, string $nom): array { |
|
| 686 | 686 | $args = []; |
| 687 | 687 | foreach ($l as $c) { |
| 688 | 688 | if ($c === null) { |
@@ -747,7 +747,7 @@ discard block |
||
| 747 | 747 | $nom = $p->id_boucle; |
| 748 | 748 | |
| 749 | 749 | if ($nom && trouver_nom_serveur_distant($p)) { |
| 750 | - spip_logger()->info($nom . ':' . $p->nom_champ . ' ' . _T('zbug_distant_interdit')); |
|
| 750 | + spip_logger()->info($nom.':'.$p->nom_champ.' '._T('zbug_distant_interdit')); |
|
| 751 | 751 | |
| 752 | 752 | return false; |
| 753 | 753 | } |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | && $p->descr['documents'] |
| 824 | 824 | && (str_contains($ps, 'propre') || str_contains($ps, 'typo')) |
| 825 | 825 | ) { |
| 826 | - $ps = 'traiter_doublons_documents($doublons, ' . $ps . ')'; |
|
| 826 | + $ps = 'traiter_doublons_documents($doublons, '.$ps.')'; |
|
| 827 | 827 | } |
| 828 | 828 | |
| 829 | 829 | // La protection des champs par |safehtml est assuree par les extensions |
@@ -926,7 +926,7 @@ discard block |
||
| 926 | 926 | function compose_filtres_args($p, $args, $sep) { |
| 927 | 927 | $arglist = ''; |
| 928 | 928 | foreach ($args as $arg) { |
| 929 | - $arglist .= $sep . |
|
| 929 | + $arglist .= $sep. |
|
| 930 | 930 | calculer_liste($arg, $p->descr, $p->boucles, $p->id_boucle); |
| 931 | 931 | } |
| 932 | 932 | |
@@ -976,7 +976,7 @@ discard block |
||
| 976 | 976 | while ($b != '') { |
| 977 | 977 | foreach ($p->boucles[$b]->criteres as $critere) { |
| 978 | 978 | if ($critere->op == $motif) { |
| 979 | - $p->code = '$Pile[$SP' . (($n == 0) ? '' : "-$n") . |
|
| 979 | + $p->code = '$Pile[$SP'.(($n == 0) ? '' : "-$n"). |
|
| 980 | 980 | "]['$champ']"; |
| 981 | 981 | $b = ''; |
| 982 | 982 | break 2; |
@@ -1004,6 +1004,6 @@ discard block |
||
| 1004 | 1004 | */ |
| 1005 | 1005 | function zbug_presenter_champ($p, $champ = '') { |
| 1006 | 1006 | $balise = $champ ?: $p->nom_champ; |
| 1007 | - $explicite = $p->nom_boucle ? $p->nom_boucle . ':' : ''; |
|
| 1007 | + $explicite = $p->nom_boucle ? $p->nom_boucle.':' : ''; |
|
| 1008 | 1008 | return "#{$explicite}{$balise}"; |
| 1009 | 1009 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | function cache_key(array $contexte, array $page): string { |
| 34 | 34 | static $hasher = null; |
| 35 | 35 | $hasher ??= new Hash32(); |
| 36 | - return $hasher->hash([$contexte, $page]) . '.cache'; |
|
| 36 | + return $hasher->hash([$contexte, $page]).'.cache'; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -62,12 +62,12 @@ discard block |
||
| 62 | 62 | include_spip('inc/acces'); |
| 63 | 63 | ecrire_meta( |
| 64 | 64 | 'cache_signature', |
| 65 | - hash('sha256', $_SERVER['DOCUMENT_ROOT'] . ($_SERVER['SERVER_SIGNATURE'] ?? '') . creer_uniqid()), |
|
| 65 | + hash('sha256', $_SERVER['DOCUMENT_ROOT'].($_SERVER['SERVER_SIGNATURE'] ?? '').creer_uniqid()), |
|
| 66 | 66 | 'non' |
| 67 | 67 | ); |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - return (new Hash32())->hash($GLOBALS['meta']['cache_signature'] . $page['texte']); |
|
| 70 | + return (new Hash32())->hash($GLOBALS['meta']['cache_signature'].$page['texte']); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | // "cache sessionne" ; sa date indique la date de validite |
| 214 | 214 | // des caches sessionnes |
| 215 | 215 | if (!$tmp = lire_cache($cache_key)) { |
| 216 | - spip_logger()->info('Creation cache sessionne ' . $cache_key); |
|
| 216 | + spip_logger()->info('Creation cache sessionne '.$cache_key); |
|
| 217 | 217 | $tmp = [ |
| 218 | 218 | 'invalideurs' => ['session' => ''], |
| 219 | 219 | 'lastmodified' => $_SERVER['REQUEST_TIME'] |
@@ -239,8 +239,8 @@ discard block |
||
| 239 | 239 | // l'enregistrer, compresse ou non... |
| 240 | 240 | $ok = ecrire_cache($cache_key, $pagez); |
| 241 | 241 | |
| 242 | - spip_logger()->info((_IS_BOT ? 'Bot:' : '') . "Creation du cache $cache_key pour " |
|
| 243 | - . $page['entetes']['X-Spip-Cache'] . ' secondes' . ($ok ? '' : ' (erreur!)')); |
|
| 242 | + spip_logger()->info((_IS_BOT ? 'Bot:' : '')."Creation du cache $cache_key pour " |
|
| 243 | + . $page['entetes']['X-Spip-Cache'].' secondes'.($ok ? '' : ' (erreur!)')); |
|
| 244 | 244 | |
| 245 | 245 | // Inserer ses invalideurs |
| 246 | 246 | include_spip('inc/invalideur'); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | if (!$fonc) { |
| 147 | 147 | $fonc = $GLOBALS['debug_objets']['principal']; |
| 148 | 148 | } |
| 149 | - $titre = $mode ? $mode . (isset($GLOBALS['debug_objets']['sourcefile'][$fonc]) ? ' ' . $GLOBALS['debug_objets']['sourcefile'][$fonc] : '') : ($fonc); |
|
| 149 | + $titre = $mode ? $mode.(isset($GLOBALS['debug_objets']['sourcefile'][$fonc]) ? ' '.$GLOBALS['debug_objets']['sourcefile'][$fonc] : '') : ($fonc); |
|
| 150 | 150 | } |
| 151 | 151 | if ($message === false) { |
| 152 | 152 | lang_select(); |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | $fond = $GLOBALS['fond'] ?? ''; |
| 170 | 170 | // une erreur critique sort $message en array |
| 171 | 171 | $debug = is_array($msg) ? $msg[1] : $msg; |
| 172 | - spip_logger()->info('Debug: ' . $debug . ' (' . $fond . ')'); |
|
| 172 | + spip_logger()->info('Debug: '.$debug.' ('.$fond.')'); |
|
| 173 | 173 | |
| 174 | 174 | return $msg; |
| 175 | 175 | } |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | function debusquer_bandeau($erreurs) { |
| 178 | 178 | |
| 179 | 179 | if (!empty($erreurs)) { |
| 180 | - $n = [(is_countable($erreurs) ? count($erreurs) : 0) . ' ' . _T('zbug_erreur_squelette')]; |
|
| 180 | + $n = [(is_countable($erreurs) ? count($erreurs) : 0).' '._T('zbug_erreur_squelette')]; |
|
| 181 | 181 | |
| 182 | 182 | return debusquer_navigation($erreurs, $n); |
| 183 | 183 | } elseif (!empty($GLOBALS['tableau_des_temps'])) { |
@@ -210,25 +210,25 @@ discard block |
||
| 210 | 210 | $valeur_simple = []; |
| 211 | 211 | foreach ($valeur as $v) { |
| 212 | 212 | if (is_array($v)) { |
| 213 | - $valeur_simple[] = 'array:' . count($v); |
|
| 213 | + $valeur_simple[] = 'array:'.count($v); |
|
| 214 | 214 | } elseif (is_object($v)) { |
| 215 | 215 | $valeur_simple[] = $v::class; |
| 216 | 216 | } elseif (is_string($v)) { |
| 217 | - $valeur_simple[] = "'" . $v . "'"; |
|
| 217 | + $valeur_simple[] = "'".$v."'"; |
|
| 218 | 218 | } else { |
| 219 | 219 | $valeur_simple[] = $v; |
| 220 | 220 | } |
| 221 | 221 | } |
| 222 | 222 | $n = count($valeur); |
| 223 | - $valeur = (($n > 3) ? 'array:' . $n . ' ' : ''); |
|
| 224 | - $valeur .= '[' . implode(', ', $valeur_simple) . ']'; |
|
| 223 | + $valeur = (($n > 3) ? 'array:'.$n.' ' : ''); |
|
| 224 | + $valeur .= '['.implode(', ', $valeur_simple).']'; |
|
| 225 | 225 | } elseif (is_object($valeur)) { |
| 226 | 226 | $valeur = $valeur::class; |
| 227 | 227 | } elseif (is_string($valeur)) { |
| 228 | - $valeur = "'" . $valeur . "'"; |
|
| 228 | + $valeur = "'".$valeur."'"; |
|
| 229 | 229 | } |
| 230 | - $res .= "\n<tr><td><strong>" . nl2br((string) entites_html($nom)) |
|
| 231 | - . '</strong></td><td>: ' . nl2br((string) entites_html($valeur)) |
|
| 230 | + $res .= "\n<tr><td><strong>".nl2br((string) entites_html($nom)) |
|
| 231 | + . '</strong></td><td>: '.nl2br((string) entites_html($valeur)) |
|
| 232 | 232 | . "</td></tr>\n"; |
| 233 | 233 | } |
| 234 | 234 | |
@@ -278,10 +278,10 @@ discard block |
||
| 278 | 278 | $nom_code = $lieu->descr['nom']; |
| 279 | 279 | $skel = $lieu->descr['sourcefile']; |
| 280 | 280 | $h2 = parametre_url($href, 'var_mode_objet', $nom_code); |
| 281 | - $h3 = parametre_url($h2, 'var_mode_affiche', 'squelette') . '#L' . $ligne; |
|
| 281 | + $h3 = parametre_url($h2, 'var_mode_affiche', 'squelette').'#L'.$ligne; |
|
| 282 | 282 | $skel = "<a href='$h3'><b>$skel</b></a>"; |
| 283 | 283 | if ($boucle) { |
| 284 | - $h3 = parametre_url($h2 . $boucle, 'var_mode_affiche', 'boucle'); |
|
| 284 | + $h3 = parametre_url($h2.$boucle, 'var_mode_affiche', 'boucle'); |
|
| 285 | 285 | $boucle = "<a href='$h3'><b>$boucle</b></a>"; |
| 286 | 286 | } |
| 287 | 287 | } |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | } |
| 371 | 371 | |
| 372 | 372 | // Requete erronee |
| 373 | - $err = '<b>' . _T('avis_erreur_mysql') . " $errno</b><br /><tt>\n" |
|
| 373 | + $err = '<b>'._T('avis_erreur_mysql')." $errno</b><br /><tt>\n" |
|
| 374 | 374 | . spip_htmlspecialchars($msg) |
| 375 | 375 | . "\n<br /><span style='color: red'><b>" |
| 376 | 376 | . spip_htmlspecialchars($query) |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | |
| 385 | 385 | function trouve_boucle_debug($n, $nom, $debut = 0, $boucle = '') { |
| 386 | 386 | |
| 387 | - $id = $nom . $boucle; |
|
| 387 | + $id = $nom.$boucle; |
|
| 388 | 388 | if (is_array($GLOBALS['debug_objets']['sequence'][$id])) { |
| 389 | 389 | foreach ($GLOBALS['debug_objets']['sequence'][$id] as $v) { |
| 390 | 390 | if (!preg_match('/^(.*)(<\?.*\?>)(.*)$/s', (string) $v[0], $r)) { |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | ) { |
| 433 | 433 | $reg[1] = 'inconnu'; |
| 434 | 434 | } |
| 435 | - $incl = ',' . $reg[1] . '[.]\w$,'; |
|
| 435 | + $incl = ','.$reg[1].'[.]\w$,'; |
|
| 436 | 436 | |
| 437 | 437 | foreach ($GLOBALS['debug_objets']['sourcefile'] as $k => $v) { |
| 438 | 438 | if (preg_match($incl, (string) $v)) { |
@@ -448,16 +448,14 @@ discard block |
||
| 448 | 448 | |
| 449 | 449 | if (!$boucle) { |
| 450 | 450 | return $ligne |
| 451 | - ? ' (' . |
|
| 452 | - (($nom != $skel) ? _T('squelette_inclus_ligne') : |
|
| 453 | - _T('squelette_ligne')) . |
|
| 451 | + ? ' ('. |
|
| 452 | + (($nom != $skel) ? _T('squelette_inclus_ligne') : _T('squelette_ligne')). |
|
| 454 | 453 | " <a href='$self&var_mode_objet=$skel&var_mode_affiche=squelette&var_mode_ligne=$ligne#L$ligne'>$ligne</a>)" |
| 455 | 454 | : ''; |
| 456 | 455 | } else { |
| 457 | 456 | $self .= "&var_mode_objet=$skel$boucle&var_mode_affiche=boucle"; |
| 458 | 457 | |
| 459 | - return $ligne ? " (boucle $boucle ligne\n<a href='$self&var_mode_ligne=$ligne#L$ligne'>$ligne</a>)" : |
|
| 460 | - " (boucle\n<a href='$self#$skel$boucle'>$boucle</a>)"; |
|
| 458 | + return $ligne ? " (boucle $boucle ligne\n<a href='$self&var_mode_ligne=$ligne#L$ligne'>$ligne</a>)" : " (boucle\n<a href='$self#$skel$boucle'>$boucle</a>)"; |
|
| 461 | 459 | } |
| 462 | 460 | } |
| 463 | 461 | |
@@ -479,14 +477,14 @@ discard block |
||
| 479 | 477 | |
| 480 | 478 | $s = preg_replace( |
| 481 | 479 | ',<(\w[^<>]*)>([^<]*)<br />([^<]*)</\1>,', |
| 482 | - '<\1>\2</\1><br />' . "\n" . '<\1>\3</\1>', |
|
| 480 | + '<\1>\2</\1><br />'."\n".'<\1>\3</\1>', |
|
| 483 | 481 | $s |
| 484 | 482 | ); |
| 485 | 483 | |
| 486 | 484 | |
| 487 | 485 | $tableau = explode('<br />', $s); |
| 488 | 486 | |
| 489 | - $format = "<span style='float:left;display:block;width:50px;height:1px'><a id='L%d' style='background-color: white; visibility: " . ($nocpt ? 'hidden' : 'visible') . ";%s' href='#T%s' title=\"%s\">%0" . (string) @strlen(count($tableau)) . "d</a></span> %s<br />\n"; |
|
| 487 | + $format = "<span style='float:left;display:block;width:50px;height:1px'><a id='L%d' style='background-color: white; visibility: ".($nocpt ? 'hidden' : 'visible').";%s' href='#T%s' title=\"%s\">%0".(string) @strlen(count($tableau))."d</a></span> %s<br />\n"; |
|
| 490 | 488 | |
| 491 | 489 | $format10 = str_replace('white', 'lightgrey', $format); |
| 492 | 490 | $formaterr = 'color: red;'; |
@@ -530,7 +528,7 @@ discard block |
||
| 530 | 528 | . '" style="cursor: pointer;">' |
| 531 | 529 | . ($nocpt ? '' : _T('info_numero_abbreviation')) |
| 532 | 530 | . '</div> |
| 533 | - ' . $res . "</div>\n"; |
|
| 531 | + ' . $res."</div>\n"; |
|
| 534 | 532 | } |
| 535 | 533 | |
| 536 | 534 | // l'environnement graphique du debuggueur |
@@ -552,14 +550,14 @@ discard block |
||
| 552 | 550 | if (!empty($GLOBALS['debug_objets'][$mode][$fonc])) { |
| 553 | 551 | [$legend, $texte, $res2] = debusquer_source($fonc, $mode); |
| 554 | 552 | $texte .= $res2; |
| 555 | - } elseif (!empty($GLOBALS['debug_objets'][$mode][$fonc . 'tout'])) { |
|
| 556 | - $legend = _T('zbug_' . $mode); |
|
| 557 | - $texte = $GLOBALS['debug_objets'][$mode][$fonc . 'tout']; |
|
| 553 | + } elseif (!empty($GLOBALS['debug_objets'][$mode][$fonc.'tout'])) { |
|
| 554 | + $legend = _T('zbug_'.$mode); |
|
| 555 | + $texte = $GLOBALS['debug_objets'][$mode][$fonc.'tout']; |
|
| 558 | 556 | $texte = ancre_texte($texte, ['', '']); |
| 559 | 557 | } |
| 560 | 558 | } else { |
| 561 | 559 | if (strlen(trim($res))) { |
| 562 | - return "<img src='" . chemin_image('debug-xx.svg') . "' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res</div>"; |
|
| 560 | + return "<img src='".chemin_image('debug-xx.svg')."' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res</div>"; |
|
| 563 | 561 | } else { |
| 564 | 562 | // cas de l'appel sur erreur: montre la page |
| 565 | 563 | return $GLOBALS['debug_objets']['resultat']['tout'] ?? ''; |
@@ -567,7 +565,7 @@ discard block |
||
| 567 | 565 | } |
| 568 | 566 | } else { |
| 569 | 567 | $valider = charger_fonction('valider', 'xml'); |
| 570 | - $val = $valider($GLOBALS['debug_objets']['validation'][$fonc . 'tout']); |
|
| 568 | + $val = $valider($GLOBALS['debug_objets']['validation'][$fonc.'tout']); |
|
| 571 | 569 | // Si erreur, signaler leur nombre dans le formulaire admin |
| 572 | 570 | $GLOBALS['debug_objets']['validation'] = $val->err ? count($val->err) : ''; |
| 573 | 571 | [$texte, $err] = emboite_texte($val, $fonc, $self); |
@@ -578,14 +576,14 @@ discard block |
||
| 578 | 576 | } else { |
| 579 | 577 | $err = ": $err"; |
| 580 | 578 | } |
| 581 | - $legend = _T('validation') . ' ' . $err; |
|
| 579 | + $legend = _T('validation').' '.$err; |
|
| 582 | 580 | $res = $id = ''; |
| 583 | 581 | } |
| 584 | 582 | |
| 585 | 583 | return trim((string) $texte) |
| 586 | - ? "<img src='" . chemin_image('debug-xx.svg') . "' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res" |
|
| 584 | + ? "<img src='".chemin_image('debug-xx.svg')."' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res" |
|
| 587 | 585 | . "<div id='debug_boucle'><fieldset$id><legend>" |
| 588 | - . "<a href='" . $self . '#f_' . substr((string) $fonc, 0, 37) . "'> ↑ " |
|
| 586 | + . "<a href='".$self.'#f_'.substr((string) $fonc, 0, 37)."'> ↑ " |
|
| 589 | 587 | . ($legend ?: $mode) |
| 590 | 588 | . '</a></legend>' |
| 591 | 589 | . $texte |
@@ -597,7 +595,7 @@ discard block |
||
| 597 | 595 | |
| 598 | 596 | function emboite_texte($res, $fonc = '', $self = '') { |
| 599 | 597 | $errs = $res->err; |
| 600 | - $texte = $res->entete . ($errs ? '' : $res->page); |
|
| 598 | + $texte = $res->entete.($errs ? '' : $res->page); |
|
| 601 | 599 | |
| 602 | 600 | if (!$texte && !$errs) { |
| 603 | 601 | return [ancre_texte('', ['', '']), false]; |
@@ -653,7 +651,7 @@ discard block |
||
| 653 | 651 | $err = "<h2 style='text-align: center'>" |
| 654 | 652 | . $i |
| 655 | 653 | . "<a href='#fin_err'>" |
| 656 | - . ' ' . _T('erreur_texte') |
|
| 654 | + . ' '._T('erreur_texte') |
|
| 657 | 655 | . "</a></h2><table id='debut_err' style='width: 100%'>" |
| 658 | 656 | . $err |
| 659 | 657 | . " </table><a id='fin_err'></a>"; |
@@ -663,9 +661,9 @@ discard block |
||
| 663 | 661 | [$msg, $fermant, $ouvrant] = $errs[0]; |
| 664 | 662 | $rf = reference_boucle_debug($fermant, $fonc, $self); |
| 665 | 663 | $ro = reference_boucle_debug($ouvrant, $fonc, $self); |
| 666 | - $err = $msg . |
|
| 667 | - "<a href='#L" . $fermant . "'>$fermant</a>$rf<br />" . |
|
| 668 | - "<a href='#L" . $ouvrant . "'>$ouvrant</a>$ro"; |
|
| 664 | + $err = $msg. |
|
| 665 | + "<a href='#L".$fermant."'>$fermant</a>$rf<br />". |
|
| 666 | + "<a href='#L".$ouvrant."'>$ouvrant</a>$ro"; |
|
| 669 | 667 | |
| 670 | 668 | return [ancre_texte($texte, [[$ouvrant], [$fermant]]), $err]; |
| 671 | 669 | } |
@@ -698,7 +696,7 @@ discard block |
||
| 698 | 696 | ['time' => $GLOBALS['debug_objets']['profile'][$sourcefile]] |
| 699 | 697 | ) : ''; |
| 700 | 698 | |
| 701 | - $res .= "<fieldset id='f_" . $nom . "'><legend>" |
|
| 699 | + $res .= "<fieldset id='f_".$nom."'><legend>" |
|
| 702 | 700 | . $t_skel |
| 703 | 701 | . ' ' |
| 704 | 702 | . $sourcefile |
@@ -713,7 +711,7 @@ discard block |
||
| 713 | 711 | . "'>" |
| 714 | 712 | . _T('zbug_calcul') |
| 715 | 713 | . '</a></legend>' |
| 716 | - . ($temps ? "\n<span style='display:block;float:" . $GLOBALS['spip_lang_right'] . "'>$temps</span><br />" : ('')) |
|
| 714 | + . ($temps ? "\n<span style='display:block;float:".$GLOBALS['spip_lang_right']."'>$temps</span><br />" : ('')) |
|
| 717 | 715 | . debusquer_contexte($contexte[$sourcefile]) |
| 718 | 716 | . ($nav ? "<table width='100%'>\n$nav</table>\n" : ('')) |
| 719 | 717 | . "</fieldset>\n"; |
@@ -734,33 +732,33 @@ discard block |
||
| 734 | 732 | $nom = $boucle->id_boucle; |
| 735 | 733 | $req = $boucle->type_requete; |
| 736 | 734 | $crit = public_decompiler($boucle, $gram, 0, 'criteres'); |
| 737 | - $self2 = $self . '&var_mode_objet=' . $objet; |
|
| 738 | - |
|
| 739 | - $res .= "\n<tr style='background-color: " . |
|
| 740 | - ($i % 2 ? '#e0e0f0' : '#f8f8ff') . |
|
| 741 | - "'><td align='right'>$i</td><td>\n" . |
|
| 742 | - "<a class='debug_link_boucle' href='" . |
|
| 743 | - $self2 . |
|
| 744 | - "&var_mode_affiche=boucle#f_$nom_skel'>" . |
|
| 745 | - _T('zbug_boucle') . |
|
| 746 | - "</a></td><td>\n<a class='debug_link_boucle' href='" . |
|
| 747 | - $self2 . |
|
| 748 | - "&var_mode_affiche=resultat#f_$nom_skel'>" . |
|
| 749 | - _T('zbug_resultat') . |
|
| 750 | - "</a></td><td>\n<a class='debug_link_resultat' href='" . |
|
| 751 | - $self2 . |
|
| 752 | - "&var_mode_affiche=code#f_$nom_skel'>" . |
|
| 753 | - _T('zbug_code') . |
|
| 754 | - "</a></td><td>\n<a class='debug_link_resultat' href='" . |
|
| 755 | - str_replace('var_mode=', 'var_profile=', $self2) . |
|
| 756 | - "'>" . |
|
| 757 | - _T('zbug_calcul') . |
|
| 758 | - "</a></td><td>\n" . |
|
| 759 | - (($var_mode_objet == $objet) ? "<b>$nom</b>" : $nom) . |
|
| 760 | - "</td><td>\n" . |
|
| 761 | - $req . |
|
| 762 | - "</td><td>\n" . |
|
| 763 | - spip_htmlspecialchars($crit) . |
|
| 735 | + $self2 = $self.'&var_mode_objet='.$objet; |
|
| 736 | + |
|
| 737 | + $res .= "\n<tr style='background-color: ". |
|
| 738 | + ($i % 2 ? '#e0e0f0' : '#f8f8ff'). |
|
| 739 | + "'><td align='right'>$i</td><td>\n". |
|
| 740 | + "<a class='debug_link_boucle' href='". |
|
| 741 | + $self2. |
|
| 742 | + "&var_mode_affiche=boucle#f_$nom_skel'>". |
|
| 743 | + _T('zbug_boucle'). |
|
| 744 | + "</a></td><td>\n<a class='debug_link_boucle' href='". |
|
| 745 | + $self2. |
|
| 746 | + "&var_mode_affiche=resultat#f_$nom_skel'>". |
|
| 747 | + _T('zbug_resultat'). |
|
| 748 | + "</a></td><td>\n<a class='debug_link_resultat' href='". |
|
| 749 | + $self2. |
|
| 750 | + "&var_mode_affiche=code#f_$nom_skel'>". |
|
| 751 | + _T('zbug_code'). |
|
| 752 | + "</a></td><td>\n<a class='debug_link_resultat' href='". |
|
| 753 | + str_replace('var_mode=', 'var_profile=', $self2). |
|
| 754 | + "'>". |
|
| 755 | + _T('zbug_calcul'). |
|
| 756 | + "</a></td><td>\n". |
|
| 757 | + (($var_mode_objet == $objet) ? "<b>$nom</b>" : $nom). |
|
| 758 | + "</td><td>\n". |
|
| 759 | + $req. |
|
| 760 | + "</td><td>\n". |
|
| 761 | + spip_htmlspecialchars($crit). |
|
| 764 | 762 | '</td></tr>'; |
| 765 | 763 | } |
| 766 | 764 | } |
@@ -787,7 +785,7 @@ discard block |
||
| 787 | 785 | } |
| 788 | 786 | // permettre le copier/coller facile |
| 789 | 787 | // $res = ancre_texte($req, array(), true); |
| 790 | - $res = "<div id='T" . md5((string) $req) . "'>\n<pre>\n" . $req . "</pre>\n</div>\n"; |
|
| 788 | + $res = "<div id='T".md5((string) $req)."'>\n<pre>\n".$req."</pre>\n</div>\n"; |
|
| 791 | 789 | // formatage et affichage des resultats bruts de la requete |
| 792 | 790 | $ress_req = spip_query($req); |
| 793 | 791 | $brut_sql = ''; |
@@ -797,10 +795,10 @@ discard block |
||
| 797 | 795 | $max_aff = defined('_MAX_DEBUG_AFF') ? _MAX_DEBUG_AFF : 50; |
| 798 | 796 | while ($retours_sql = sql_fetch($ress_req)) { |
| 799 | 797 | if ($num <= $max_aff) { |
| 800 | - $brut_sql .= '<h3>' . ($num == 1 ? $num . ' sur ' . sql_count($ress_req) : $num) . '</h3>'; |
|
| 798 | + $brut_sql .= '<h3>'.($num == 1 ? $num.' sur '.sql_count($ress_req) : $num).'</h3>'; |
|
| 801 | 799 | $brut_sql .= '<p>'; |
| 802 | 800 | foreach ($retours_sql as $key => $val) { |
| 803 | - $brut_sql .= '<strong>' . $key . '</strong> => ' . spip_htmlspecialchars(couper($val, 150)) . "<br />\n"; |
|
| 801 | + $brut_sql .= '<strong>'.$key.'</strong> => '.spip_htmlspecialchars(couper($val, 150))."<br />\n"; |
|
| 804 | 802 | } |
| 805 | 803 | $brut_sql .= '</p>'; |
| 806 | 804 | } |
@@ -811,14 +809,14 @@ discard block |
||
| 811 | 809 | // ne pas afficher les $contexte_inclus |
| 812 | 810 | $view = preg_replace(',<\?php.+\?[>],Uims', '', (string) $view); |
| 813 | 811 | if ($view) { |
| 814 | - $res2 .= "\n<br /><fieldset>" . interdire_scripts($view) . '</fieldset>'; |
|
| 812 | + $res2 .= "\n<br /><fieldset>".interdire_scripts($view).'</fieldset>'; |
|
| 815 | 813 | } |
| 816 | 814 | } |
| 817 | 815 | } elseif ($affiche == 'code') { |
| 818 | 816 | $legend = $nom; |
| 819 | - $res = ancre_texte('<' . "?php\n" . $quoi . "\n?" . '>'); |
|
| 817 | + $res = ancre_texte('<'."?php\n".$quoi."\n?".'>'); |
|
| 820 | 818 | } elseif ($affiche == 'boucle') { |
| 821 | - $legend = _T('zbug_boucle') . ' ' . $nom; |
|
| 819 | + $legend = _T('zbug_boucle').' '.$nom; |
|
| 822 | 820 | // Le compilateur prefixe le nom des boucles par l'extension du fichier source. |
| 823 | 821 | $gram = preg_match('/^([^_]+)_/', (string) $objet, $r) ? $r[1] : ''; |
| 824 | 822 | $res = ancre_texte(public_decompiler($quoi, $gram, 0, 'boucle')); |
@@ -836,23 +834,23 @@ discard block |
||
| 836 | 834 | include_spip('public/assembler'); // pour inclure_balise_dynamique |
| 837 | 835 | include_spip('inc/texte'); // pour corriger_typo |
| 838 | 836 | |
| 839 | - return _DOCTYPE_ECRIRE . |
|
| 840 | - html_lang_attributes() . |
|
| 841 | - "<head>\n<title>" . |
|
| 842 | - ('SPIP ' . $GLOBALS['spip_version_affichee'] . ' ' . |
|
| 843 | - _T('admin_debug') . ' ' . spip_htmlspecialchars($titre) . ' (' . |
|
| 844 | - supprimer_tags(corriger_typo($GLOBALS['meta']['nom_site']))) . |
|
| 845 | - ")</title>\n" . |
|
| 846 | - "<meta http-equiv='Content-Type' content='text/html" . |
|
| 847 | - (($c = $GLOBALS['meta']['charset']) ? "; charset=$c" : '') . |
|
| 848 | - "' />\n" . |
|
| 837 | + return _DOCTYPE_ECRIRE. |
|
| 838 | + html_lang_attributes(). |
|
| 839 | + "<head>\n<title>". |
|
| 840 | + ('SPIP '.$GLOBALS['spip_version_affichee'].' '. |
|
| 841 | + _T('admin_debug').' '.spip_htmlspecialchars($titre).' ('. |
|
| 842 | + supprimer_tags(corriger_typo($GLOBALS['meta']['nom_site']))). |
|
| 843 | + ")</title>\n". |
|
| 844 | + "<meta http-equiv='Content-Type' content='text/html". |
|
| 845 | + (($c = $GLOBALS['meta']['charset']) ? "; charset=$c" : ''). |
|
| 846 | + "' />\n". |
|
| 849 | 847 | http_script('', 'jquery.js') |
| 850 | - . "<link rel='stylesheet' href='" . url_absolue(find_in_path('spip_admin.css')) |
|
| 851 | - . "' type='text/css' />" . |
|
| 852 | - "</head>\n" . |
|
| 853 | - "<body style='margin:0 10px;'>\n" . |
|
| 854 | - "<div id='spip-debug-header'>" . |
|
| 855 | - $corps . |
|
| 856 | - inclure_balise_dynamique(balise_FORMULAIRE_ADMIN_dyn('spip-admin-float', $GLOBALS['debug_objets']), false) . |
|
| 848 | + . "<link rel='stylesheet' href='".url_absolue(find_in_path('spip_admin.css')) |
|
| 849 | + . "' type='text/css' />". |
|
| 850 | + "</head>\n". |
|
| 851 | + "<body style='margin:0 10px;'>\n". |
|
| 852 | + "<div id='spip-debug-header'>". |
|
| 853 | + $corps. |
|
| 854 | + inclure_balise_dynamique(balise_FORMULAIRE_ADMIN_dyn('spip-admin-float', $GLOBALS['debug_objets']), false). |
|
| 857 | 855 | '</div></body></html>'; |
| 858 | 856 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | ) { |
| 33 | 33 | // si l'url est une url du site, on la laisse passer sans rien faire |
| 34 | 34 | // c'est encore le plus simple |
| 35 | - $base = $GLOBALS['meta']['adresse_site'] . '/'; |
|
| 35 | + $base = $GLOBALS['meta']['adresse_site'].'/'; |
|
| 36 | 36 | if (strlen($base) && str_starts_with($redirect, $base)) { |
| 37 | 37 | return $redirect; |
| 38 | 38 | } |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | if ($ancre = _request('var_ajax_ancre')) { |
| 154 | 154 | // pas n'importe quoi quand meme dans la variable ! |
| 155 | 155 | $ancre = str_replace(['<', '"', "'"], ['<', '"', ''], $ancre); |
| 156 | - $texte = "<a href='#$ancre' name='ajax_ancre' style='display:none;'>anchor</a>" . $texte; |
|
| 156 | + $texte = "<a href='#$ancre' name='ajax_ancre' style='display:none;'>anchor</a>".$texte; |
|
| 157 | 157 | } |
| 158 | 158 | } else { |
| 159 | 159 | include_spip('inc/headers'); |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | // on ajoute un br en display none en tete du retour ajax pour regler un bug dans IE6/7 |
| 335 | 335 | // sans cela le formulaire n'est pas actif apres le hit ajax |
| 336 | 336 | // la classe ajax-form-is-ok sert a s'assurer que le retour ajax s'est bien passe |
| 337 | - $retour = "<br class='bugajaxie ajax-form-is-ok' style='display:none;'/>" . $retour; |
|
| 337 | + $retour = "<br class='bugajaxie ajax-form-is-ok' style='display:none;'/>".$retour; |
|
| 338 | 338 | ajax_retour($retour, false); |
| 339 | 339 | |
| 340 | 340 | return true; // on a fini le hit |