@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $texte = $intro; |
| 87 | 87 | } else { |
| 88 | 88 | if ( |
| 89 | - !str_contains("\n" . $texte, "\n|") |
|
| 89 | + !str_contains("\n".$texte, "\n|") |
|
| 90 | 90 | && strlen($texte) > 2.5 * $longueur |
| 91 | 91 | ) { |
| 92 | 92 | if (str_contains($texte, '<multi')) { |
@@ -170,11 +170,11 @@ discard block |
||
| 170 | 170 | if ($pas < 1) { |
| 171 | 171 | return ''; |
| 172 | 172 | } |
| 173 | - $ancre = 'pagination' . $nom; // #pagination_articles |
|
| 174 | - $debut = 'debut' . $nom; // 'debut_articles' |
|
| 173 | + $ancre = 'pagination'.$nom; // #pagination_articles |
|
| 174 | + $debut = 'debut'.$nom; // 'debut_articles' |
|
| 175 | 175 | |
| 176 | 176 | // n'afficher l'ancre qu'une fois |
| 177 | - $bloc_ancre = isset($ancres[$ancre]) ? '' : ($ancres[$ancre] = "<a id='" . $ancre . "' class='pagination_ancre'></a>"); |
|
| 177 | + $bloc_ancre = isset($ancres[$ancre]) ? '' : ($ancres[$ancre] = "<a id='".$ancre."' class='pagination_ancre'></a>"); |
|
| 178 | 178 | // liste = false : on ne veut que l'ancre |
| 179 | 179 | if (!$liste) { |
| 180 | 180 | return $ancres[$ancre]; |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | if ($modele) { |
| 205 | 205 | $pagination['type_pagination'] = $modele; |
| 206 | - $modele = trouver_fond('pagination_' . $modele, 'modeles') ? '_' . $modele : ''; |
|
| 206 | + $modele = trouver_fond('pagination_'.$modele, 'modeles') ? '_'.$modele : ''; |
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | if (!defined('_PAGINATION_NOMBRE_LIENS_MAX')) { |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | function lister_objets_avec_logos($type) { |
| 279 | 279 | |
| 280 | 280 | $objet = objet_type($type); |
| 281 | - $ids = sql_allfetsel('L.id_objet', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', 'D.mode=' . sql_quote('logoon') . ' AND L.objet=' . sql_quote($objet)); |
|
| 281 | + $ids = sql_allfetsel('L.id_objet', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', 'D.mode='.sql_quote('logoon').' AND L.objet='.sql_quote($objet)); |
|
| 282 | 282 | if ($ids) { |
| 283 | 283 | $ids = array_column($ids, 'id_objet'); |
| 284 | 284 | return implode(',', $ids); |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | |
| 472 | 472 | // Classes : on indique le sens de tri et l'item exposé |
| 473 | 473 | if (!$is_sens_fixe) { |
| 474 | - $classe .= ' item-tri item-tri_' . ($tri_sens_actuel === 1 ? 'asc' : 'desc'); |
|
| 474 | + $classe .= ' item-tri item-tri_'.($tri_sens_actuel === 1 ? 'asc' : 'desc'); |
|
| 475 | 475 | } |
| 476 | 476 | if ($champ_ou_sens === $tri_champ) { |
| 477 | 477 | $classe .= ' item-tri_actif'; |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | */ |
| 511 | 511 | function tri_champ_order($t, $from = null, $senstri = '') { |
| 512 | 512 | if (str_starts_with($t, 'multi ')) { |
| 513 | - return 'multi' . $senstri; |
|
| 513 | + return 'multi'.$senstri; |
|
| 514 | 514 | } |
| 515 | 515 | |
| 516 | 516 | $champ = $t; |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | return match ($prefixe) { |
| 541 | 541 | 'num ' => "CASE( 0+$champ ) WHEN 0 THEN 1 ELSE 0 END{$senstri}, 0+$champ{$senstri}", |
| 542 | 542 | 'sinum ' => "CASE( 0+$champ ) WHEN 0 THEN 1 ELSE 0 END{$senstri}", |
| 543 | - default => $champ . $senstri, |
|
| 543 | + default => $champ.$senstri, |
|
| 544 | 544 | }; |
| 545 | 545 | } |
| 546 | 546 | |
@@ -641,7 +641,7 @@ discard block |
||
| 641 | 641 | $l = couleur_hex_to_hsl($couleur, 'l'); |
| 642 | 642 | $styles .= ":root {--spip-login-color-theme--hs: {$hs};--spip-login-color-theme--l: {$l};}\n"; |
| 643 | 643 | } |
| 644 | - $logo_bg = _DIR_IMG . 'spip_fond_login.jpg'; |
|
| 644 | + $logo_bg = _DIR_IMG.'spip_fond_login.jpg'; |
|
| 645 | 645 | if (file_exists($logo_bg)) { |
| 646 | 646 | include_spip('inc/filtres_images_mini'); |
| 647 | 647 | $logo_mini = image_reduire($logo_bg, 64, 64); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $GLOBALS['debug_objets']['courant'] = $nom; |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | - $phpfile = sous_repertoire(_DIR_SKELS, '', false, true) . $nom . '.php'; |
|
| 56 | + $phpfile = sous_repertoire(_DIR_SKELS, '', false, true).$nom.'.php'; |
|
| 57 | 57 | |
| 58 | 58 | // si squelette est deja compile et perenne, le charger |
| 59 | 59 | if (!squelette_obsolete($phpfile, $source)) { |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | #} |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - if (file_exists($lib = $squelette . '_fonctions' . '.php')) { |
|
| 69 | + if (file_exists($lib = $squelette.'_fonctions'.'.php')) { |
|
| 70 | 70 | include_once $lib; |
| 71 | 71 | } |
| 72 | 72 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | eval("return true; $f ;"); |
| 95 | 95 | } catch (\ParseError $e) { |
| 96 | 96 | // Code syntaxiquement faux (critere etc mal programme') |
| 97 | - $msg = _T('zbug_erreur_compilation') . ' | Line ' . $e->getLine() . ' : ' . $e->getMessage(); |
|
| 97 | + $msg = _T('zbug_erreur_compilation').' | Line '.$e->getLine().' : '.$e->getMessage(); |
|
| 98 | 98 | erreur_squelette($msg, $boucle); |
| 99 | 99 | // continuer pour trouver d'autres fautes eventuelles |
| 100 | 100 | // mais prevenir que c'est mort |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | if (defined('_VAR_MODE') and _VAR_MODE == 'debug') { |
| 124 | 124 | // Tracer ce qui vient d'etre compile |
| 125 | - $GLOBALS['debug_objets']['code'][$nom . 'tout'] = $code; |
|
| 125 | + $GLOBALS['debug_objets']['code'][$nom.'tout'] = $code; |
|
| 126 | 126 | |
| 127 | 127 | // si c'est ce que demande le debusqueur, lui passer la main |
| 128 | 128 | if ( |
@@ -146,13 +146,13 @@ discard block |
||
| 146 | 146 | $code = " |
| 147 | 147 | /* |
| 148 | 148 | * Squelette : $sourcefile |
| 149 | - * Date : " . gmdate('D, d M Y H:i:s', @filemtime($sourcefile)) . ' GMT |
|
| 150 | - * Compile : ' . gmdate('D, d M Y H:i:s', time()) . ' GMT |
|
| 151 | - * ' . (!$boucles ? 'Pas de boucle' : ('Boucles : ' . $noms)) . ' |
|
| 149 | + * Date : ".gmdate('D, d M Y H:i:s', @filemtime($sourcefile)).' GMT |
|
| 150 | + * Compile : ' . gmdate('D, d M Y H:i:s', time()).' GMT |
|
| 151 | + * ' . (!$boucles ? 'Pas de boucle' : ('Boucles : '.$noms)).' |
|
| 152 | 152 | */ '; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - $code = '<' . "?php\n" . $code . join('', $boucles) . "\n"; |
|
| 155 | + $code = '<'."?php\n".$code.join('', $boucles)."\n"; |
|
| 156 | 156 | if (!defined('_VAR_NOCACHE') or !_VAR_NOCACHE) { |
| 157 | 157 | ecrire_fichier($phpfile, $code); |
| 158 | 158 | } |
@@ -214,18 +214,18 @@ discard block |
||
| 214 | 214 | $j = join('-', array_map('ucwords', explode('-', strtolower($r[2])))); |
| 215 | 215 | |
| 216 | 216 | if ($j == 'X-Spip-Filtre' and isset($headers[$j])) { |
| 217 | - $headers[$j] .= '|' . $r[3]; |
|
| 217 | + $headers[$j] .= '|'.$r[3]; |
|
| 218 | 218 | } else { |
| 219 | - $headers[$j] = str_replace(['\\\\',"\\'",'\\"'], ['\\',"'",'"'], $r[3]); |
|
| 219 | + $headers[$j] = str_replace(['\\\\', "\\'", '\\"'], ['\\', "'", '"'], $r[3]); |
|
| 220 | 220 | } |
| 221 | 221 | } |
| 222 | 222 | } |
| 223 | 223 | // S'agit-il d'un resultat constant ou contenant du code php |
| 224 | 224 | $process_ins = ( |
| 225 | - strpos($corps, '<' . '?') === false |
|
| 225 | + strpos($corps, '<'.'?') === false |
|
| 226 | 226 | or |
| 227 | - (strpos($corps, '<' . '?xml') !== false and |
|
| 228 | - strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 227 | + (strpos($corps, '<'.'?xml') !== false and |
|
| 228 | + strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false) |
|
| 229 | 229 | ) |
| 230 | 230 | ? 'html' |
| 231 | 231 | : 'php'; |
@@ -254,10 +254,10 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | if ($process_ins == 'html') { |
| 256 | 256 | $skel['process_ins'] = ( |
| 257 | - strpos($corps, '<' . '?') === false |
|
| 257 | + strpos($corps, '<'.'?') === false |
|
| 258 | 258 | or |
| 259 | - (strpos($corps, '<' . '?xml') !== false and |
|
| 260 | - strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 259 | + (strpos($corps, '<'.'?xml') !== false and |
|
| 260 | + strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false) |
|
| 261 | 261 | ) |
| 262 | 262 | ? 'html' |
| 263 | 263 | : 'php'; |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | // |
| 276 | 276 | |
| 277 | 277 | /** Code PHP pour inclure une balise dynamique à l'exécution d'une page */ |
| 278 | -define('CODE_INCLURE_BALISE', '<' . '?php |
|
| 278 | +define('CODE_INCLURE_BALISE', '<'.'?php |
|
| 279 | 279 | include_once("%s"); |
| 280 | 280 | if ($lang_select = "%s") $lang_select = lang_select($lang_select); |
| 281 | 281 | inserer_balise_dynamique(balise_%s_dyn(%s), array(%s)); |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | // pas de lien symbolique sous Windows |
| 307 | 307 | and !(stristr(PHP_OS, 'WIN') and str_contains($file, ':')) |
| 308 | 308 | ) { |
| 309 | - $file = './" . _DIR_RACINE . "' . $file; |
|
| 309 | + $file = './" . _DIR_RACINE . "'.$file; |
|
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | $lang = $context_compil[4]; |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | |
| 317 | 317 | $args = array_map('argumenter_squelette', $args); |
| 318 | 318 | if (!empty($context_compil['appel_php_depuis_modele'])) { |
| 319 | - $args[0] = 'arguments_balise_dyn_depuis_modele(' . $args[0] . ')'; |
|
| 319 | + $args[0] = 'arguments_balise_dyn_depuis_modele('.$args[0].')'; |
|
| 320 | 320 | } |
| 321 | 321 | $args = join(', ', $args); |
| 322 | 322 | |
@@ -350,14 +350,14 @@ discard block |
||
| 350 | 350 | if (is_object($v)) { |
| 351 | 351 | return var_export($v, true); |
| 352 | 352 | } elseif (!is_array($v)) { |
| 353 | - return "'" . texte_script((string) $v) . "'"; |
|
| 353 | + return "'".texte_script((string) $v)."'"; |
|
| 354 | 354 | } else { |
| 355 | 355 | $out = []; |
| 356 | 356 | foreach ($v as $k => $val) { |
| 357 | - $out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val); |
|
| 357 | + $out [] = argumenter_squelette($k).'=>'.argumenter_squelette($val); |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | - return 'array(' . join(', ', $out) . ')'; |
|
| 360 | + return 'array('.join(', ', $out).')'; |
|
| 361 | 361 | } |
| 362 | 362 | } |
| 363 | 363 | |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | } |
| 383 | 383 | else { |
| 384 | 384 | $str_args = base64_encode(serialize($args)); |
| 385 | - return '<?' . "php \$_zargs=unserialize(base64_decode('$str_args'));echo executer_balise_dynamique(...\$_zargs); ?" . ">\n"; |
|
| 385 | + return '<?'."php \$_zargs=unserialize(base64_decode('$str_args'));echo executer_balise_dynamique(...\$_zargs); ?".">\n"; |
|
| 386 | 386 | } |
| 387 | 387 | } |
| 388 | 388 | |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | } |
| 461 | 461 | |
| 462 | 462 | // Y a-t-il une fonction de traitement des arguments ? |
| 463 | - $f = 'balise_' . $nom_balise . '_stat'; |
|
| 463 | + $f = 'balise_'.$nom_balise.'_stat'; |
|
| 464 | 464 | |
| 465 | 465 | $r = !function_exists($f) ? $args : $f($args, $context_compil); |
| 466 | 466 | |
@@ -470,18 +470,18 @@ discard block |
||
| 470 | 470 | |
| 471 | 471 | // verifier que la fonction dyn est la, |
| 472 | 472 | // sinon se replier sur la generique si elle existe |
| 473 | - if (!function_exists('balise_' . $nom_balise . '_dyn')) { |
|
| 473 | + if (!function_exists('balise_'.$nom_balise.'_dyn')) { |
|
| 474 | 474 | if ( |
| 475 | 475 | $balise_generique = chercher_balise_generique($nom) |
| 476 | 476 | and $nom_balise_generique = $balise_generique['nom_generique'] |
| 477 | - and $file = include_spip('balise/' . strtolower($nom_balise_generique)) |
|
| 478 | - and function_exists('balise_' . $nom_balise_generique . '_dyn') |
|
| 477 | + and $file = include_spip('balise/'.strtolower($nom_balise_generique)) |
|
| 478 | + and function_exists('balise_'.$nom_balise_generique.'_dyn') |
|
| 479 | 479 | ) { |
| 480 | 480 | // et lui injecter en premier arg le nom de la balise |
| 481 | 481 | array_unshift($r, $nom); |
| 482 | 482 | $nom_balise = $nom_balise_generique; |
| 483 | 483 | if (!_DIR_RESTREINT) { |
| 484 | - $file = _DIR_RESTREINT_ABS . $file; |
|
| 484 | + $file = _DIR_RESTREINT_ABS.$file; |
|
| 485 | 485 | } |
| 486 | 486 | } else { |
| 487 | 487 | $msg = ['zbug_balise_inexistante', ['from' => 'CVT', 'balise' => $nom]]; |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | $n = ''; |
| 583 | 583 | foreach (explode(',', $liste) as $val) { |
| 584 | 584 | if ($a = intval($val) and $val === strval($a)) { |
| 585 | - $n .= ',' . $val; |
|
| 585 | + $n .= ','.$val; |
|
| 586 | 586 | } |
| 587 | 587 | } |
| 588 | 588 | if (strlen($n)) { |
@@ -761,8 +761,8 @@ discard block |
||
| 761 | 761 | // on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction |
| 762 | 762 | $i = 0; |
| 763 | 763 | do { |
| 764 | - $where[$k] = remplace_sous_requete($w, '(' . calculer_select( |
|
| 765 | - [$sous[1] . ' AS id'], |
|
| 764 | + $where[$k] = remplace_sous_requete($w, '('.calculer_select( |
|
| 765 | + [$sous[1].' AS id'], |
|
| 766 | 766 | $from, |
| 767 | 767 | $from_type, |
| 768 | 768 | $wheresub, |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | $id, |
| 776 | 776 | $serveur, |
| 777 | 777 | false |
| 778 | - ) . ')'); |
|
| 778 | + ).')'); |
|
| 779 | 779 | if (!$i) { |
| 780 | 780 | $i = 1; |
| 781 | 781 | $wherestring = calculer_where_to_string($where[$k]); |
@@ -795,7 +795,7 @@ discard block |
||
| 795 | 795 | if ($sous[0] == 'SUBSELECT') { |
| 796 | 796 | // c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having) |
| 797 | 797 | array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ? |
| 798 | - $where[$k] = remplace_sous_requete($w, '(' . calculer_select( |
|
| 798 | + $where[$k] = remplace_sous_requete($w, '('.calculer_select( |
|
| 799 | 799 | $sous[1], # select |
| 800 | 800 | $sous[2], #from |
| 801 | 801 | [], #from_type |
@@ -810,7 +810,7 @@ discard block |
||
| 810 | 810 | $id, |
| 811 | 811 | $serveur, |
| 812 | 812 | false |
| 813 | - ) . ')'); |
|
| 813 | + ).')'); |
|
| 814 | 814 | } |
| 815 | 815 | array_pop($where_simples); |
| 816 | 816 | } |
@@ -873,15 +873,15 @@ discard block |
||
| 873 | 873 | // sans recours a preg_match |
| 874 | 874 | // un implode(' ',..) est fait dans reinjecte_joint un peu plus bas |
| 875 | 875 | $afrom[$t][$cle] = [ |
| 876 | - "\n" . |
|
| 877 | - ($from_type[$cle] ?? 'INNER') . ' JOIN', |
|
| 876 | + "\n". |
|
| 877 | + ($from_type[$cle] ?? 'INNER').' JOIN', |
|
| 878 | 878 | $from[$cle], |
| 879 | 879 | "AS $cle", |
| 880 | 880 | 'ON (', |
| 881 | 881 | "$cle.$c", |
| 882 | 882 | '=', |
| 883 | 883 | "$t.$carr", |
| 884 | - ($and ? 'AND ' . $and : '') . |
|
| 884 | + ($and ? 'AND '.$and : ''). |
|
| 885 | 885 | ')' |
| 886 | 886 | ]; |
| 887 | 887 | if (isset($afrom[$cle])) { |
@@ -919,7 +919,7 @@ discard block |
||
| 919 | 919 | $t = key($from); |
| 920 | 920 | $c = current($from); |
| 921 | 921 | reset($from); |
| 922 | - $e = '/\b(' . "$t\\." . join('|' . $t . '\.', $equiv) . ')\b/'; |
|
| 922 | + $e = '/\b('."$t\\.".join('|'.$t.'\.', $equiv).')\b/'; |
|
| 923 | 923 | if ( |
| 924 | 924 | !(strpos($t, ' ') or // jointure des le depart cf boucle_doc |
| 925 | 925 | calculer_jointnul($t, $select, $e) or |
@@ -937,7 +937,7 @@ discard block |
||
| 937 | 937 | unset($afrom[$t][$nt]); |
| 938 | 938 | $afrom[$nt] = $afrom[$t]; |
| 939 | 939 | unset($afrom[$t]); |
| 940 | - $e = '/\b' . preg_quote($nfrom[6]) . '\b/'; |
|
| 940 | + $e = '/\b'.preg_quote($nfrom[6]).'\b/'; |
|
| 941 | 941 | $t = $nfrom[4]; |
| 942 | 942 | $alias = ''; |
| 943 | 943 | // verifier que les deux cles sont homonymes, sinon installer un alias dans le select |
@@ -948,14 +948,14 @@ discard block |
||
| 948 | 948 | if ($newcle != $oldcle) { |
| 949 | 949 | // si l'ancienne cle etait deja dans le select avec un AS |
| 950 | 950 | // reprendre simplement ce AS |
| 951 | - $as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/'; |
|
| 951 | + $as = '/\b'.preg_quote($nfrom[6]).'\s+(AS\s+\w+)\b/'; |
|
| 952 | 952 | if (preg_match($as, implode(',', $select), $m)) { |
| 953 | 953 | $alias = ''; |
| 954 | 954 | } else { |
| 955 | - $alias = ', ' . $nfrom[4] . " AS $oldcle"; |
|
| 955 | + $alias = ', '.$nfrom[4]." AS $oldcle"; |
|
| 956 | 956 | } |
| 957 | 957 | } |
| 958 | - $select = remplacer_jointnul($t . $alias, $select, $e); |
|
| 958 | + $select = remplacer_jointnul($t.$alias, $select, $e); |
|
| 959 | 959 | $join = remplacer_jointnul($t, $join, $e); |
| 960 | 960 | $where = remplacer_jointnul($t, $where, $e); |
| 961 | 961 | $having = remplacer_jointnul($t, $having, $e); |
@@ -1005,9 +1005,9 @@ discard block |
||
| 1005 | 1005 | } else { |
| 1006 | 1006 | $exp = ''; |
| 1007 | 1007 | if (strtoupper($join) === 'AND') { |
| 1008 | - return $exp . join(" $join ", array_map('calculer_where_to_string', $v)); |
|
| 1008 | + return $exp.join(" $join ", array_map('calculer_where_to_string', $v)); |
|
| 1009 | 1009 | } else { |
| 1010 | - return $exp . join($join, $v); |
|
| 1010 | + return $exp.join($join, $v); |
|
| 1011 | 1011 | } |
| 1012 | 1012 | } |
| 1013 | 1013 | } |
@@ -1069,6 +1069,6 @@ discard block |
||
| 1069 | 1069 | } |
| 1070 | 1070 | |
| 1071 | 1071 | return $mime_type |
| 1072 | - . (!$connect ? '' : preg_replace('/\W/', '_', $connect)) . '_' |
|
| 1073 | - . md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : '')); |
|
| 1072 | + . (!$connect ? '' : preg_replace('/\W/', '_', $connect)).'_' |
|
| 1073 | + . md5($GLOBALS['spip_version_code'].' * '.$skel.(isset($GLOBALS['marqueur_skel']) ? '*'.$GLOBALS['marqueur_skel'] : '')); |
|
| 1074 | 1074 | } |
@@ -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_log("jointure impossible $e " . implode(',', $l)); |
|
| 387 | + spip_log("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_log($nom . ':' . $p->nom_champ . ' ' . _T('zbug_distant_interdit')); |
|
| 750 | + spip_log($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 |
@@ -927,7 +927,7 @@ discard block |
||
| 927 | 927 | function compose_filtres_args($p, $args, $sep) { |
| 928 | 928 | $arglist = ''; |
| 929 | 929 | foreach ($args as $arg) { |
| 930 | - $arglist .= $sep . |
|
| 930 | + $arglist .= $sep. |
|
| 931 | 931 | calculer_liste($arg, $p->descr, $p->boucles, $p->id_boucle); |
| 932 | 932 | } |
| 933 | 933 | |
@@ -977,7 +977,7 @@ discard block |
||
| 977 | 977 | while ($b != '') { |
| 978 | 978 | foreach ($p->boucles[$b]->criteres as $critere) { |
| 979 | 979 | if ($critere->op == $motif) { |
| 980 | - $p->code = '$Pile[$SP' . (($n == 0) ? '' : "-$n") . |
|
| 980 | + $p->code = '$Pile[$SP'.(($n == 0) ? '' : "-$n"). |
|
| 981 | 981 | "]['$champ']"; |
| 982 | 982 | $b = ''; |
| 983 | 983 | break 2; |
@@ -1005,6 +1005,6 @@ discard block |
||
| 1005 | 1005 | */ |
| 1006 | 1006 | function zbug_presenter_champ($p, $champ = '') { |
| 1007 | 1007 | $balise = $champ ?: $p->nom_champ; |
| 1008 | - $explicite = $p->nom_boucle ? $p->nom_boucle . ':' : ''; |
|
| 1008 | + $explicite = $p->nom_boucle ? $p->nom_boucle.':' : ''; |
|
| 1009 | 1009 | return "#{$explicite}{$balise}"; |
| 1010 | 1010 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $id_lier = sql_getfetsel( |
| 56 | 56 | 'id_trad', |
| 57 | 57 | $table_objet_sql, |
| 58 | - "$id_table_objet=" . (int) $id_trad . " AND NOT($id_table_objet=" . (int) $id_objet . ')' |
|
| 58 | + "$id_table_objet=".(int) $id_trad." AND NOT($id_table_objet=".(int) $id_objet.')' |
|
| 59 | 59 | ); |
| 60 | 60 | if ($id_lier === null) { |
| 61 | 61 | spip_log("echec lien de trad vers objet $objet/$id_objet incorrect ($id_trad)"); |
@@ -74,18 +74,18 @@ discard block |
||
| 74 | 74 | sql_updateq($table_objet_sql, ['id_trad' => $id_trad], "id_trad = $id_lier"); |
| 75 | 75 | } // sinon ajouter notre objet dans le groupe |
| 76 | 76 | else { |
| 77 | - sql_updateq($table_objet_sql, ['id_trad' => $id_lier], "$id_table_objet=" . (int) $id_objet); |
|
| 77 | + sql_updateq($table_objet_sql, ['id_trad' => $id_lier], "$id_table_objet=".(int) $id_objet); |
|
| 78 | 78 | } |
| 79 | 79 | } // on a fourni un id_trad nul : sortir id_objet du groupe de trad |
| 80 | 80 | else { |
| 81 | - $old_id_trad = sql_getfetsel('id_trad', $table_objet_sql, "$id_table_objet=" . (int) $id_objet); |
|
| 81 | + $old_id_trad = sql_getfetsel('id_trad', $table_objet_sql, "$id_table_objet=".(int) $id_objet); |
|
| 82 | 82 | // supprimer le lien de traduction |
| 83 | - sql_updateq($table_objet_sql, ['id_trad' => 0], "$id_table_objet=" . (int) $id_objet); |
|
| 83 | + sql_updateq($table_objet_sql, ['id_trad' => 0], "$id_table_objet=".(int) $id_objet); |
|
| 84 | 84 | |
| 85 | 85 | // Verifier si l'ancien groupe ne comporte plus qu'un seul objet. Alors mettre a zero. |
| 86 | - $cpt = sql_countsel($table_objet_sql, 'id_trad=' . (int) $old_id_trad); |
|
| 86 | + $cpt = sql_countsel($table_objet_sql, 'id_trad='.(int) $old_id_trad); |
|
| 87 | 87 | if ($cpt == 1) { |
| 88 | - sql_updateq($table_objet_sql, ['id_trad' => 0], 'id_trad=' . (int) $old_id_trad); |
|
| 88 | + sql_updateq($table_objet_sql, ['id_trad' => 0], 'id_trad='.(int) $old_id_trad); |
|
| 89 | 89 | } |
| 90 | 90 | } |
| 91 | 91 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $t = ($GLOBALS['taille_min'] * $GLOBALS['taille_min']); |
| 76 | 76 | if ($GLOBALS['taille_min'] !== $GLOBALS['taille_max']) { |
| 77 | 77 | $t *= 0.9; // marge de securite |
| 78 | - echo round($t / 1_000_000, 3) . ' Mpx'; |
|
| 78 | + echo round($t / 1_000_000, 3).' Mpx'; |
|
| 79 | 79 | } else { |
| 80 | 80 | // c'est un cas "on a reussi la borne max initiale, donc on a pas de limite connue" |
| 81 | 81 | $t = 0; |
@@ -111,19 +111,19 @@ discard block |
||
| 111 | 111 | $image_source = chemin_image('test.png'); |
| 112 | 112 | $GLOBALS['redirect'] = generer_url_action( |
| 113 | 113 | 'tester_taille', |
| 114 | - "i=$i&arg=" . $GLOBALS['taille_min'] . '-' . $GLOBALS['taille_test'] |
|
| 114 | + "i=$i&arg=".$GLOBALS['taille_min'].'-'.$GLOBALS['taille_test'] |
|
| 115 | 115 | ); |
| 116 | 116 | |
| 117 | 117 | ob_start('action_tester_taille_error_handler'); |
| 118 | 118 | filtrer('image_recadre', $image_source, $taille, $taille); |
| 119 | - $GLOBALS['redirect'] = generer_url_action('tester_taille', "i=$i&arg=$taille-" . $GLOBALS['taille_max']); |
|
| 119 | + $GLOBALS['redirect'] = generer_url_action('tester_taille', "i=$i&arg=$taille-".$GLOBALS['taille_max']); |
|
| 120 | 120 | |
| 121 | 121 | // si la valeur intermediaire a reussi, on teste la valeur maxi qui est peut etre sous estimee |
| 122 | 122 | // si $GLOBALS['taille_min']==0 (car on est au premier coup) |
| 123 | 123 | if ($GLOBALS['taille_min'] == 0) { |
| 124 | 124 | $taille = $GLOBALS['taille_max']; |
| 125 | 125 | filtrer('image_recadre', $image_source, $taille, $taille); |
| 126 | - $GLOBALS['redirect'] = generer_url_action('tester_taille', "i=$i&arg=$taille-" . $GLOBALS['taille_max']); |
|
| 126 | + $GLOBALS['redirect'] = generer_url_action('tester_taille', "i=$i&arg=$taille-".$GLOBALS['taille_max']); |
|
| 127 | 127 | } |
| 128 | 128 | ob_end_clean(); |
| 129 | 129 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | return; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | -include_spip('inc/charsets'); # pour le nom de fichier |
|
| 22 | +include_spip('inc/charsets'); # pour le nom de fichier |
|
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | 25 | * Effacer une rubrique |
@@ -35,19 +35,19 @@ discard block |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | if ((int) $id_rubrique) { |
| 38 | - sql_delete('spip_rubriques', 'id_rubrique=' . (int) $id_rubrique); |
|
| 38 | + sql_delete('spip_rubriques', 'id_rubrique='.(int) $id_rubrique); |
|
| 39 | 39 | // Les admin restreints qui n'administraient que cette rubrique |
| 40 | 40 | // deviennent redacteurs |
| 41 | 41 | // (il y a sans doute moyen de faire ca avec un having) |
| 42 | 42 | |
| 43 | - $q = sql_select('id_auteur', 'spip_auteurs_liens', "objet='rubrique' AND id_objet=" . (int) $id_rubrique); |
|
| 43 | + $q = sql_select('id_auteur', 'spip_auteurs_liens', "objet='rubrique' AND id_objet=".(int) $id_rubrique); |
|
| 44 | 44 | while ($r = sql_fetch($q)) { |
| 45 | 45 | $id_auteur = $r['id_auteur']; |
| 46 | 46 | // degrader avant de supprimer la restriction d'admin |
| 47 | 47 | // section critique sur les droits |
| 48 | 48 | $n = sql_countsel( |
| 49 | 49 | 'spip_auteurs_liens', |
| 50 | - "objet='rubrique' AND id_objet!=" . (int) $id_rubrique . ' AND id_auteur=' . (int) $id_auteur |
|
| 50 | + "objet='rubrique' AND id_objet!=".(int) $id_rubrique.' AND id_auteur='.(int) $id_auteur |
|
| 51 | 51 | ); |
| 52 | 52 | if (!$n) { |
| 53 | 53 | include_spip('action/editer_auteur'); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | sql_delete( |
| 57 | 57 | 'spip_auteurs_liens', |
| 58 | - "objet='rubrique' AND id_objet=" . (int) $id_rubrique . ' AND id_auteur=' . (int) $id_auteur |
|
| 58 | + "objet='rubrique' AND id_objet=".(int) $id_rubrique.' AND id_auteur='.(int) $id_auteur |
|
| 59 | 59 | ); |
| 60 | 60 | } |
| 61 | 61 | // menu_rubriques devra recalculer |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | && $_SERVER['REQUEST_METHOD'] == 'POST' |
| 38 | 38 | ) { |
| 39 | 39 | include_spip('inc/session'); |
| 40 | - session_set('session_' . $var, $val = _request('val')); |
|
| 40 | + session_set('session_'.$var, $val = _request('val')); |
|
| 41 | 41 | #spip_log("autosave:$var:$val",'autosave'); |
| 42 | 42 | } |
| 43 | 43 | |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | # attention toutefois seuls '' et '=' figurent dans les modes de compatibilite |
| 23 | 23 | define('_separateur_urls_page', ''); |
| 24 | 24 | # on peut indiquer '' si on a installe le .htaccess |
| 25 | -define('_debut_urls_page', get_spip_script('./') . '?'); |
|
| 25 | +define('_debut_urls_page', get_spip_script('./').'?'); |
|
| 26 | 26 | ####### |
| 27 | 27 | /** |
| 28 | 28 | * Generer l'url d'un objet SPIP |
@@ -38,14 +38,14 @@ discard block |
||
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - $url = \_debut_urls_page . $objet . \_separateur_urls_page |
|
| 42 | - . $id . \_terminaison_urls_page; |
|
| 41 | + $url = \_debut_urls_page.$objet.\_separateur_urls_page |
|
| 42 | + . $id.\_terminaison_urls_page; |
|
| 43 | 43 | |
| 44 | 44 | if ($args) { |
| 45 | 45 | $args = strpos($url, '?') ? "&$args" : "?$args"; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - return _DIR_RACINE . $url . $args . ($ancre ? "#$ancre" : ''); |
|
| 48 | + return _DIR_RACINE.$url.$args.($ancre ? "#$ancre" : ''); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | // Script pour appeler un squelette apres s'etre authentifie |
| 13 | 13 | |
| 14 | -include_once __DIR__ . '/inc_version.php'; |
|
| 14 | +include_once __DIR__.'/inc_version.php'; |
|
| 15 | 15 | |
| 16 | 16 | include_spip('inc/cookie'); |
| 17 | 17 | |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | // On reexecute pour deboucher sur le include public. |
| 25 | 25 | // autrement on insiste |
| 26 | 26 | if (is_array($var_auth)) { |
| 27 | - $var_auth = '../?' . $_SERVER['QUERY_STRING']; |
|
| 27 | + $var_auth = '../?'.$_SERVER['QUERY_STRING']; |
|
| 28 | 28 | spip_setcookie('spip_session', $_COOKIE['spip_session'], [ |
| 29 | 29 | 'expires' => time() + 3600 * 24 * 14 |
| 30 | 30 | ]); |
@@ -34,4 +34,4 @@ discard block |
||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | // En somme, est prive' ce qui est publiquement nomme'... |
| 37 | -include __DIR__ . '/public.php'; |
|
| 37 | +include __DIR__.'/public.php'; |
|