@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | if (is_null($p)) { |
| 52 | - $arbre = ['erreur' => [_T('erreur_plugin_tag_plugin_absent') . " : $plug"]]; |
|
| 52 | + $arbre = ['erreur' => [_T('erreur_plugin_tag_plugin_absent')." : $plug"]]; |
|
| 53 | 53 | $silence = true; |
| 54 | 54 | } else { |
| 55 | 55 | $arbre = $p; |
@@ -84,22 +84,22 @@ discard block |
||
| 84 | 84 | if (isset($arbre['etat'])) { |
| 85 | 85 | $etat = trim((string) end($arbre['etat'])); |
| 86 | 86 | if (!in_array($etat, $etats)) { |
| 87 | - $arbre['erreur'][] = _T('erreur_plugin_etat_inconnu') . " : '$etat'"; |
|
| 87 | + $arbre['erreur'][] = _T('erreur_plugin_etat_inconnu')." : '$etat'"; |
|
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | if (isset($arbre['options'])) { |
| 91 | 91 | foreach ($arbre['options'] as $optfile) { |
| 92 | 92 | $optfile = trim((string) $optfile); |
| 93 | - if (!@is_readable($dir_plugins . "$plug/$optfile") && !$silence) { |
|
| 94 | - $arbre['erreur'][] = _T('erreur_plugin_fichier_absent') . " : $optfile"; |
|
| 93 | + if (!@is_readable($dir_plugins."$plug/$optfile") && !$silence) { |
|
| 94 | + $arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $optfile"; |
|
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | if (isset($arbre['fonctions'])) { |
| 99 | 99 | foreach ($arbre['fonctions'] as $optfile) { |
| 100 | 100 | $optfile = trim((string) $optfile); |
| 101 | - if (!@is_readable($dir_plugins . "$plug/$optfile") && !$silence) { |
|
| 102 | - $arbre['erreur'][] = _T('erreur_plugin_fichier_absent') . " : $optfile"; |
|
| 101 | + if (!@is_readable($dir_plugins."$plug/$optfile") && !$silence) { |
|
| 102 | + $arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $optfile"; |
|
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | 105 | } |
@@ -125,12 +125,12 @@ discard block |
||
| 125 | 125 | $action = $pipe['action'] ?? $pipe['nom']; |
| 126 | 126 | // verif que la methode a un nom autorise |
| 127 | 127 | if (in_array(strtolower((string) $action), $liste_methodes_reservees) && !$silence) { |
| 128 | - $arbre['erreur'][] = _T('erreur_plugin_nom_fonction_interdit') . " : $action"; |
|
| 128 | + $arbre['erreur'][] = _T('erreur_plugin_nom_fonction_interdit')." : $action"; |
|
| 129 | 129 | } |
| 130 | 130 | if (isset($pipe['inclure'])) { |
| 131 | - $inclure = $dir_plugins . "$plug/" . $pipe['inclure']; |
|
| 131 | + $inclure = $dir_plugins."$plug/".$pipe['inclure']; |
|
| 132 | 132 | if (!@is_readable($inclure) && !$silence) { |
| 133 | - $arbre['erreur'][] = _T('erreur_plugin_fichier_absent') . " : $inclure"; |
|
| 133 | + $arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $inclure"; |
|
| 134 | 134 | } |
| 135 | 135 | } |
| 136 | 136 | } |
@@ -199,8 +199,8 @@ discard block |
||
| 199 | 199 | foreach ($arbre['noisette'] as $k => $nut) { |
| 200 | 200 | $nut = preg_replace(',[.]html$,uims', '', trim((string) $nut)); |
| 201 | 201 | $arbre['noisette'][$k] = $nut; |
| 202 | - if (!@is_readable($dir_plugins . "$plug/$nut.html") && !$silence) { |
|
| 203 | - $arbre['erreur'][] = _T('erreur_plugin_fichier_absent') . " : $nut"; |
|
| 202 | + if (!@is_readable($dir_plugins."$plug/$nut.html") && !$silence) { |
|
| 203 | + $arbre['erreur'][] = _T('erreur_plugin_fichier_absent')." : $nut"; |
|
| 204 | 204 | } |
| 205 | 205 | } |
| 206 | 206 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | } |
| 68 | 68 | $dir = constant($dir); |
| 69 | 69 | foreach ($infos['install'] as $file) { |
| 70 | - $file = $dir . $plug . '/' . trim((string) $file); |
|
| 70 | + $file = $dir.$plug.'/'.trim((string) $file); |
|
| 71 | 71 | if (file_exists($file)) { |
| 72 | 72 | include_once($file); |
| 73 | 73 | } |
@@ -80,10 +80,10 @@ discard block |
||
| 80 | 80 | // S'assurer que les metas de la table spécifique sont bien accessibles dans la globale |
| 81 | 81 | lire_metas($table); |
| 82 | 82 | } |
| 83 | - $nom_meta = $infos['prefix'] . '_base_version'; |
|
| 83 | + $nom_meta = $infos['prefix'].'_base_version'; |
|
| 84 | 84 | |
| 85 | 85 | // Détermination de la fonction à appeler et de ses arguments |
| 86 | - $f = $infos['prefix'] . '_install'; |
|
| 86 | + $f = $infos['prefix'].'_install'; |
|
| 87 | 87 | if (!function_exists($f)) { |
| 88 | 88 | $f = isset($infos['schema']) ? 'spip_plugin_install' : ''; |
| 89 | 89 | $arg = $infos; |
@@ -162,12 +162,12 @@ discard block |
||
| 162 | 162 | && isset($GLOBALS[$table][$nom_meta]) |
| 163 | 163 | && spip_version_compare($GLOBALS[$table][$nom_meta], $version_cible, '>=')); |
| 164 | 164 | case 'install': |
| 165 | - if (function_exists($upgrade = $infos['prefix'] . '_upgrade')) { |
|
| 165 | + if (function_exists($upgrade = $infos['prefix'].'_upgrade')) { |
|
| 166 | 166 | $upgrade($nom_meta, $version_cible, $table); |
| 167 | 167 | } |
| 168 | 168 | break; |
| 169 | 169 | case 'uninstall': |
| 170 | - if (function_exists($vider_tables = $infos['prefix'] . '_vider_tables')) { |
|
| 170 | + if (function_exists($vider_tables = $infos['prefix'].'_vider_tables')) { |
|
| 171 | 171 | $vider_tables($nom_meta, $table); |
| 172 | 172 | } |
| 173 | 173 | break; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * @return array |
| 25 | 25 | */ |
| 26 | 26 | function plugins_infos_paquet($desc, $plug = '', $dir_plugins = _DIR_PLUGINS) { |
| 27 | - static $process = [ // tableau constant |
|
| 27 | + static $process = [// tableau constant |
|
| 28 | 28 | 'debut' => 'paquet_debutElement', |
| 29 | 29 | 'fin' => 'paquet_finElement', |
| 30 | 30 | 'text' => 'paquet_textElement' |
@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | unset($tree['']); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - $tree['slogan'] = $tree['prefix'] . '_slogan'; |
|
| 50 | - $tree['description'] = $tree['prefix'] . '_description'; |
|
| 49 | + $tree['slogan'] = $tree['prefix'].'_slogan'; |
|
| 50 | + $tree['description'] = $tree['prefix'].'_description'; |
|
| 51 | 51 | paquet_readable_files($tree, "$dir_plugins$plug/"); |
| 52 | 52 | if (!$tree['chemin']) { |
| 53 | 53 | $tree['chemin'] = []; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | // Prendre les messages d'erreur sans les numeros de lignes |
| 80 | 80 | $msg = array_column($vxml->err, 0); |
| 81 | 81 | $t = _T('plugins_erreur', ['plugins' => $plug]); |
| 82 | - array_unshift($msg, $t . " <ul class='erreur_xml'><li>" . reset($msg) . '</li></ul>'); |
|
| 82 | + array_unshift($msg, $t." <ul class='erreur_xml'><li>".reset($msg).'</li></ul>'); |
|
| 83 | 83 | |
| 84 | 84 | return ['erreur' => $msg]; |
| 85 | 85 | } |
@@ -95,9 +95,9 @@ discard block |
||
| 95 | 95 | function paquet_readable_files(&$tree, $dir) { |
| 96 | 96 | $prefix = strtolower((string) $tree['prefix']); |
| 97 | 97 | |
| 98 | - $tree['options'] = (is_readable($dir . $f = ($prefix . '_options.php'))) ? [$f] : []; |
|
| 99 | - $tree['fonctions'] = (is_readable($dir . $f = ($prefix . '_fonctions.php'))) ? [$f] : []; |
|
| 100 | - $tree['install'] = (is_readable($dir . $f = ($prefix . '_administrations.php'))) ? [$f] : []; |
|
| 98 | + $tree['options'] = (is_readable($dir.$f = ($prefix.'_options.php'))) ? [$f] : []; |
|
| 99 | + $tree['fonctions'] = (is_readable($dir.$f = ($prefix.'_fonctions.php'))) ? [$f] : []; |
|
| 100 | + $tree['install'] = (is_readable($dir.$f = ($prefix.'_administrations.php'))) ? [$f] : []; |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $texte = trim((string) $phraseur->versions[$n]['']); |
| 186 | 186 | $phraseur->versions[$n][''] = ''; |
| 187 | 187 | |
| 188 | - $f = 'info_paquet_' . $name; |
|
| 188 | + $f = 'info_paquet_'.$name; |
|
| 189 | 189 | if (function_exists($f)) { |
| 190 | 190 | $f($phraseur, $attrs, $texte); |
| 191 | 191 | } elseif (!$attrs) { |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | $id = substr(md5((string) $plug), 0, 16); |
| 59 | 59 | $res .= $ligne_plug( |
| 60 | 60 | $url_page, |
| 61 | - str_replace(_DIR_PLUGINS, '', _DIR_RACINE . $plug), |
|
| 61 | + str_replace(_DIR_PLUGINS, '', _DIR_RACINE.$plug), |
|
| 62 | 62 | $actif, |
| 63 | 63 | 'menu-entree' |
| 64 | - ) . "\n"; |
|
| 64 | + )."\n"; |
|
| 65 | 65 | unset($liste_plugins[$key]); |
| 66 | 66 | } |
| 67 | 67 | } |
@@ -101,12 +101,12 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | $chemin = ''; |
| 103 | 103 | if ($tcom !== []) { |
| 104 | - $chemin .= implode('/', $tcom) . '/'; |
|
| 104 | + $chemin .= implode('/', $tcom).'/'; |
|
| 105 | 105 | } |
| 106 | 106 | // ouvrir les repertoires jusqu'a la cible |
| 107 | 107 | while ($open = array_shift($ttarg)) { |
| 108 | - $visible = @isset($deplie[$chemin . $open]); |
|
| 109 | - $chemin .= $open . '/'; |
|
| 108 | + $visible = @isset($deplie[$chemin.$open]); |
|
| 109 | + $chemin .= $open.'/'; |
|
| 110 | 110 | $output .= '<li>'; |
| 111 | 111 | $output .= bouton_block_depliable($chemin, $visible); |
| 112 | 112 | $output .= debut_block_depliable($visible); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $type .= ($struct->type_requete ?: $struct->table_optionnelle); |
| 31 | 31 | |
| 32 | 32 | if ($struct->jointures_explicites) { |
| 33 | - $type .= ' ' . $struct->jointures_explicites; |
|
| 33 | + $type .= ' '.$struct->jointures_explicites; |
|
| 34 | 34 | } |
| 35 | 35 | if ($struct->table_optionnelle) { |
| 36 | 36 | $type .= '?'; |
@@ -39,11 +39,11 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | $crit = $struct->param; |
| 41 | 41 | if ($crit && !is_array($crit[0])) { |
| 42 | - $type = strtolower($type) . array_shift($crit); |
|
| 42 | + $type = strtolower($type).array_shift($crit); |
|
| 43 | 43 | } |
| 44 | 44 | $crit = decompiler_criteres($struct, $fmt, $prof); |
| 45 | 45 | |
| 46 | - $f = 'format_boucle_' . $fmt; |
|
| 46 | + $f = 'format_boucle_'.$fmt; |
|
| 47 | 47 | |
| 48 | 48 | return $f($preaff, $avant, $nom, $type, $crit, $milieu, $apres, $altern, $postaff, $prof); |
| 49 | 49 | } |
@@ -56,21 +56,20 @@ discard block |
||
| 56 | 56 | $res[] = decompiler_($v, $fmt, $prof); |
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | - $file = is_string($struct->texte) ? $struct->texte : |
|
| 60 | - decompiler_($struct->texte, $fmt, $prof); |
|
| 61 | - $f = 'format_inclure_' . $fmt; |
|
| 59 | + $file = is_string($struct->texte) ? $struct->texte : decompiler_($struct->texte, $fmt, $prof); |
|
| 60 | + $f = 'format_inclure_'.$fmt; |
|
| 62 | 61 | |
| 63 | 62 | return $f($file, $res, $prof); |
| 64 | 63 | } |
| 65 | 64 | |
| 66 | 65 | function decompiler_texte($struct, $fmt = '', $prof = 0) { |
| 67 | - $f = 'format_texte_' . $fmt; |
|
| 66 | + $f = 'format_texte_'.$fmt; |
|
| 68 | 67 | |
| 69 | 68 | return strlen((string) $struct->texte) ? $f($struct->texte, $prof) : ''; |
| 70 | 69 | } |
| 71 | 70 | |
| 72 | 71 | function decompiler_polyglotte($struct, $fmt = '', $prof = 0) { |
| 73 | - $f = 'format_polyglotte_' . $fmt; |
|
| 72 | + $f = 'format_polyglotte_'.$fmt; |
|
| 74 | 73 | |
| 75 | 74 | return $f($struct->traductions, $prof); |
| 76 | 75 | } |
@@ -83,7 +82,7 @@ discard block |
||
| 83 | 82 | |
| 84 | 83 | $filtres = decompiler_liste($struct->param, $fmt, $prof); |
| 85 | 84 | |
| 86 | - $f = 'format_idiome_' . $fmt; |
|
| 85 | + $f = 'format_idiome_'.$fmt; |
|
| 87 | 86 | |
| 88 | 87 | return $f($struct->nom_champ, $struct->module, $args, $filtres, $prof); |
| 89 | 88 | } |
@@ -98,7 +97,7 @@ discard block |
||
| 98 | 97 | } |
| 99 | 98 | $filtres = decompiler_liste($p, $fmt, $prof); |
| 100 | 99 | } |
| 101 | - $f = 'format_champ_' . $fmt; |
|
| 100 | + $f = 'format_champ_'.$fmt; |
|
| 102 | 101 | |
| 103 | 102 | return $f($struct->nom_champ, $struct->nom_boucle, $struct->etoile, $avant, $apres, $args, $filtres, $prof); |
| 104 | 103 | } |
@@ -107,7 +106,7 @@ discard block |
||
| 107 | 106 | if (!is_array($sources)) { |
| 108 | 107 | return ''; |
| 109 | 108 | } |
| 110 | - $f = 'format_liste_' . $fmt; |
|
| 109 | + $f = 'format_liste_'.$fmt; |
|
| 111 | 110 | $res = ''; |
| 112 | 111 | foreach ($sources as $arg) { |
| 113 | 112 | if (!is_array($arg)) { |
@@ -124,7 +123,7 @@ discard block |
||
| 124 | 123 | && strlen((string) $v[0]->apres) == 1 |
| 125 | 124 | && $v[0]->apres == $v[0]->avant |
| 126 | 125 | ) { |
| 127 | - $args[] = $v[0]->avant . $v[0]->texte . $v[0]->apres; |
|
| 126 | + $args[] = $v[0]->avant.$v[0]->texte.$v[0]->apres; |
|
| 128 | 127 | } else { |
| 129 | 128 | $args[] = decompiler_($v, $fmt, 0 - $prof); |
| 130 | 129 | } |
@@ -147,7 +146,7 @@ discard block |
||
| 147 | 146 | return ''; |
| 148 | 147 | } |
| 149 | 148 | $res = ''; |
| 150 | - $f = 'format_critere_' . $fmt; |
|
| 149 | + $f = 'format_critere_'.$fmt; |
|
| 151 | 150 | foreach ($sources as $crit) { |
| 152 | 151 | if (!is_array($crit)) { |
| 153 | 152 | continue; |
@@ -160,13 +159,13 @@ discard block |
||
| 160 | 159 | && $v[0]->type == 'texte' |
| 161 | 160 | && $v[0]->apres |
| 162 | 161 | ) { |
| 163 | - $args[] = [['texte', ($v[0]->apres . $v[0]->texte . $v[0]->apres)]]; |
|
| 162 | + $args[] = [['texte', ($v[0]->apres.$v[0]->texte.$v[0]->apres)]]; |
|
| 164 | 163 | } else { |
| 165 | 164 | $res2 = []; |
| 166 | 165 | foreach ($v as $k => $p) { |
| 167 | 166 | if ( |
| 168 | 167 | isset($p->type) |
| 169 | - && function_exists($d = 'decompiler_' . $p->type) |
|
| 168 | + && function_exists($d = 'decompiler_'.$p->type) |
|
| 170 | 169 | ) { |
| 171 | 170 | $r = $d($p, $fmt, (0 - $prof)); |
| 172 | 171 | $res2[] = [$p->type, $r]; |
@@ -194,7 +193,7 @@ discard block |
||
| 194 | 193 | if (!isset($p->type)) { |
| 195 | 194 | continue; |
| 196 | 195 | } #?????? |
| 197 | - $d = 'decompiler_' . $p->type; |
|
| 196 | + $d = 'decompiler_'.$p->type; |
|
| 198 | 197 | $next = $liste[$k + 1] ?? false; |
| 199 | 198 | // Forcer le champ etendu si son source (pas les reecritures) |
| 200 | 199 | // contenait des args et s'il est suivi d'espaces, |
@@ -219,16 +218,16 @@ discard block |
||
| 219 | 218 | } |
| 220 | 219 | $contenu[] = [$d($p, $fmt, $prof2), $p->type]; |
| 221 | 220 | } |
| 222 | - $f = 'format_suite_' . $fmt; |
|
| 221 | + $f = 'format_suite_'.$fmt; |
|
| 223 | 222 | |
| 224 | 223 | return $f($contenu); |
| 225 | 224 | } |
| 226 | 225 | |
| 227 | 226 | function public_decompiler($liste, $fmt = '', $prof = 0, $quoi = '') { |
| 228 | - if (!include_spip('public/format_' . $fmt)) { |
|
| 227 | + if (!include_spip('public/format_'.$fmt)) { |
|
| 229 | 228 | return "'$fmt'?"; |
| 230 | 229 | } |
| 231 | - $f = 'decompiler_' . $quoi; |
|
| 230 | + $f = 'decompiler_'.$quoi; |
|
| 232 | 231 | |
| 233 | 232 | return $f($liste, $fmt, $prof); |
| 234 | 233 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | } else { |
| 79 | 79 | // Preparer l'appel de la fonction principale du squelette |
| 80 | 80 | |
| 81 | - spip_timer($a = 'calcul page ' . random_int(0, 1000)); |
|
| 81 | + spip_timer($a = 'calcul page '.random_int(0, 1000)); |
|
| 82 | 82 | |
| 83 | 83 | // On cree un marqueur de notes unique lie a cette composition |
| 84 | 84 | // et on enregistre l'etat courant des globales de notes... |
@@ -110,8 +110,8 @@ discard block |
||
| 110 | 110 | try { |
| 111 | 111 | $page = $fonc(['cache' => $cache], [$contexte]); |
| 112 | 112 | } catch (Throwable $e) { |
| 113 | - $msg = _T('zbug_erreur_execution_page') . " $sourcefile"; |
|
| 114 | - $full_msg = $msg . ' | File ' . $e->getFile() . ' Line ' . $e->getLine() . ' : ' . $e->getMessage(); |
|
| 113 | + $msg = _T('zbug_erreur_execution_page')." $sourcefile"; |
|
| 114 | + $full_msg = $msg.' | File '.$e->getFile().' Line '.$e->getLine().' : '.$e->getMessage(); |
|
| 115 | 115 | $full_msg = str_replace(_ROOT_RACINE, '[…]/', $full_msg); |
| 116 | 116 | $corps = "<pre>$msg</pre>"; |
| 117 | 117 | $page = analyse_resultat_skel($fond, ['cache' => $cache], $corps, $sourcefile); |
@@ -142,17 +142,17 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | $profile = spip_timer($a); |
| 144 | 144 | spip_log("calcul ($profile) [$skel] $infos" |
| 145 | - . ' (' . strlen((string) $page['texte']) . ' octets)'); |
|
| 145 | + . ' ('.strlen((string) $page['texte']).' octets)'); |
|
| 146 | 146 | |
| 147 | 147 | if (defined('_CALCUL_PROFILER') && (int) $profile > _CALCUL_PROFILER) { |
| 148 | 148 | spip_log("calcul ($profile) [$skel] $infos" |
| 149 | - . ' (' . strlen((string) $page['texte']) . ' octets) | ' . $_SERVER['REQUEST_URI'], 'profiler' . _LOG_AVERTISSEMENT); |
|
| 149 | + . ' ('.strlen((string) $page['texte']).' octets) | '.$_SERVER['REQUEST_URI'], 'profiler'._LOG_AVERTISSEMENT); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | if ($debug) { |
| 153 | 153 | // si c'est ce que demande le debusqueur, lui passer la main |
| 154 | 154 | $t = strlen((string) $page['texte']) ? $page['texte'] : ' '; |
| 155 | - $GLOBALS['debug_objets']['resultat'][$fonc . 'tout'] = $t; |
|
| 155 | + $GLOBALS['debug_objets']['resultat'][$fonc.'tout'] = $t; |
|
| 156 | 156 | $GLOBALS['debug_objets']['courant'] = $courant; |
| 157 | 157 | $GLOBALS['debug_objets']['profile'][$sourcefile] = $profile; |
| 158 | 158 | if ( |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | if (defined('_VAR_INCLURE') && _VAR_INCLURE) { |
| 184 | 184 | $page['sourcefile'] = $sourcefile; |
| 185 | 185 | $page['texte'] = |
| 186 | - "<div class='inclure_blocs'><h6>" . $page['sourcefile'] . '</h6>' . $page['texte'] . '</div>' |
|
| 186 | + "<div class='inclure_blocs'><h6>".$page['sourcefile'].'</h6>'.$page['texte'].'</div>' |
|
| 187 | 187 | . ($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>"); |
| 188 | 188 | $js_inclus = true; |
| 189 | 189 | } |
@@ -220,14 +220,14 @@ discard block |
||
| 220 | 220 | $val = ''; |
| 221 | 221 | } elseif (is_array($val)) { |
| 222 | 222 | if ($profondeur_max > 0) { |
| 223 | - $val = 'array:' . count($val) . '(' . presenter_contexte($val, $profondeur_max - 1, 3) . ')'; |
|
| 223 | + $val = 'array:'.count($val).'('.presenter_contexte($val, $profondeur_max - 1, 3).')'; |
|
| 224 | 224 | } else { |
| 225 | - $val = 'array:' . count($val); |
|
| 225 | + $val = 'array:'.count($val); |
|
| 226 | 226 | } |
| 227 | 227 | } elseif (is_object($val)) { |
| 228 | 228 | $val = $val::class; |
| 229 | 229 | } elseif (strlen("$val") > 30) { |
| 230 | - $val = substr("$val", 0, 29) . '…'; |
|
| 230 | + $val = substr("$val", 0, 29).'…'; |
|
| 231 | 231 | if (strstr($val, ' ')) { |
| 232 | 232 | $val = "'$val'"; |
| 233 | 233 | } |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | } elseif (!strlen((string) $val)) { |
| 237 | 237 | $val = "''"; |
| 238 | 238 | } |
| 239 | - $infos[] = $var . '=' . $val; |
|
| 239 | + $infos[] = $var.'='.$val; |
|
| 240 | 240 | } |
| 241 | 241 | return implode(', ', $infos); |
| 242 | 242 | } |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | . "?php include_spip('inc/headers');redirige_par_entete('" |
| 305 | 305 | . texte_script($url) |
| 306 | 306 | . "','',$status);" |
| 307 | - . '?' . '>', |
|
| 307 | + . '?'.'>', |
|
| 308 | 308 | 'process_ins' => 'php', |
| 309 | 309 | 'status' => $status |
| 310 | 310 | ]; |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | try { |
| 52 | - $res = eval('?' . '>' . $page['texte']); |
|
| 52 | + $res = eval('?'.'>'.$page['texte']); |
|
| 53 | 53 | $page['texte'] = ob_get_contents(); |
| 54 | 54 | } catch (\Throwable $e) { |
| 55 | 55 | $code = $page['texte']; |
@@ -57,12 +57,12 @@ discard block |
||
| 57 | 57 | if (!function_exists('numerote_ligne_php')) { |
| 58 | 58 | function numerote_ligne_php($match) { |
| 59 | 59 | $GLOBALS['numero_ligne_php']++; |
| 60 | - return "\n/*" . str_pad($GLOBALS['numero_ligne_php'], 3, '0', STR_PAD_LEFT) . '*/'; |
|
| 60 | + return "\n/*".str_pad($GLOBALS['numero_ligne_php'], 3, '0', STR_PAD_LEFT).'*/'; |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | - $code = '/*001*/' . preg_replace_callback(",\n,", 'numerote_ligne_php', (string) $code); |
|
| 63 | + $code = '/*001*/'.preg_replace_callback(",\n,", 'numerote_ligne_php', (string) $code); |
|
| 64 | 64 | $code = trim(highlight_string($code, true)); |
| 65 | - erreur_squelette('L' . $e->getLine() . ': ' . $e->getMessage() . '<br />' . $code, [$page['source'],'',$e->getFile(),'',$GLOBALS['spip_lang']]); |
|
| 65 | + erreur_squelette('L'.$e->getLine().': '.$e->getMessage().'<br />'.$code, [$page['source'], '', $e->getFile(), '', $GLOBALS['spip_lang']]); |
|
| 66 | 66 | $page['texte'] = '<!-- Erreur -->'; |
| 67 | 67 | } |
| 68 | 68 | ob_end_clean(); |
@@ -36,11 +36,11 @@ |
||
| 36 | 36 | include_spip('inc/filtres'); |
| 37 | 37 | |
| 38 | 38 | // Inserer le css d'admin |
| 39 | - $css = "<link rel='stylesheet' href='" . url_absolue(direction_css(find_in_path('spip_admin.css'))) |
|
| 39 | + $css = "<link rel='stylesheet' href='".url_absolue(direction_css(find_in_path('spip_admin.css'))) |
|
| 40 | 40 | . "' type='text/css' />\n"; |
| 41 | 41 | if ($f = find_in_path('spip_admin_perso.css')) { |
| 42 | 42 | $css .= "<link rel='stylesheet' href='" |
| 43 | - . url_absolue(direction_css($f)) . "' type='text/css' />\n"; |
|
| 43 | + . url_absolue(direction_css($f))."' type='text/css' />\n"; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | if ( |
@@ -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_log('Debug: ' . $debug . ' (' . $fond . ')'); |
|
| 172 | + spip_log('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 | |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | if ($ligne) { |
| 254 | 254 | $msg .= " L$ligne"; |
| 255 | 255 | } |
| 256 | - spip_log($msg, 'debusquer' . _LOG_ERREUR); |
|
| 256 | + spip_log($msg, 'debusquer'._LOG_ERREUR); |
|
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | |
@@ -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 | } |