@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | */ |
| 363 | 363 | function balise_DOSSIER_SQUELETTE_dist($p) { |
| 364 | 364 | $code = substr(addslashes(dirname($p->descr['sourcefile'])), strlen(_DIR_RACINE)); |
| 365 | - $p->code = "_DIR_RACINE . '$code'" . |
|
| 365 | + $p->code = "_DIR_RACINE . '$code'". |
|
| 366 | 366 | $p->interdire_scripts = false; |
| 367 | 367 | |
| 368 | 368 | return $p; |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | */ |
| 382 | 382 | function balise_SQUELETTE_dist($p) { |
| 383 | 383 | $code = addslashes($p->descr['sourcefile']); |
| 384 | - $p->code = "'$code'" . |
|
| 384 | + $p->code = "'$code'". |
|
| 385 | 385 | $p->interdire_scripts = false; |
| 386 | 386 | |
| 387 | 387 | return $p; |
@@ -433,9 +433,9 @@ discard block |
||
| 433 | 433 | **/ |
| 434 | 434 | function balise_NOM_SITE_dist($p) { |
| 435 | 435 | if (!$p->etoile) { |
| 436 | - $p->code = "supprimer_numero(calculer_url(" . |
|
| 437 | - champ_sql('url_site', $p) . "," . |
|
| 438 | - champ_sql('nom_site', $p) . |
|
| 436 | + $p->code = "supprimer_numero(calculer_url(". |
|
| 437 | + champ_sql('url_site', $p).",". |
|
| 438 | + champ_sql('nom_site', $p). |
|
| 439 | 439 | ", 'titre', \$connect, false))"; |
| 440 | 440 | } else { |
| 441 | 441 | $p->code = champ_sql('nom_site', $p); |
@@ -586,8 +586,8 @@ discard block |
||
| 586 | 586 | * Pile complétée par le code à générer |
| 587 | 587 | **/ |
| 588 | 588 | function balise_POPULARITE_ABSOLUE_dist($p) { |
| 589 | - $p->code = 'ceil(' . |
|
| 590 | - champ_sql('popularite', $p) . |
|
| 589 | + $p->code = 'ceil('. |
|
| 590 | + champ_sql('popularite', $p). |
|
| 591 | 591 | ')'; |
| 592 | 592 | $p->interdire_scripts = false; |
| 593 | 593 | |
@@ -665,9 +665,9 @@ discard block |
||
| 665 | 665 | **/ |
| 666 | 666 | function balise_VALEUR_dist($p) { |
| 667 | 667 | $b = $p->nom_boucle ? $p->nom_boucle : $p->id_boucle; |
| 668 | - $p->code = index_pile($p->id_boucle, 'valeur', $p->boucles, $b);; |
|
| 668 | + $p->code = index_pile($p->id_boucle, 'valeur', $p->boucles, $b); ; |
|
| 669 | 669 | if (($v = interprete_argument_balise(1, $p)) !== null) { |
| 670 | - $p->code = 'table_valeur(' . $p->code . ', ' . $v . ')'; |
|
| 670 | + $p->code = 'table_valeur('.$p->code.', '.$v.')'; |
|
| 671 | 671 | } |
| 672 | 672 | $p->interdire_scripts = true; |
| 673 | 673 | |
@@ -808,16 +808,16 @@ discard block |
||
| 808 | 808 | $trouver_table = charger_fonction('trouver_table', 'base'); |
| 809 | 809 | if ($desc = $trouver_table(table_objet_sql($type_objet))) { |
| 810 | 810 | if (isset($desc['field']['descriptif'])) { |
| 811 | - $_ligne .= "'descriptif' => " . champ_sql('descriptif', $p) . ','; |
|
| 811 | + $_ligne .= "'descriptif' => ".champ_sql('descriptif', $p).','; |
|
| 812 | 812 | } |
| 813 | 813 | if (isset($desc['field']['texte'])) { |
| 814 | - $_ligne .= "'texte' => " . champ_sql('texte', $p) . ','; |
|
| 814 | + $_ligne .= "'texte' => ".champ_sql('texte', $p).','; |
|
| 815 | 815 | } |
| 816 | 816 | if (isset($desc['field']['chapo'])) { |
| 817 | - $_ligne .= "'chapo' => " . champ_sql('chapo', $p) . ','; |
|
| 817 | + $_ligne .= "'chapo' => ".champ_sql('chapo', $p).','; |
|
| 818 | 818 | } |
| 819 | 819 | if (isset($desc['introduction_longueur'])) { |
| 820 | - $_introduction_longueur = "'" . $desc['introduction_longueur'] . "'"; |
|
| 820 | + $_introduction_longueur = "'".$desc['introduction_longueur']."'"; |
|
| 821 | 821 | } |
| 822 | 822 | } |
| 823 | 823 | $_ligne .= ')'; |
@@ -913,10 +913,10 @@ discard block |
||
| 913 | 913 | $c = memoriser_contexte_compil($p); |
| 914 | 914 | |
| 915 | 915 | $p->code = sprintf(CODE_RECUPERER_FOND, "'modeles/lesauteurs'", |
| 916 | - "array('objet'=>'" . $objet . |
|
| 917 | - "','id_objet' => " . champ_sql($id_table_objet, $p) . |
|
| 918 | - ",'$id_table_objet' => " . champ_sql($id_table_objet, $p) . |
|
| 919 | - ($objet == 'article' ? "" : ",'id_article' => " . champ_sql('id_article', $p)) . |
|
| 916 | + "array('objet'=>'".$objet. |
|
| 917 | + "','id_objet' => ".champ_sql($id_table_objet, $p). |
|
| 918 | + ",'$id_table_objet' => ".champ_sql($id_table_objet, $p). |
|
| 919 | + ($objet == 'article' ? "" : ",'id_article' => ".champ_sql('id_article', $p)). |
|
| 920 | 920 | ")", |
| 921 | 921 | "'trim'=>true, 'compil'=>array($c)", |
| 922 | 922 | _q($connect)); |
@@ -984,7 +984,7 @@ discard block |
||
| 984 | 984 | $m = trim($m); |
| 985 | 985 | if ($m != "''") { |
| 986 | 986 | if (!preg_match(",\W,", $m)) { |
| 987 | - $m = $boucle->id_table . ".$m"; |
|
| 987 | + $m = $boucle->id_table.".$m"; |
|
| 988 | 988 | } |
| 989 | 989 | |
| 990 | 990 | $m .= " AS titre_rang"; |
@@ -1008,8 +1008,8 @@ discard block |
||
| 1008 | 1008 | $_primary = champ_sql($id_table_objet, $p, '', false); |
| 1009 | 1009 | $_env = '$Pile[0]'; |
| 1010 | 1010 | |
| 1011 | - if (!$_titre) {$_titre = "''";} |
|
| 1012 | - if (!$_primary) {$_primary = "''";} |
|
| 1011 | + if (!$_titre) {$_titre = "''"; } |
|
| 1012 | + if (!$_primary) {$_primary = "''"; } |
|
| 1013 | 1013 | $_rang = "calculer_rang_smart($_titre, '$objet', $_primary, $_env)"; |
| 1014 | 1014 | |
| 1015 | 1015 | } |
@@ -1142,7 +1142,7 @@ discard block |
||
| 1142 | 1142 | $f_pagination = chercher_filtre('pagination'); |
| 1143 | 1143 | $type = $p->boucles[$b]->modificateur['debut_nom']; |
| 1144 | 1144 | $modif = ($type[0] !== "'") ? "'debut'.$type" |
| 1145 | - : ("'debut" . substr($type, 1)); |
|
| 1145 | + : ("'debut".substr($type, 1)); |
|
| 1146 | 1146 | |
| 1147 | 1147 | $p->code = sprintf(CODE_PAGINATION, $f_pagination, $b, $type, $modif, $pas, $liste, |
| 1148 | 1148 | ((isset($__modele) and $__modele) ? $__modele : "''"), _q($connect), $code_contexte); |
@@ -1276,7 +1276,7 @@ discard block |
||
| 1276 | 1276 | $msg = array('zbug_balise_sans_argument', array('balise' => ' CHEMIN')); |
| 1277 | 1277 | erreur_squelette($msg, $p); |
| 1278 | 1278 | } else { |
| 1279 | - $p->code = 'find_in_path(' . $arg . ')'; |
|
| 1279 | + $p->code = 'find_in_path('.$arg.')'; |
|
| 1280 | 1280 | } |
| 1281 | 1281 | |
| 1282 | 1282 | $p->interdire_scripts = false; |
@@ -1311,7 +1311,7 @@ discard block |
||
| 1311 | 1311 | $msg = array('zbug_balise_sans_argument', array('balise' => ' CHEMIN_IMAGE')); |
| 1312 | 1312 | erreur_squelette($msg, $p); |
| 1313 | 1313 | } else { |
| 1314 | - $p->code = 'chemin_image(' . $arg . ')'; |
|
| 1314 | + $p->code = 'chemin_image('.$arg.')'; |
|
| 1315 | 1315 | } |
| 1316 | 1316 | |
| 1317 | 1317 | $p->interdire_scripts = false; |
@@ -1365,7 +1365,7 @@ discard block |
||
| 1365 | 1365 | // cas de #ENV sans argument : on retourne le serialize() du tableau |
| 1366 | 1366 | // une belle fonction [(#ENV|affiche_env)] serait pratique |
| 1367 | 1367 | if ($src) { |
| 1368 | - $p->code = '(is_array($a = (' . $src . ')) ? serialize($a) : "")'; |
|
| 1368 | + $p->code = '(is_array($a = ('.$src.')) ? serialize($a) : "")'; |
|
| 1369 | 1369 | } else { |
| 1370 | 1370 | $p->code = 'serialize($Pile[0]??[])'; |
| 1371 | 1371 | } |
@@ -1418,8 +1418,8 @@ discard block |
||
| 1418 | 1418 | $_sinon = interprete_argument_balise(2, $p); |
| 1419 | 1419 | $_unserialize = sinon(interprete_argument_balise(3, $p), "false"); |
| 1420 | 1420 | |
| 1421 | - $p->code = '(include_spip(\'inc/config\')?lire_config(' . $arg . ',' . |
|
| 1422 | - ($_sinon && $_sinon != "''" ? $_sinon : 'null') . ',' . $_unserialize . "):'')"; |
|
| 1421 | + $p->code = '(include_spip(\'inc/config\')?lire_config('.$arg.','. |
|
| 1422 | + ($_sinon && $_sinon != "''" ? $_sinon : 'null').','.$_unserialize."):'')"; |
|
| 1423 | 1423 | |
| 1424 | 1424 | return $p; |
| 1425 | 1425 | } |
@@ -1512,7 +1512,7 @@ discard block |
||
| 1512 | 1512 | $err_b_s_a = array('zbug_balise_sans_argument', array('balise' => 'SESSION_SET')); |
| 1513 | 1513 | erreur_squelette($err_b_s_a, $p); |
| 1514 | 1514 | } else { |
| 1515 | - $p->code = '(include_spip("inc/session") AND session_set(' . $_nom . ',' . $_val . '))'; |
|
| 1515 | + $p->code = '(include_spip("inc/session") AND session_set('.$_nom.','.$_val.'))'; |
|
| 1516 | 1516 | } |
| 1517 | 1517 | |
| 1518 | 1518 | $p->interdire_scripts = false; |
@@ -1555,7 +1555,7 @@ discard block |
||
| 1555 | 1555 | if (preg_match(",^([[:space:]]*//[^\n]*\n)'([^']+)'$,ms", |
| 1556 | 1556 | $php, $r)) { |
| 1557 | 1557 | $p->code = /* $r[1]. */ |
| 1558 | - '(' . $r[2] . ')'; |
|
| 1558 | + '('.$r[2].')'; |
|
| 1559 | 1559 | } else { |
| 1560 | 1560 | $p->code = "eval('return '.$php.';')"; |
| 1561 | 1561 | } |
@@ -1798,9 +1798,9 @@ discard block |
||
| 1798 | 1798 | |
| 1799 | 1799 | // noter la duree du cache dans un entete proprietaire |
| 1800 | 1800 | |
| 1801 | - $code = "'<'.'" . '?php header("X-Spip-Cache: ' |
|
| 1801 | + $code = "'<'.'".'?php header("X-Spip-Cache: ' |
|
| 1802 | 1802 | . $duree |
| 1803 | - . '"); ?' . "'.'>'"; |
|
| 1803 | + . '"); ?'."'.'>'"; |
|
| 1804 | 1804 | |
| 1805 | 1805 | // Remplir le header Cache-Control |
| 1806 | 1806 | // cas #CACHE{0} |
@@ -1820,9 +1820,9 @@ discard block |
||
| 1820 | 1820 | if ($pa == 'cache-client' |
| 1821 | 1821 | and $duree > 0 |
| 1822 | 1822 | ) { |
| 1823 | - $code .= ".'<'.'" . '?php header("Cache-Control: max-age=' |
|
| 1823 | + $code .= ".'<'.'".'?php header("Cache-Control: max-age=' |
|
| 1824 | 1824 | . $duree |
| 1825 | - . '"); ?' . "'.'>'"; |
|
| 1825 | + . '"); ?'."'.'>'"; |
|
| 1826 | 1826 | // il semble logique, si on cache-client, de ne pas invalider |
| 1827 | 1827 | $pa = 'statique'; |
| 1828 | 1828 | } |
@@ -1830,7 +1830,7 @@ discard block |
||
| 1830 | 1830 | if ($pa == 'statique' |
| 1831 | 1831 | and $duree > 0 |
| 1832 | 1832 | ) { |
| 1833 | - $code .= ".'<'.'" . '?php header("X-Spip-Statique: oui"); ?' . "'.'>'"; |
|
| 1833 | + $code .= ".'<'.'".'?php header("X-Spip-Statique: oui"); ?'."'.'>'"; |
|
| 1834 | 1834 | } |
| 1835 | 1835 | } |
| 1836 | 1836 | } else { |
@@ -1995,9 +1995,9 @@ discard block |
||
| 1995 | 1995 | if ($p->etoile) { |
| 1996 | 1996 | $_options[] = "'etoile'=>true"; |
| 1997 | 1997 | } |
| 1998 | - $_options[] = "'compil'=>array(" . memoriser_contexte_compil($p) . ")"; |
|
| 1998 | + $_options[] = "'compil'=>array(".memoriser_contexte_compil($p).")"; |
|
| 1999 | 1999 | |
| 2000 | - $_l = 'array(' . join(",\n\t", $_contexte) . ')'; |
|
| 2000 | + $_l = 'array('.join(",\n\t", $_contexte).')'; |
|
| 2001 | 2001 | if ($flag_env) { |
| 2002 | 2002 | $_l = "array_merge(\$Pile[0],$_l)"; |
| 2003 | 2003 | } |
@@ -2008,7 +2008,7 @@ discard block |
||
| 2008 | 2008 | $msg = array('zbug_balise_sans_argument', array('balise' => ' INCLURE')); |
| 2009 | 2009 | erreur_squelette($msg, $p); |
| 2010 | 2010 | } else { |
| 2011 | - $p->code = 'charge_scripts(' . $_contexte[1] . ',false)'; |
|
| 2011 | + $p->code = 'charge_scripts('.$_contexte[1].',false)'; |
|
| 2012 | 2012 | } |
| 2013 | 2013 | |
| 2014 | 2014 | $p->interdire_scripts = false; // la securite est assuree par recuperer_fond |
@@ -2056,7 +2056,7 @@ discard block |
||
| 2056 | 2056 | unset($_contexte[1]); |
| 2057 | 2057 | |
| 2058 | 2058 | if (preg_match("/^\s*'[^']*'/s", $nom)) { |
| 2059 | - $nom = "'modeles/" . substr($nom, 1); |
|
| 2059 | + $nom = "'modeles/".substr($nom, 1); |
|
| 2060 | 2060 | } else { |
| 2061 | 2061 | $nom = "'modeles/' . $nom"; |
| 2062 | 2062 | } |
@@ -2073,8 +2073,8 @@ discard block |
||
| 2073 | 2073 | $primary = $p->boucles[$p->id_boucle]->primary; |
| 2074 | 2074 | if (!strpos($primary, ',')) { |
| 2075 | 2075 | $id = champ_sql($primary, $p); |
| 2076 | - $_contexte[] = "'$primary'=>" . $id; |
|
| 2077 | - $_contexte[] = "'id'=>" . $id; |
|
| 2076 | + $_contexte[] = "'$primary'=>".$id; |
|
| 2077 | + $_contexte[] = "'id'=>".$id; |
|
| 2078 | 2078 | } |
| 2079 | 2079 | } |
| 2080 | 2080 | $_contexte[] = "'recurs'=>(++\$recurs)"; |
@@ -2086,11 +2086,11 @@ discard block |
||
| 2086 | 2086 | $_options = memoriser_contexte_compil($p); |
| 2087 | 2087 | $_options = "'compil'=>array($_options), 'trim'=>true"; |
| 2088 | 2088 | if (isset($_contexte['ajax'])) { |
| 2089 | - $_options .= ", " . preg_replace(",=>(.*)$,ims", '=> ($v=(\\1))?$v:true', $_contexte['ajax']); |
|
| 2089 | + $_options .= ", ".preg_replace(",=>(.*)$,ims", '=> ($v=(\\1))?$v:true', $_contexte['ajax']); |
|
| 2090 | 2090 | unset($_contexte['ajax']); |
| 2091 | 2091 | } |
| 2092 | 2092 | |
| 2093 | - $_l = 'array(' . join(",\n\t", $_contexte) . ')'; |
|
| 2093 | + $_l = 'array('.join(",\n\t", $_contexte).')'; |
|
| 2094 | 2094 | if ($flag_env) { |
| 2095 | 2095 | $_l = "array_merge(\$Pile[0],$_l)"; |
| 2096 | 2096 | } |
@@ -2200,12 +2200,12 @@ discard block |
||
| 2200 | 2200 | function balise_DOUBLONS_dist($p) { |
| 2201 | 2201 | if ($type = interprete_argument_balise(1, $p)) { |
| 2202 | 2202 | if ($famille = interprete_argument_balise(2, $p)) { |
| 2203 | - $type .= '.' . $famille; |
|
| 2203 | + $type .= '.'.$famille; |
|
| 2204 | 2204 | } |
| 2205 | - $p->code = '(isset($doublons[' . $type . ']) ? $doublons[' . $type . '] : "")'; |
|
| 2205 | + $p->code = '(isset($doublons['.$type.']) ? $doublons['.$type.'] : "")'; |
|
| 2206 | 2206 | if (!$p->etoile) { |
| 2207 | 2207 | $p->code = 'array_filter(array_map("intval",explode(",",' |
| 2208 | - . $p->code . ')))'; |
|
| 2208 | + . $p->code.')))'; |
|
| 2209 | 2209 | } |
| 2210 | 2210 | } else { |
| 2211 | 2211 | $p->code = '$doublons'; |
@@ -2334,7 +2334,7 @@ discard block |
||
| 2334 | 2334 | $_code[] = "$_key => $_val"; |
| 2335 | 2335 | } |
| 2336 | 2336 | } while ($_key && $_val); |
| 2337 | - $p->code = 'array(' . join(', ', $_code) . ')'; |
|
| 2337 | + $p->code = 'array('.join(', ', $_code).')'; |
|
| 2338 | 2338 | $p->interdire_scripts = false; |
| 2339 | 2339 | |
| 2340 | 2340 | return $p; |
@@ -2361,7 +2361,7 @@ discard block |
||
| 2361 | 2361 | while ($_val = interprete_argument_balise($n++, $p)) { |
| 2362 | 2362 | $_code[] = $_val; |
| 2363 | 2363 | } |
| 2364 | - $p->code = 'array(' . join(', ', $_code) . ')'; |
|
| 2364 | + $p->code = 'array('.join(', ', $_code).')'; |
|
| 2365 | 2365 | $p->interdire_scripts = false; |
| 2366 | 2366 | |
| 2367 | 2367 | return $p; |
@@ -2406,8 +2406,8 @@ discard block |
||
| 2406 | 2406 | $_code[] = $_v; |
| 2407 | 2407 | } |
| 2408 | 2408 | |
| 2409 | - $p->code = '((function_exists("autoriser")||include_spip("inc/autoriser"))&&autoriser(' . join(', ', |
|
| 2410 | - $_code) . ')?" ":"")'; |
|
| 2409 | + $p->code = '((function_exists("autoriser")||include_spip("inc/autoriser"))&&autoriser('.join(', ', |
|
| 2410 | + $_code).')?" ":"")'; |
|
| 2411 | 2411 | $p->interdire_scripts = false; |
| 2412 | 2412 | |
| 2413 | 2413 | return $p; |
@@ -2440,7 +2440,7 @@ discard block |
||
| 2440 | 2440 | $type_info = isset($type_info) ? str_replace('\'', '"', $type_info) : '"est_actif"'; |
| 2441 | 2441 | |
| 2442 | 2442 | $f = chercher_filtre('info_plugin'); |
| 2443 | - $p->code = $f . '(' . $plugin . ', ' . $type_info . ')'; |
|
| 2443 | + $p->code = $f.'('.$plugin.', '.$type_info.')'; |
|
| 2444 | 2444 | |
| 2445 | 2445 | return $p; |
| 2446 | 2446 | } |
@@ -2690,12 +2690,12 @@ discard block |
||
| 2690 | 2690 | $_issens = "in_array($_champ,array('>','<'))"; |
| 2691 | 2691 | $_sens = "(strpos('< >',$_champ)-1)"; |
| 2692 | 2692 | |
| 2693 | - $_variable = "((\$s=$_issens)?'sens':'tri')." . $boucle->modificateur['tri_nom']; |
|
| 2693 | + $_variable = "((\$s=$_issens)?'sens':'tri').".$boucle->modificateur['tri_nom']; |
|
| 2694 | 2694 | $_url = "parametre_url(self(),$_variable,\$s?$_sens:$_champ)"; |
| 2695 | - $_url = "parametre_url($_url,'var_memotri',strncmp(" . $boucle->modificateur['tri_nom'] . ",'session',7)==0?$_variable:'')"; |
|
| 2696 | - $_on = "\$s?(" . $boucle->modificateur['tri_sens'] . "==$_sens" . '):(' . $boucle->modificateur['tri_champ'] . "==$_champ)"; |
|
| 2695 | + $_url = "parametre_url($_url,'var_memotri',strncmp(".$boucle->modificateur['tri_nom'].",'session',7)==0?$_variable:'')"; |
|
| 2696 | + $_on = "\$s?(".$boucle->modificateur['tri_sens']."==$_sens".'):('.$boucle->modificateur['tri_champ']."==$_champ)"; |
|
| 2697 | 2697 | |
| 2698 | - $p->code = "lien_ou_expose($_url,$_libelle,$_on" . ($_class ? ",$_class" : "") . ")"; |
|
| 2698 | + $p->code = "lien_ou_expose($_url,$_libelle,$_on".($_class ? ",$_class" : "").")"; |
|
| 2699 | 2699 | //$p->code = "''"; |
| 2700 | 2700 | $p->interdire_scripts = false; |
| 2701 | 2701 | |
@@ -2769,7 +2769,7 @@ discard block |
||
| 2769 | 2769 | $connect = $p->boucles[$p->id_boucle]->sql_serveur; |
| 2770 | 2770 | } |
| 2771 | 2771 | |
| 2772 | - $p->code = "(objet_test_si_publie(" . $_type . ",intval(" . $_id . ")," . _q($connect) . ")?' ':'')"; |
|
| 2772 | + $p->code = "(objet_test_si_publie(".$_type.",intval(".$_id."),"._q($connect).")?' ':'')"; |
|
| 2773 | 2773 | $p->interdire_scripts = false; |
| 2774 | 2774 | |
| 2775 | 2775 | return $p; |