@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $GLOBALS['debug_objets']['courant'] = $nom; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - $phpfile = sous_repertoire(_DIR_SKELS, '', false, true) . $nom . '.php'; |
|
| 57 | + $phpfile = sous_repertoire(_DIR_SKELS, '', false, true).$nom.'.php'; |
|
| 58 | 58 | |
| 59 | 59 | // si squelette est deja compile et perenne, le charger |
| 60 | 60 | if (!squelette_obsolete($phpfile, $source)) { |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | #} |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - if (file_exists($lib = $squelette . '_fonctions' . '.php')) { |
|
| 70 | + if (file_exists($lib = $squelette.'_fonctions'.'.php')) { |
|
| 71 | 71 | include_once $lib; |
| 72 | 72 | } |
| 73 | 73 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | } catch (\ParseError $e) { |
| 107 | 107 | // Code syntaxiquement faux (critere etc mal programme') |
| 108 | - $msg = _T('zbug_erreur_compilation') . ' | Line ' . $e->getLine() . ' : ' . $e->getMessage(); |
|
| 108 | + $msg = _T('zbug_erreur_compilation').' | Line '.$e->getLine().' : '.$e->getMessage(); |
|
| 109 | 109 | erreur_squelette($msg, $boucle); |
| 110 | 110 | // continuer pour trouver d'autres fautes eventuelles |
| 111 | 111 | // mais prevenir que c'est mort |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | if (defined('_VAR_MODE') and _VAR_MODE == 'debug') { |
| 135 | 135 | |
| 136 | 136 | // Tracer ce qui vient d'etre compile |
| 137 | - $GLOBALS['debug_objets']['code'][$nom . 'tout'] = $code; |
|
| 137 | + $GLOBALS['debug_objets']['code'][$nom.'tout'] = $code; |
|
| 138 | 138 | |
| 139 | 139 | // si c'est ce que demande le debusqueur, lui passer la main |
| 140 | 140 | if ($GLOBALS['debug_objets']['sourcefile'] |
@@ -156,13 +156,13 @@ discard block |
||
| 156 | 156 | $code = " |
| 157 | 157 | /* |
| 158 | 158 | * Squelette : $sourcefile |
| 159 | - * Date : " . gmdate("D, d M Y H:i:s", @filemtime($sourcefile)) . " GMT |
|
| 160 | - * Compile : " . gmdate("D, d M Y H:i:s", time()) . " GMT |
|
| 161 | - * " . (!$boucles ? "Pas de boucle" : ("Boucles : " . $noms)) . " |
|
| 159 | + * Date : ".gmdate("D, d M Y H:i:s", @filemtime($sourcefile))." GMT |
|
| 160 | + * Compile : " . gmdate("D, d M Y H:i:s", time())." GMT |
|
| 161 | + * " . (!$boucles ? "Pas de boucle" : ("Boucles : ".$noms))." |
|
| 162 | 162 | */ "; |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - $code = '<' . "?php\n" . $code . join('', $boucles) . "\n?" . '>'; |
|
| 165 | + $code = '<'."?php\n".$code.join('', $boucles)."\n?".'>'; |
|
| 166 | 166 | if (!defined('_VAR_NOCACHE') or !_VAR_NOCACHE) { |
| 167 | 167 | ecrire_fichier($phpfile, $code); |
| 168 | 168 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | $j = join('-', array_map('ucwords', explode('-', strtolower($r[2])))); |
| 223 | 223 | |
| 224 | 224 | if ($j == 'X-Spip-Filtre' and isset($headers[$j])) { |
| 225 | - $headers[$j] .= "|" . $r[3]; |
|
| 225 | + $headers[$j] .= "|".$r[3]; |
|
| 226 | 226 | } else { |
| 227 | 227 | $headers[$j] = $r[3]; |
| 228 | 228 | } |
@@ -230,10 +230,10 @@ discard block |
||
| 230 | 230 | } |
| 231 | 231 | // S'agit-il d'un resultat constant ou contenant du code php |
| 232 | 232 | $process_ins = ( |
| 233 | - strpos($corps, '<' . '?') === false |
|
| 233 | + strpos($corps, '<'.'?') === false |
|
| 234 | 234 | or |
| 235 | - (strpos($corps, '<' . '?xml') !== false and |
|
| 236 | - strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 235 | + (strpos($corps, '<'.'?xml') !== false and |
|
| 236 | + strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false) |
|
| 237 | 237 | ) |
| 238 | 238 | ? 'html' |
| 239 | 239 | : 'php'; |
@@ -262,10 +262,10 @@ discard block |
||
| 262 | 262 | |
| 263 | 263 | if ($process_ins == 'html') { |
| 264 | 264 | $skel['process_ins'] = ( |
| 265 | - strpos($corps, '<' . '?') === false |
|
| 265 | + strpos($corps, '<'.'?') === false |
|
| 266 | 266 | or |
| 267 | - (strpos($corps, '<' . '?xml') !== false and |
|
| 268 | - strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 267 | + (strpos($corps, '<'.'?xml') !== false and |
|
| 268 | + strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false) |
|
| 269 | 269 | ) |
| 270 | 270 | ? 'html' |
| 271 | 271 | : 'php'; |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | // |
| 284 | 284 | |
| 285 | 285 | /** Code PHP pour inclure une balise dynamique à l'exécution d'une page */ |
| 286 | -define('CODE_INCLURE_BALISE', '<' . '?php |
|
| 286 | +define('CODE_INCLURE_BALISE', '<'.'?php |
|
| 287 | 287 | include_once("%s"); |
| 288 | 288 | if ($lang_select = "%s") $lang_select = lang_select($lang_select); |
| 289 | 289 | inserer_balise_dynamique(balise_%s_dyn(%s), array(%s)); |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | **/ |
| 311 | 311 | function synthetiser_balise_dynamique($nom, $args, $file, $context_compil) { |
| 312 | 312 | if (strncmp($file, "/", 1) !== 0) { |
| 313 | - $file = './" . _DIR_RACINE . "' . $file; |
|
| 313 | + $file = './" . _DIR_RACINE . "'.$file; |
|
| 314 | 314 | } |
| 315 | 315 | |
| 316 | 316 | $lang = $context_compil[4]; |
@@ -352,14 +352,14 @@ discard block |
||
| 352 | 352 | if (is_object($v)) { |
| 353 | 353 | return var_export($v, true); |
| 354 | 354 | } elseif (!is_array($v)) { |
| 355 | - return "'" . texte_script($v) . "'"; |
|
| 355 | + return "'".texte_script($v)."'"; |
|
| 356 | 356 | } else { |
| 357 | 357 | $out = array(); |
| 358 | 358 | foreach ($v as $k => $val) { |
| 359 | - $out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val); |
|
| 359 | + $out [] = argumenter_squelette($k).'=>'.argumenter_squelette($val); |
|
| 360 | 360 | } |
| 361 | 361 | |
| 362 | - return 'array(' . join(", ", $out) . ')'; |
|
| 362 | + return 'array('.join(", ", $out).')'; |
|
| 363 | 363 | } |
| 364 | 364 | } |
| 365 | 365 | |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | // Y a-t-il une fonction de traitement des arguments ? |
| 438 | - $f = 'balise_' . $nom_balise . '_stat'; |
|
| 438 | + $f = 'balise_'.$nom_balise.'_stat'; |
|
| 439 | 439 | |
| 440 | 440 | $r = !function_exists($f) ? $args : $f($args, $context_compil); |
| 441 | 441 | |
@@ -445,18 +445,18 @@ discard block |
||
| 445 | 445 | |
| 446 | 446 | // verifier que la fonction dyn est la, |
| 447 | 447 | // sinon se replier sur la generique si elle existe |
| 448 | - if (!function_exists('balise_' . $nom_balise . '_dyn')) { |
|
| 448 | + if (!function_exists('balise_'.$nom_balise.'_dyn')) { |
|
| 449 | 449 | if ( |
| 450 | 450 | $balise_generique = chercher_balise_generique($nom) |
| 451 | 451 | and $nom_balise_generique = $balise_generique['nom_generique'] |
| 452 | - and $file = include_spip("balise/" . strtolower($nom_balise_generique)) |
|
| 453 | - and function_exists('balise_' . $nom_balise_generique . '_dyn') |
|
| 452 | + and $file = include_spip("balise/".strtolower($nom_balise_generique)) |
|
| 453 | + and function_exists('balise_'.$nom_balise_generique.'_dyn') |
|
| 454 | 454 | ) { |
| 455 | 455 | // et lui injecter en premier arg le nom de la balise |
| 456 | 456 | array_unshift($r, $nom); |
| 457 | 457 | $nom_balise = $nom_balise_generique; |
| 458 | 458 | if (!_DIR_RESTREINT) { |
| 459 | - $file = _DIR_RESTREINT_ABS . $file; |
|
| 459 | + $file = _DIR_RESTREINT_ABS.$file; |
|
| 460 | 460 | } |
| 461 | 461 | } else { |
| 462 | 462 | $msg = array('zbug_balise_inexistante', array('from' => 'CVT', 'balise' => $nom)); |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | $n = ''; |
| 558 | 558 | foreach (explode(',', $liste) as $val) { |
| 559 | 559 | if ($a = intval($val) and $val === strval($a)) { |
| 560 | - $n .= ',' . $val; |
|
| 560 | + $n .= ','.$val; |
|
| 561 | 561 | } |
| 562 | 562 | } |
| 563 | 563 | if (strlen($n)) { |
@@ -736,14 +736,14 @@ discard block |
||
| 736 | 736 | // on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction |
| 737 | 737 | $i = 0; |
| 738 | 738 | do { |
| 739 | - $where[$k] = remplace_sous_requete($w, "(" . calculer_select( |
|
| 740 | - array($sous[1] . " AS id"), |
|
| 739 | + $where[$k] = remplace_sous_requete($w, "(".calculer_select( |
|
| 740 | + array($sous[1]." AS id"), |
|
| 741 | 741 | $from, |
| 742 | 742 | $from_type, |
| 743 | 743 | $wheresub, |
| 744 | 744 | $jsub, |
| 745 | 745 | array(), array(), '', |
| 746 | - $having, $table, $id, $serveur, false) . ")"); |
|
| 746 | + $having, $table, $id, $serveur, false).")"); |
|
| 747 | 747 | if (!$i) { |
| 748 | 748 | $i = 1; |
| 749 | 749 | $wherestring = calculer_where_to_string($where[$k]); |
@@ -762,7 +762,7 @@ discard block |
||
| 762 | 762 | if ($sous[0] == 'SUBSELECT') { |
| 763 | 763 | // c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having) |
| 764 | 764 | array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ? |
| 765 | - $where[$k] = remplace_sous_requete($w, "(" . calculer_select( |
|
| 765 | + $where[$k] = remplace_sous_requete($w, "(".calculer_select( |
|
| 766 | 766 | $sous[1], # select |
| 767 | 767 | $sous[2], #from |
| 768 | 768 | array(), #from_type |
@@ -774,7 +774,7 @@ discard block |
||
| 774 | 774 | $sous[6], #limit |
| 775 | 775 | $sous[7] ? $sous[7] : array(), #having |
| 776 | 776 | $table, $id, $serveur, false |
| 777 | - ) . ")"); |
|
| 777 | + ).")"); |
|
| 778 | 778 | } |
| 779 | 779 | array_pop($where_simples); |
| 780 | 780 | } |
@@ -836,15 +836,15 @@ discard block |
||
| 836 | 836 | // sans recours a preg_match |
| 837 | 837 | // un implode(' ',..) est fait dans reinjecte_joint un peu plus bas |
| 838 | 838 | $afrom[$t][$cle] = array( |
| 839 | - "\n" . |
|
| 840 | - (isset($from_type[$cle]) ? $from_type[$cle] : "INNER") . " JOIN", |
|
| 839 | + "\n". |
|
| 840 | + (isset($from_type[$cle]) ? $from_type[$cle] : "INNER")." JOIN", |
|
| 841 | 841 | $from[$cle], |
| 842 | 842 | "AS $cle", |
| 843 | 843 | "ON (", |
| 844 | 844 | "$cle.$c", |
| 845 | 845 | "=", |
| 846 | 846 | "$t.$carr", |
| 847 | - ($and ? "AND " . $and : "") . |
|
| 847 | + ($and ? "AND ".$and : ""). |
|
| 848 | 848 | ")" |
| 849 | 849 | ); |
| 850 | 850 | if (isset($afrom[$cle])) { |
@@ -882,7 +882,7 @@ discard block |
||
| 882 | 882 | $t = key($from); |
| 883 | 883 | $c = current($from); |
| 884 | 884 | reset($from); |
| 885 | - $e = '/\b(' . "$t\\." . join("|" . $t . '\.', $equiv) . ')\b/'; |
|
| 885 | + $e = '/\b('."$t\\.".join("|".$t.'\.', $equiv).')\b/'; |
|
| 886 | 886 | if (!(strpos($t, ' ') or // jointure des le depart cf boucle_doc |
| 887 | 887 | calculer_jointnul($t, $select, $e) or |
| 888 | 888 | calculer_jointnul($t, $join, $e) or |
@@ -899,7 +899,7 @@ discard block |
||
| 899 | 899 | unset($afrom[$t][$nt]); |
| 900 | 900 | $afrom[$nt] = $afrom[$t]; |
| 901 | 901 | unset($afrom[$t]); |
| 902 | - $e = '/\b' . preg_quote($nfrom[6]) . '\b/'; |
|
| 902 | + $e = '/\b'.preg_quote($nfrom[6]).'\b/'; |
|
| 903 | 903 | $t = $nfrom[4]; |
| 904 | 904 | $alias = ""; |
| 905 | 905 | // verifier que les deux cles sont homonymes, sinon installer un alias dans le select |
@@ -910,14 +910,14 @@ discard block |
||
| 910 | 910 | if ($newcle != $oldcle) { |
| 911 | 911 | // si l'ancienne cle etait deja dans le select avec un AS |
| 912 | 912 | // reprendre simplement ce AS |
| 913 | - $as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/'; |
|
| 913 | + $as = '/\b'.preg_quote($nfrom[6]).'\s+(AS\s+\w+)\b/'; |
|
| 914 | 914 | if (preg_match($as, implode(',', $select), $m)) { |
| 915 | 915 | $alias = ""; |
| 916 | 916 | } else { |
| 917 | - $alias = ", " . $nfrom[4] . " AS $oldcle"; |
|
| 917 | + $alias = ", ".$nfrom[4]." AS $oldcle"; |
|
| 918 | 918 | } |
| 919 | 919 | } |
| 920 | - $select = remplacer_jointnul($t . $alias, $select, $e); |
|
| 920 | + $select = remplacer_jointnul($t.$alias, $select, $e); |
|
| 921 | 921 | $join = remplacer_jointnul($t, $join, $e); |
| 922 | 922 | $where = remplacer_jointnul($t, $where, $e); |
| 923 | 923 | $having = remplacer_jointnul($t, $having, $e); |
@@ -958,9 +958,9 @@ discard block |
||
| 958 | 958 | } else { |
| 959 | 959 | $exp = ""; |
| 960 | 960 | if (strtoupper($join) === 'AND') { |
| 961 | - return $exp . join(" $join ", array_map('calculer_where_to_string', $v)); |
|
| 961 | + return $exp.join(" $join ", array_map('calculer_where_to_string', $v)); |
|
| 962 | 962 | } else { |
| 963 | - return $exp . join($join, $v); |
|
| 963 | + return $exp.join($join, $v); |
|
| 964 | 964 | } |
| 965 | 965 | } |
| 966 | 966 | } |
@@ -1026,6 +1026,6 @@ discard block |
||
| 1026 | 1026 | } |
| 1027 | 1027 | |
| 1028 | 1028 | return $mime_type |
| 1029 | - . (!$connect ? '' : preg_replace('/\W/', "_", $connect)) . '_' |
|
| 1030 | - . md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : '')); |
|
| 1029 | + . (!$connect ? '' : preg_replace('/\W/', "_", $connect)).'_' |
|
| 1030 | + . md5($GLOBALS['spip_version_code'].' * '.$skel.(isset($GLOBALS['marqueur_skel']) ? '*'.$GLOBALS['marqueur_skel'] : '')); |
|
| 1031 | 1031 | } |