@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | if ($change_session == 'oui') { |
| 60 | 60 | $session = charger_fonction('session', 'inc'); |
| 61 | 61 | $session(true); |
| 62 | - spip_log('statut 204 pour ' . $_SERVER['REQUEST_URI']); |
|
| 62 | + spip_log('statut 204 pour '.$_SERVER['REQUEST_URI']); |
|
| 63 | 63 | http_response_code(204); // No Content |
| 64 | 64 | return; |
| 65 | 65 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | _T('info_connexion_refusee'), |
| 80 | 80 | _T('login_login_pass_incorrect'), |
| 81 | 81 | _T('login_retour_site'), |
| 82 | - 'url=' . rawurlencode($redirect), |
|
| 82 | + 'url='.rawurlencode($redirect), |
|
| 83 | 83 | _T('login_nouvelle_tentative'), |
| 84 | 84 | (strpos($url, (string) _DIR_RESTREINT_ABS) !== false) |
| 85 | 85 | ); |
@@ -73,5 +73,5 @@ |
||
| 73 | 73 | return ''; |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - return generer_url_action('logout', 'logout=public&url=' . rawurlencode($cible ?: self('&'))); |
|
| 76 | + return generer_url_action('logout', 'logout=public&url='.rawurlencode($cible ?: self('&'))); |
|
| 77 | 77 | } |
@@ -31,36 +31,36 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | function format_inclure_html($file, $args, $prof) { |
| 33 | 33 | if (strpos($file, '#') === false) { |
| 34 | - $t = $file ? ('(' . $file . ')') : ''; |
|
| 34 | + $t = $file ? ('('.$file.')') : ''; |
|
| 35 | 35 | } else { |
| 36 | - $t = '{fond=' . $file . '}'; |
|
| 36 | + $t = '{fond='.$file.'}'; |
|
| 37 | 37 | } |
| 38 | - $args = !$args ? '' : ('{' . join(', ', $args) . '}'); |
|
| 38 | + $args = !$args ? '' : ('{'.join(', ', $args).'}'); |
|
| 39 | 39 | |
| 40 | - return ('<INCLURE' . $t . $args . '>'); |
|
| 40 | + return ('<INCLURE'.$t.$args.'>'); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | function format_polyglotte_html($args, $prof) { |
| 44 | 44 | $contenu = []; |
| 45 | 45 | foreach ($args as $l => $t) { |
| 46 | - $contenu[] = ($l ? "[$l]" : '') . $t; |
|
| 46 | + $contenu[] = ($l ? "[$l]" : '').$t; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - return ('<multi>' . join(' ', $contenu) . '</multi>'); |
|
| 49 | + return ('<multi>'.join(' ', $contenu).'</multi>'); |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | function format_idiome_html($nom, $module, $args, $filtres, $prof) { |
| 53 | 53 | foreach ($args as $k => $v) { |
| 54 | 54 | $args[$k] = "$k=$v"; |
| 55 | 55 | } |
| 56 | - $args = (!$args ? '' : ('{' . join(',', $args) . '}')); |
|
| 56 | + $args = (!$args ? '' : ('{'.join(',', $args).'}')); |
|
| 57 | 57 | |
| 58 | - return ('<:' . ($module ? "$module:" : '') . $nom . $args . $filtres . ':>'); |
|
| 58 | + return ('<:'.($module ? "$module:" : '').$nom.$args.$filtres.':>'); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | function format_champ_html($nom, $boucle, $etoile, $avant, $apres, $args, $filtres, $prof) { |
| 62 | 62 | $nom = '#' |
| 63 | - . ($boucle ? ($boucle . ':') : '') |
|
| 63 | + . ($boucle ? ($boucle.':') : '') |
|
| 64 | 64 | . $nom |
| 65 | 65 | . $etoile |
| 66 | 66 | . $args |
@@ -90,12 +90,12 @@ discard block |
||
| 90 | 90 | $critere[$k] = $crit_s; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - return (!$critere ? '' : ('{' . join(',', $critere) . '}')); |
|
| 93 | + return (!$critere ? '' : ('{'.join(',', $critere).'}')); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | function format_liste_html($fonc, $args, $prof) { |
| 97 | 97 | return ((($fonc !== '') ? "|$fonc" : $fonc) |
| 98 | - . (!$args ? '' : ('{' . join(',', $args) . '}'))); |
|
| 98 | + . (!$args ? '' : ('{'.join(',', $args).'}'))); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | // Concatenation sans separateur: verifier qu'on ne cree pas de faux lexemes |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | // si un texte se termine par ( et est suivi d'un champ |
| 112 | 112 | // ou assimiles, forcer la notation pleine |
| 113 | 113 | if ($c1 == '(' and substr($texte2, 0, 1) == '#') { |
| 114 | - $args[$i + 1][0] = '[(' . $texte2 . ')]'; |
|
| 114 | + $args[$i + 1][0] = '[('.$texte2.')]'; |
|
| 115 | 115 | } |
| 116 | 116 | } else { |
| 117 | 117 | if ($type == 'texte') { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | ($c1 == '}' and substr(ltrim($texte2), 0, 1) == '|') |
| 125 | 125 | or (preg_match('/[\w\d_*]/', $c1) and preg_match('/^[\w\d_*{|]/', $texte2)) |
| 126 | 126 | ) { |
| 127 | - $args[$i][0] = '[(' . $texte . ')]'; |
|
| 127 | + $args[$i][0] = '[('.$texte.')]'; |
|
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | } else { |
| 81 | 81 | // Preparer l'appel de la fonction principale du squelette |
| 82 | 82 | |
| 83 | - spip_timer($a = 'calcul page ' . random_int(0, 1000)); |
|
| 83 | + spip_timer($a = 'calcul page '.random_int(0, 1000)); |
|
| 84 | 84 | |
| 85 | 85 | // On cree un marqueur de notes unique lie a cette composition |
| 86 | 86 | // et on enregistre l'etat courant des globales de notes... |
@@ -112,8 +112,8 @@ discard block |
||
| 112 | 112 | try { |
| 113 | 113 | $page = $fonc(['cache' => $cache], [$contexte]); |
| 114 | 114 | } catch (Throwable $e) { |
| 115 | - $msg = _T('zbug_erreur_execution_page') . " $sourcefile"; |
|
| 116 | - $full_msg = $msg . ' | File ' . $e->getFile() . ' Line ' . $e->getLine() . ' : ' . $e->getMessage(); |
|
| 115 | + $msg = _T('zbug_erreur_execution_page')." $sourcefile"; |
|
| 116 | + $full_msg = $msg.' | File '.$e->getFile().' Line '.$e->getLine().' : '.$e->getMessage(); |
|
| 117 | 117 | $full_msg = str_replace(_ROOT_RACINE, '[…]/', $full_msg); |
| 118 | 118 | $corps = "<pre>$msg</pre>"; |
| 119 | 119 | $page = analyse_resultat_skel($fond, ['cache' => $cache], $corps, $sourcefile); |
@@ -144,17 +144,17 @@ discard block |
||
| 144 | 144 | |
| 145 | 145 | $profile = spip_timer($a); |
| 146 | 146 | spip_log("calcul ($profile) [$skel] $infos" |
| 147 | - . ' (' . strlen($page['texte']) . ' octets)'); |
|
| 147 | + . ' ('.strlen($page['texte']).' octets)'); |
|
| 148 | 148 | |
| 149 | 149 | if (defined('_CALCUL_PROFILER') and intval($profile) > _CALCUL_PROFILER) { |
| 150 | 150 | spip_log("calcul ($profile) [$skel] $infos" |
| 151 | - . ' (' . strlen($page['texte']) . ' octets) | ' . $_SERVER['REQUEST_URI'], 'profiler' . _LOG_AVERTISSEMENT); |
|
| 151 | + . ' ('.strlen($page['texte']).' octets) | '.$_SERVER['REQUEST_URI'], 'profiler'._LOG_AVERTISSEMENT); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | if ($debug) { |
| 155 | 155 | // si c'est ce que demande le debusqueur, lui passer la main |
| 156 | 156 | $t = strlen($page['texte']) ? $page['texte'] : ' '; |
| 157 | - $GLOBALS['debug_objets']['resultat'][$fonc . 'tout'] = $t; |
|
| 157 | + $GLOBALS['debug_objets']['resultat'][$fonc.'tout'] = $t; |
|
| 158 | 158 | $GLOBALS['debug_objets']['courant'] = $courant; |
| 159 | 159 | $GLOBALS['debug_objets']['profile'][$sourcefile] = $profile; |
| 160 | 160 | if ( |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | if (defined('_VAR_INCLURE') and _VAR_INCLURE) { |
| 186 | 186 | $page['sourcefile'] = $sourcefile; |
| 187 | 187 | $page['texte'] = |
| 188 | - "<div class='inclure_blocs'><h6>" . $page['sourcefile'] . '</h6>' . $page['texte'] . '</div>' |
|
| 188 | + "<div class='inclure_blocs'><h6>".$page['sourcefile'].'</h6>'.$page['texte'].'</div>' |
|
| 189 | 189 | . ($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>"); |
| 190 | 190 | $js_inclus = true; |
| 191 | 191 | } |
@@ -222,14 +222,14 @@ discard block |
||
| 222 | 222 | $val = ''; |
| 223 | 223 | } elseif (is_array($val)) { |
| 224 | 224 | if ($profondeur_max > 0) { |
| 225 | - $val = 'array:' . count($val) . '(' . presenter_contexte($val, $profondeur_max - 1, 3) . ')'; |
|
| 225 | + $val = 'array:'.count($val).'('.presenter_contexte($val, $profondeur_max - 1, 3).')'; |
|
| 226 | 226 | } else { |
| 227 | - $val = 'array:' . count($val); |
|
| 227 | + $val = 'array:'.count($val); |
|
| 228 | 228 | } |
| 229 | 229 | } elseif (is_object($val)) { |
| 230 | 230 | $val = get_class($val); |
| 231 | 231 | } elseif (strlen("$val") > 30) { |
| 232 | - $val = substr("$val", 0, 29) . '…'; |
|
| 232 | + $val = substr("$val", 0, 29).'…'; |
|
| 233 | 233 | if (strstr($val, ' ')) { |
| 234 | 234 | $val = "'$val'"; |
| 235 | 235 | } |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | } elseif (!strlen($val)) { |
| 239 | 239 | $val = "''"; |
| 240 | 240 | } |
| 241 | - $infos[] = $var . '=' . $val; |
|
| 241 | + $infos[] = $var.'='.$val; |
|
| 242 | 242 | } |
| 243 | 243 | return join(', ', $infos); |
| 244 | 244 | } |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | . "?php include_spip('inc/headers');redirige_par_entete('" |
| 307 | 307 | . texte_script($url) |
| 308 | 308 | . "','',$status);" |
| 309 | - . '?' . '>', |
|
| 309 | + . '?'.'>', |
|
| 310 | 310 | 'process_ins' => 'php', |
| 311 | 311 | 'status' => $status |
| 312 | 312 | ]; |
@@ -111,13 +111,13 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | function chrono_requete($temps) { |
| 113 | 113 | $total = 0; |
| 114 | - $hors = '<i>' . _T('zbug_hors_compilation') . '</i>'; |
|
| 114 | + $hors = '<i>'._T('zbug_hors_compilation').'</i>'; |
|
| 115 | 115 | $t = $q = $n = $d = []; |
| 116 | 116 | // Totaliser les temps et completer le Explain |
| 117 | 117 | foreach ($temps as $key => $v) { |
| 118 | 118 | [$dt, $nb, $boucle, $query, $explain, $res, $contexte] = $v; |
| 119 | 119 | if (is_array($contexte)) { |
| 120 | - $k = ($contexte[0] . " $boucle"); |
|
| 120 | + $k = ($contexte[0]." $boucle"); |
|
| 121 | 121 | include_spip('public/compiler'); |
| 122 | 122 | $env = reconstruire_contexte_compil($contexte); |
| 123 | 123 | } else { |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | // Fabriquer les liens de navigations dans le tableau des temps |
| 163 | 163 | foreach ($temps as $k => $v) { |
| 164 | 164 | $titre = strip_tags($v[2]); |
| 165 | - $href = quote_amp($GLOBALS['REQUEST_URI']) . "#req$i"; |
|
| 165 | + $href = quote_amp($GLOBALS['REQUEST_URI'])."#req$i"; |
|
| 166 | 166 | $href = str_replace("\\'", ''', $href); |
| 167 | 167 | |
| 168 | 168 | if (!isset($t[$v[2]])) { |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | unset($d['']); |
| 184 | 184 | // Fabriquer le tableau des liens de navigation dans le grand tableau |
| 185 | 185 | foreach ($d as $k => $v) { |
| 186 | - $d[$k] = $n[$k] . "</td><td>$k</td><td class='time'>$v</td><td class='liste-reqs'>" |
|
| 186 | + $d[$k] = $n[$k]."</td><td>$k</td><td class='time'>$v</td><td class='liste-reqs'>" |
|
| 187 | 187 | . join('', $t[$k]); |
| 188 | 188 | } |
| 189 | 189 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | . join("</td></tr>\n<tr><td>", $d) |
| 194 | 194 | . "</td></tr>\n" |
| 195 | 195 | . (# _request('var_mode_objet') ? '' : |
| 196 | - ('<tr><td>' . (is_countable($temps) ? count($temps) : 0) . '</td><td>' . _T('info_total') . '</td><td class="time">' . $total . '</td><td></td></tr>')) |
|
| 196 | + ('<tr><td>'.(is_countable($temps) ? count($temps) : 0).'</td><td>'._T('info_total').'</td><td class="time">'.$total.'</td><td></td></tr>')) |
|
| 197 | 197 | ]; |
| 198 | 198 | |
| 199 | 199 | return [$temps, $navigation]; |
@@ -45,8 +45,8 @@ |
||
| 45 | 45 | |
| 46 | 46 | echo debut_grand_cadre(); |
| 47 | 47 | echo boite_ouvrir(_T('info_message_technique'), 'notice'); |
| 48 | - echo '<p>' . _T('info_procedure_maj_version') . '</p>', |
|
| 49 | - '<p>' . _T('info_administrateur_site_01') . '</p>'; |
|
| 48 | + echo '<p>'._T('info_procedure_maj_version').'</p>', |
|
| 49 | + '<p>'._T('info_administrateur_site_01').'</p>'; |
|
| 50 | 50 | echo bouton_action(_T('bouton_mettre_a_jour_base'), generer_url_ecrire('upgrade', 'reinstall=non')); |
| 51 | 51 | echo boite_fermer(); |
| 52 | 52 | // masquer les erreurs sql sur cette page car proviennent de la base pas a jour ! |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | echo pipeline('affiche_droite', ['args' => ['exec' => '404', 'exec_erreur' => $exec], 'data' => '']); |
| 43 | 43 | |
| 44 | 44 | echo debut_droite(); |
| 45 | - echo "<h1 class='grostitre'>" . _T('fichier_introuvable', ['fichier' => $exec]) . '</h1>'; |
|
| 45 | + echo "<h1 class='grostitre'>"._T('fichier_introuvable', ['fichier' => $exec]).'</h1>'; |
|
| 46 | 46 | echo pipeline('affiche_milieu', ['args' => ['exec' => '404', 'exec_erreur' => $exec], 'data' => '']); |
| 47 | 47 | |
| 48 | 48 | echo fin_gauche(), fin_page(); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | if (!$max_age) { |
| 107 | 107 | $max_age = _DEFAULT_LOCKTIME; |
| 108 | 108 | } |
| 109 | - $lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8); |
|
| 109 | + $lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8); |
|
| 110 | 110 | |
| 111 | 111 | |
| 112 | 112 | /* |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | |
| 117 | 117 | $id = creer_uniqid(); |
| 118 | - $tpath = _DIR_TMP . "slock.$id"; |
|
| 118 | + $tpath = _DIR_TMP."slock.$id"; |
|
| 119 | 119 | $tmpfd = @fopen($tpath, 'w'); // hum, le 'x' necessite php4,3,2 ... |
| 120 | 120 | if (!$tmpfd) { /* open failed */ |
| 121 | 121 | @fclose($tmpfd); |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | * thinks the current time is (our_tmp.st_ctime).. |
| 242 | 242 | */ |
| 243 | 243 | |
| 244 | - $tpath = _DIR_TMP . "stime.$id"; |
|
| 244 | + $tpath = _DIR_TMP."stime.$id"; |
|
| 245 | 245 | $tmpfd = @fopen($tpath, 'w'); |
| 246 | 246 | if ( |
| 247 | 247 | (!$tmpfd) |
@@ -255,14 +255,14 @@ discard block |
||
| 255 | 255 | return false; //(NFSL_SYSF); |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | - @fclose($tmpfd); /* We don't need this once we have our_tmp.st_ctime. */ |
|
| 258 | + @fclose($tmpfd); /* We don't need this once we have our_tmp.st_ctime. */ |
|
| 259 | 259 | spip_unlink($tpath); |
| 260 | 260 | |
| 261 | 261 | /* |
| 262 | 262 | * 2. make fullpath, a buffer for the full pathname of the lock file |
| 263 | 263 | */ |
| 264 | 264 | |
| 265 | - $lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8); |
|
| 265 | + $lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8); |
|
| 266 | 266 | |
| 267 | 267 | /* |
| 268 | 268 | * 3. If the ctime hasn't been modified, unlink the file and return. If the |
@@ -282,10 +282,10 @@ discard block |
||
| 282 | 282 | if (!$test) { |
| 283 | 283 | return false; |
| 284 | 284 | } //(NFSL_LOST); |
| 285 | - sleep(1 + (random_int(0, 4))); /* so sleep a bit */ |
|
| 285 | + sleep(1 + (random_int(0, 4))); /* so sleep a bit */ |
|
| 286 | 286 | } |
| 287 | 287 | |
| 288 | - return true;//(NFSL_OK); /* success */ |
|
| 288 | + return true; //(NFSL_OK); /* success */ |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | /* |
@@ -87,12 +87,12 @@ |
||
| 87 | 87 | } |
| 88 | 88 | // si une seule colonne, en faire le titre |
| 89 | 89 | if (preg_match("/^([^$sep]+)$sep+\$/", $entete, $l)) { |
| 90 | - $caption = "\n||" . $l[1] . '|'; |
|
| 90 | + $caption = "\n||".$l[1].'|'; |
|
| 91 | 91 | [$entete, $corps] = explode("\n", $corps, 2); |
| 92 | 92 | } |
| 93 | 93 | // si premiere colonne vide, le raccourci doit quand meme produire <th... |
| 94 | 94 | if ($entete[0] == $sep) { |
| 95 | - $entete = ' ' . $entete; |
|
| 95 | + $entete = ' '.$entete; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $lignes = explode("\n", $corps); |