@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $t = ($GLOBALS['taille_min'] * $GLOBALS['taille_min']); |
| 77 | 77 | if ($GLOBALS['taille_min'] !== $GLOBALS['taille_max']) { |
| 78 | 78 | $t = $t * 0.9; // marge de securite |
| 79 | - echo round($t / 1_000_000, 3) . ' Mpx'; |
|
| 79 | + echo round($t / 1_000_000, 3).' Mpx'; |
|
| 80 | 80 | } else { |
| 81 | 81 | // c'est un cas "on a reussi la borne max initiale, donc on a pas de limite connue" |
| 82 | 82 | $t = 0; |
@@ -112,19 +112,19 @@ discard block |
||
| 112 | 112 | $image_source = chemin_image('test.png'); |
| 113 | 113 | $GLOBALS['redirect'] = generer_url_action( |
| 114 | 114 | 'tester_taille', |
| 115 | - "i=$i&arg=" . $GLOBALS['taille_min'] . '-' . $GLOBALS['taille_test'] |
|
| 115 | + "i=$i&arg=".$GLOBALS['taille_min'].'-'.$GLOBALS['taille_test'] |
|
| 116 | 116 | ); |
| 117 | 117 | |
| 118 | 118 | ob_start('action_tester_taille_error_handler'); |
| 119 | 119 | filtrer('image_recadre', $image_source, $taille, $taille); |
| 120 | - $GLOBALS['redirect'] = generer_url_action('tester_taille', "i=$i&arg=$taille-" . $GLOBALS['taille_max']); |
|
| 120 | + $GLOBALS['redirect'] = generer_url_action('tester_taille', "i=$i&arg=$taille-".$GLOBALS['taille_max']); |
|
| 121 | 121 | |
| 122 | 122 | // si la valeur intermediaire a reussi, on teste la valeur maxi qui est peut etre sous estimee |
| 123 | 123 | // si $GLOBALS['taille_min']==0 (car on est au premier coup) |
| 124 | 124 | if ($GLOBALS['taille_min'] == 0) { |
| 125 | 125 | $taille = $GLOBALS['taille_max']; |
| 126 | 126 | filtrer('image_recadre', $image_source, $taille, $taille); |
| 127 | - $GLOBALS['redirect'] = generer_url_action('tester_taille', "i=$i&arg=$taille-" . $GLOBALS['taille_max']); |
|
| 127 | + $GLOBALS['redirect'] = generer_url_action('tester_taille', "i=$i&arg=$taille-".$GLOBALS['taille_max']); |
|
| 128 | 128 | } |
| 129 | 129 | ob_end_clean(); |
| 130 | 130 | |
@@ -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 | ); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | if ($fichier) { |
| 109 | 109 | $code = "quete_logo_file($doc, $qconnect)"; |
| 110 | 110 | } else { |
| 111 | - $code = "quete_logo_document($doc, " . ($lien ?: "''") . ", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)"; |
|
| 111 | + $code = "quete_logo_document($doc, ".($lien ?: "''").", '$align', '$mode_logo', $coord_x, $coord_y, $qconnect)"; |
|
| 112 | 112 | } |
| 113 | 113 | // (x=non-faux ? y : '') pour affecter x en retournant y |
| 114 | 114 | if ($p->descr['documents']) { |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | |
| 126 | 126 | // demande de reduction sur logo avec ecriture spip 2.1 : #LOGO_xxx{200, 0} |
| 127 | 127 | if ($coord_x or $coord_y) { |
| 128 | - $code = "filtrer('image_graver',filtrer('image_reduire'," . $code . ", '$coord_x', '$coord_y'))"; |
|
| 128 | + $code = "filtrer('image_graver',filtrer('image_reduire',".$code.", '$coord_x', '$coord_y'))"; |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | $p->code = $code; |
@@ -158,14 +158,12 @@ discard block |
||
| 158 | 158 | * Code compilé retournant le chemin du logo ou le code HTML du logo. |
| 159 | 159 | **/ |
| 160 | 160 | function logo_survol($id_objet, $_id_objet, $type, $align, $fichier, $_lien, $p, $suite) { |
| 161 | - $code = "quete_logo('$id_objet', '" . |
|
| 162 | - (($suite == '_SURVOL') ? 'off' : |
|
| 163 | - (($suite == '_NORMAL') ? 'on' : 'ON')) . |
|
| 164 | - "', $_id_objet," . |
|
| 161 | + $code = "quete_logo('$id_objet', '". |
|
| 162 | + (($suite == '_SURVOL') ? 'off' : (($suite == '_NORMAL') ? 'on' : 'ON')). |
|
| 163 | + "', $_id_objet,". |
|
| 165 | 164 | (($suite == '_RUBRIQUE') ? |
| 166 | - champ_sql('id_rubrique', $p) : |
|
| 167 | - (($type == 'rubrique') ? "quete_parent($_id_objet)" : "''")) . |
|
| 168 | - ', ' . intval($fichier) . ')'; |
|
| 165 | + champ_sql('id_rubrique', $p) : (($type == 'rubrique') ? "quete_parent($_id_objet)" : "''")). |
|
| 166 | + ', '.intval($fichier).')'; |
|
| 169 | 167 | |
| 170 | 168 | if ($fichier) { |
| 171 | 169 | return $code; |
@@ -173,5 +171,5 @@ discard block |
||
| 173 | 171 | |
| 174 | 172 | $align = preg_replace(',\W,', '', $align); |
| 175 | 173 | |
| 176 | - return "quete_html_logo($code, '$align', " . ($_lien ?: "''") . ')'; |
|
| 174 | + return "quete_html_logo($code, '$align', ".($_lien ?: "''").')'; |
|
| 177 | 175 | } |
@@ -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 | } |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | // (pas glop) |
| 54 | 54 | try { |
| 55 | 55 | switch (is_countable($a) ? count($a) : 0) { |
| 56 | - case 0: |
|
| 57 | - $iter = new $iterateur(); |
|
| 56 | + case 0 : $iter = new $iterateur(); |
|
| 58 | 57 | break; |
| 59 | 58 | case 1: |
| 60 | 59 | $iter = new $iterateur($a[0]); |
@@ -79,10 +78,10 @@ discard block |
||
| 79 | 78 | // chercher la classe d'iterateur |
| 80 | 79 | // IterateurXXX |
| 81 | 80 | // definie dans le fichier iterateurs/xxx.php |
| 82 | - $class = 'Iterateur' . $iterateur; |
|
| 81 | + $class = 'Iterateur'.$iterateur; |
|
| 83 | 82 | if (!class_exists($class)) { |
| 84 | 83 | if ( |
| 85 | - !include_spip('iterateur/' . strtolower($iterateur)) |
|
| 84 | + !include_spip('iterateur/'.strtolower($iterateur)) |
|
| 86 | 85 | or !class_exists($class) |
| 87 | 86 | ) { |
| 88 | 87 | die("Iterateur $iterateur non trouvé"); |
@@ -210,7 +209,7 @@ discard block |
||
| 210 | 209 | return $this->iter->$nom(); |
| 211 | 210 | } catch (Exception $e) { |
| 212 | 211 | // #GETCHILDREN sur un fichier de DirectoryIterator ... |
| 213 | - spip_log("Methode $nom en echec sur " . get_class($this->iter)); |
|
| 212 | + spip_log("Methode $nom en echec sur ".get_class($this->iter)); |
|
| 214 | 213 | spip_log("Cela peut être normal : retour d'une ligne de resultat ne pouvant pas calculer cette methode"); |
| 215 | 214 | |
| 216 | 215 | return ''; |
@@ -259,7 +258,7 @@ discard block |
||
| 259 | 258 | // Creer la fonction de filtrage sur $this |
| 260 | 259 | if ($this->filtre) { |
| 261 | 260 | if ($filtres = $this->assembler_filtres($this->filtre)) { |
| 262 | - $filtres = 'return ' . $filtres . ';'; |
|
| 261 | + $filtres = 'return '.$filtres.';'; |
|
| 263 | 262 | $this->func_filtre = fn() => eval($filtres); |
| 264 | 263 | } |
| 265 | 264 | else { |
@@ -294,7 +293,7 @@ discard block |
||
| 294 | 293 | return null; |
| 295 | 294 | } |
| 296 | 295 | |
| 297 | - return '(' . implode(") $operateur (", $filtres_string) . ')'; |
|
| 296 | + return '('.implode(") $operateur (", $filtres_string).')'; |
|
| 298 | 297 | } |
| 299 | 298 | |
| 300 | 299 | /** |
@@ -375,7 +374,7 @@ discard block |
||
| 375 | 374 | return $this->composer_filtre($v[1], $v[0], $v[2]); |
| 376 | 375 | } |
| 377 | 376 | |
| 378 | - return null; // sera ignore |
|
| 377 | + return null; // sera ignore |
|
| 379 | 378 | } |
| 380 | 379 | |
| 381 | 380 | /** |
@@ -401,28 +400,28 @@ discard block |
||
| 401 | 400 | # if (!in_array($cle, array('cle', 'valeur'))) |
| 402 | 401 | # return; |
| 403 | 402 | |
| 404 | - $a = '$this->get_select(\'' . $cle . '\')'; |
|
| 403 | + $a = '$this->get_select(\''.$cle.'\')'; |
|
| 405 | 404 | |
| 406 | 405 | $filtre = ''; |
| 407 | 406 | |
| 408 | 407 | if ($op == 'REGEXP') { |
| 409 | - $filtre = 'filtrer("match", ' . $a . ', ' . str_replace('\"', '"', $valeur) . ')'; |
|
| 408 | + $filtre = 'filtrer("match", '.$a.', '.str_replace('\"', '"', $valeur).')'; |
|
| 410 | 409 | $op = ''; |
| 411 | 410 | } else { |
| 412 | 411 | if ($op == 'LIKE') { |
| 413 | 412 | $valeur = str_replace(['\"', '_', '%'], ['"', '.', '.*'], preg_quote($valeur)); |
| 414 | - $filtre = 'filtrer("match", ' . $a . ', ' . $valeur . ')'; |
|
| 413 | + $filtre = 'filtrer("match", '.$a.', '.$valeur.')'; |
|
| 415 | 414 | $op = ''; |
| 416 | 415 | } else { |
| 417 | 416 | if ($op == '=') { |
| 418 | 417 | $op = '=='; |
| 419 | 418 | } else { |
| 420 | 419 | if ($op == 'IN') { |
| 421 | - $filtre = 'in_array(' . $a . ', array' . $valeur . ')'; |
|
| 420 | + $filtre = 'in_array('.$a.', array'.$valeur.')'; |
|
| 422 | 421 | $op = ''; |
| 423 | 422 | } else { |
| 424 | 423 | if (!in_array($op, ['<', '<=', '>', '>='])) { |
| 425 | - spip_log('operateur non reconnu ' . $op); // [todo] mettre une erreur de squelette |
|
| 424 | + spip_log('operateur non reconnu '.$op); // [todo] mettre une erreur de squelette |
|
| 426 | 425 | $op = ''; |
| 427 | 426 | } |
| 428 | 427 | } |
@@ -431,7 +430,7 @@ discard block |
||
| 431 | 430 | } |
| 432 | 431 | |
| 433 | 432 | if ($op) { |
| 434 | - $filtre = $a . $op . str_replace('\"', '"', $valeur); |
|
| 433 | + $filtre = $a.$op.str_replace('\"', '"', $valeur); |
|
| 435 | 434 | } |
| 436 | 435 | |
| 437 | 436 | if ($not) { |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | return sql_getfetsel( |
| 37 | 37 | 'virtuel', |
| 38 | 38 | 'spip_articles', |
| 39 | - ['id_article=' . intval($id_article), "statut='publie'"], |
|
| 39 | + ['id_article='.intval($id_article), "statut='publie'"], |
|
| 40 | 40 | '', |
| 41 | 41 | '', |
| 42 | 42 | '', |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $cache_quete[$connect][$table][$id] = sql_fetsel( |
| 82 | 82 | $cache_quete[$connect][$table]['_select'], |
| 83 | 83 | $table, |
| 84 | - $cache_quete[$connect][$table]['_id'] . '=' . intval($id), |
|
| 84 | + $cache_quete[$connect][$table]['_id'].'='.intval($id), |
|
| 85 | 85 | '', |
| 86 | 86 | '', |
| 87 | 87 | '', |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | return |
| 174 | 174 | (isset($GLOBALS['meta']['date_prochain_postdate']) |
| 175 | 175 | and $GLOBALS['meta']['date_prochain_postdate'] > time()) |
| 176 | - ? "$champ_date<" . sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur) |
|
| 176 | + ? "$champ_date<".sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur) |
|
| 177 | 177 | : '1=1'; |
| 178 | 178 | } |
| 179 | 179 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | and $id_table = reset($objet) |
| 233 | 233 | and $objet = objet_type($id_table) |
| 234 | 234 | ) { |
| 235 | - $w = "$mstatut<>" . sql_quote($v); |
|
| 235 | + $w = "$mstatut<>".sql_quote($v); |
|
| 236 | 236 | |
| 237 | 237 | // retrouver l’id_auteur qui a filé un lien de prévisu éventuellement, |
| 238 | 238 | // sinon l’auteur en session |
@@ -246,22 +246,22 @@ discard block |
||
| 246 | 246 | } |
| 247 | 247 | |
| 248 | 248 | // dans ce cas (admin en general), pas de filtrage sur ce statut |
| 249 | - if (!autoriser('previsualiser' . $v, $objet, '', $id_auteur)) { |
|
| 249 | + if (!autoriser('previsualiser'.$v, $objet, '', $id_auteur)) { |
|
| 250 | 250 | // si pas d'auteur identifie pas de sous-requete car pas d'article qui matche |
| 251 | 251 | if (!$id_auteur) { |
| 252 | 252 | $where[] = $w; |
| 253 | 253 | } else { |
| 254 | 254 | $primary = id_table_objet($objet); |
| 255 | - $where[] = "($w OR $id_table.$primary IN (" . sql_get_select( |
|
| 255 | + $where[] = "($w OR $id_table.$primary IN (".sql_get_select( |
|
| 256 | 256 | 'ssss.id_objet', |
| 257 | 257 | 'spip_auteurs_liens AS ssss', |
| 258 | - 'ssss.objet=' . sql_quote($objet) . ' AND ssss.id_auteur=' . intval($id_auteur), |
|
| 258 | + 'ssss.objet='.sql_quote($objet).' AND ssss.id_auteur='.intval($id_auteur), |
|
| 259 | 259 | '', |
| 260 | 260 | '', |
| 261 | 261 | '', |
| 262 | 262 | '', |
| 263 | 263 | $serveur |
| 264 | - ) . '))'; |
|
| 264 | + ).'))'; |
|
| 265 | 265 | } |
| 266 | 266 | } |
| 267 | 267 | } // ignorer ce statut si on ne sait pas comment le filtrer |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | * @return array|bool|null |
| 300 | 300 | */ |
| 301 | 301 | function quete_fichier($id_document, $serveur = '') { |
| 302 | - return sql_getfetsel('fichier', 'spip_documents', ('id_document=' . intval($id_document)), '', [], '', '', $serveur); |
|
| 302 | + return sql_getfetsel('fichier', 'spip_documents', ('id_document='.intval($id_document)), '', [], '', '', $serveur); |
|
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | /** |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | * @return array|bool |
| 311 | 311 | */ |
| 312 | 312 | function quete_document($id_document, $serveur = '') { |
| 313 | - return sql_fetsel('*', 'spip_documents', ('id_document=' . intval($id_document)), '', [], '', '', $serveur); |
|
| 313 | + return sql_fetsel('*', 'spip_documents', ('id_document='.intval($id_document)), '', [], '', '', $serveur); |
|
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | /** |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | * @return array|bool|null |
| 322 | 322 | */ |
| 323 | 323 | function quete_meta($nom, $serveur) { |
| 324 | - return sql_getfetsel('valeur', 'spip_meta', 'nom=' . sql_quote($nom), '', '', '', '', $serveur); |
|
| 324 | + return sql_getfetsel('valeur', 'spip_meta', 'nom='.sql_quote($nom), '', '', '', '', $serveur); |
|
| 325 | 325 | } |
| 326 | 326 | |
| 327 | 327 | /** |
@@ -377,9 +377,9 @@ discard block |
||
| 377 | 377 | // qui permet de distinguer le changement de logo |
| 378 | 378 | // et placer un expire sur le dossier IMG/ |
| 379 | 379 | $res = [ |
| 380 | - $on['chemin'] . ($on['timestamp'] ? "?{$on['timestamp']}" : ''), |
|
| 381 | - ($off ? $off['chemin'] . ($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''), |
|
| 382 | - (!$taille ? '' : (' ' . $taille[3])) |
|
| 380 | + $on['chemin'].($on['timestamp'] ? "?{$on['timestamp']}" : ''), |
|
| 381 | + ($off ? $off['chemin'].($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''), |
|
| 382 | + (!$taille ? '' : (' '.$taille[3])) |
|
| 383 | 383 | ]; |
| 384 | 384 | $res['src'] = $res[0]; |
| 385 | 385 | $res['logo_on'] = $res[0]; |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | if ( |
| 477 | 477 | strcmp($logo, _DIR_PLUGINS) == 0 |
| 478 | 478 | or strcmp($logo, _DIR_PLUGINS_DIST) == 0 |
| 479 | - or strcmp($logo, _DIR_RACINE . 'prive/') == 0 |
|
| 479 | + or strcmp($logo, _DIR_RACINE.'prive/') == 0 |
|
| 480 | 480 | ) { |
| 481 | 481 | return $logo; |
| 482 | 482 | } |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | $exposer[$m][$type][$principal] = true; |
| 647 | 647 | if ($type == 'id_mot') { |
| 648 | 648 | if (!$parent) { |
| 649 | - $parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot=' . intval($principal), '', '', '', '', $connect); |
|
| 649 | + $parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot='.intval($principal), '', '', '', '', $connect); |
|
| 650 | 650 | } |
| 651 | 651 | if ($parent) { |
| 652 | 652 | $exposer[$m]['id_groupe'][$parent] = true; |
@@ -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]; |