@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $GLOBALS['debug_objets']['courant'] = $nom; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - $phpfile = sous_repertoire(_DIR_SKELS, '', false, true) . $nom . '.php'; |
|
| 58 | + $phpfile = sous_repertoire(_DIR_SKELS, '', false, true).$nom.'.php'; |
|
| 59 | 59 | |
| 60 | 60 | // si squelette est deja compile et perenne, le charger |
| 61 | 61 | if (!squelette_obsolete($phpfile, $source)) { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | #} |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - if (file_exists($lib = $squelette . '_fonctions' . '.php')) { |
|
| 71 | + if (file_exists($lib = $squelette.'_fonctions'.'.php')) { |
|
| 72 | 72 | include_once $lib; |
| 73 | 73 | } |
| 74 | 74 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | eval("return true; $f ;"); |
| 97 | 97 | } catch (\ParseError $e) { |
| 98 | 98 | // Code syntaxiquement faux (critere etc mal programme') |
| 99 | - $msg = _T('zbug_erreur_compilation') . ' | Line ' . $e->getLine() . ' : ' . $e->getMessage(); |
|
| 99 | + $msg = _T('zbug_erreur_compilation').' | Line '.$e->getLine().' : '.$e->getMessage(); |
|
| 100 | 100 | erreur_squelette($msg, $boucle); |
| 101 | 101 | // continuer pour trouver d'autres fautes eventuelles |
| 102 | 102 | // mais prevenir que c'est mort |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | if (defined('_VAR_MODE') and _VAR_MODE == 'debug') { |
| 126 | 126 | // Tracer ce qui vient d'etre compile |
| 127 | - $GLOBALS['debug_objets']['code'][$nom . 'tout'] = $code; |
|
| 127 | + $GLOBALS['debug_objets']['code'][$nom.'tout'] = $code; |
|
| 128 | 128 | |
| 129 | 129 | // si c'est ce que demande le debusqueur, lui passer la main |
| 130 | 130 | if ( |
@@ -148,13 +148,13 @@ discard block |
||
| 148 | 148 | $code = " |
| 149 | 149 | /* |
| 150 | 150 | * Squelette : $sourcefile |
| 151 | - * Date : " . gmdate('D, d M Y H:i:s', @filemtime($sourcefile)) . ' GMT |
|
| 152 | - * Compile : ' . gmdate('D, d M Y H:i:s', time()) . ' GMT |
|
| 153 | - * ' . (!$boucles ? 'Pas de boucle' : ('Boucles : ' . $noms)) . ' |
|
| 151 | + * Date : ".gmdate('D, d M Y H:i:s', @filemtime($sourcefile)).' GMT |
|
| 152 | + * Compile : ' . gmdate('D, d M Y H:i:s', time()).' GMT |
|
| 153 | + * ' . (!$boucles ? 'Pas de boucle' : ('Boucles : '.$noms)).' |
|
| 154 | 154 | */ '; |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | - $code = '<' . "?php\n" . $code . join('', $boucles) . "\n?" . '>'; |
|
| 157 | + $code = '<'."?php\n".$code.join('', $boucles)."\n?".'>'; |
|
| 158 | 158 | if (!defined('_VAR_NOCACHE') or !_VAR_NOCACHE) { |
| 159 | 159 | ecrire_fichier($phpfile, $code); |
| 160 | 160 | } |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | $j = join('-', array_map('ucwords', explode('-', strtolower($r[2])))); |
| 216 | 216 | |
| 217 | 217 | if ($j == 'X-Spip-Filtre' and isset($headers[$j])) { |
| 218 | - $headers[$j] .= '|' . $r[3]; |
|
| 218 | + $headers[$j] .= '|'.$r[3]; |
|
| 219 | 219 | } else { |
| 220 | 220 | $headers[$j] = $r[3]; |
| 221 | 221 | } |
@@ -223,10 +223,10 @@ discard block |
||
| 223 | 223 | } |
| 224 | 224 | // S'agit-il d'un resultat constant ou contenant du code php |
| 225 | 225 | $process_ins = ( |
| 226 | - strpos($corps, '<' . '?') === false |
|
| 226 | + strpos($corps, '<'.'?') === false |
|
| 227 | 227 | or |
| 228 | - (strpos($corps, '<' . '?xml') !== false and |
|
| 229 | - strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 228 | + (strpos($corps, '<'.'?xml') !== false and |
|
| 229 | + strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false) |
|
| 230 | 230 | ) |
| 231 | 231 | ? 'html' |
| 232 | 232 | : 'php'; |
@@ -255,10 +255,10 @@ discard block |
||
| 255 | 255 | |
| 256 | 256 | if ($process_ins == 'html') { |
| 257 | 257 | $skel['process_ins'] = ( |
| 258 | - strpos($corps, '<' . '?') === false |
|
| 258 | + strpos($corps, '<'.'?') === false |
|
| 259 | 259 | or |
| 260 | - (strpos($corps, '<' . '?xml') !== false and |
|
| 261 | - strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 260 | + (strpos($corps, '<'.'?xml') !== false and |
|
| 261 | + strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false) |
|
| 262 | 262 | ) |
| 263 | 263 | ? 'html' |
| 264 | 264 | : 'php'; |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | // |
| 277 | 277 | |
| 278 | 278 | /** Code PHP pour inclure une balise dynamique à l'exécution d'une page */ |
| 279 | -define('CODE_INCLURE_BALISE', '<' . '?php |
|
| 279 | +define('CODE_INCLURE_BALISE', '<'.'?php |
|
| 280 | 280 | include_once("%s"); |
| 281 | 281 | if ($lang_select = "%s") $lang_select = lang_select($lang_select); |
| 282 | 282 | inserer_balise_dynamique(balise_%s_dyn(%s), array(%s)); |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | // pas de lien symbolique sous Windows |
| 308 | 308 | and !(stristr(PHP_OS, 'WIN') and strpos($file, ':') !== false) |
| 309 | 309 | ) { |
| 310 | - $file = './" . _DIR_RACINE . "' . $file; |
|
| 310 | + $file = './" . _DIR_RACINE . "'.$file; |
|
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | $lang = $context_compil[4]; |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | |
| 318 | 318 | $args = array_map('argumenter_squelette', $args); |
| 319 | 319 | if (!empty($context_compil['appel_php_depuis_modele'])) { |
| 320 | - $args[0] = 'arguments_balise_dyn_depuis_modele(' . $args[0] . ')'; |
|
| 320 | + $args[0] = 'arguments_balise_dyn_depuis_modele('.$args[0].')'; |
|
| 321 | 321 | } |
| 322 | 322 | $args = join(', ', $args); |
| 323 | 323 | |
@@ -351,14 +351,14 @@ discard block |
||
| 351 | 351 | if (is_object($v)) { |
| 352 | 352 | return var_export($v, true); |
| 353 | 353 | } elseif (!is_array($v)) { |
| 354 | - return "'" . texte_script((string) $v) . "'"; |
|
| 354 | + return "'".texte_script((string) $v)."'"; |
|
| 355 | 355 | } else { |
| 356 | 356 | $out = []; |
| 357 | 357 | foreach ($v as $k => $val) { |
| 358 | - $out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val); |
|
| 358 | + $out [] = argumenter_squelette($k).'=>'.argumenter_squelette($val); |
|
| 359 | 359 | } |
| 360 | 360 | |
| 361 | - return 'array(' . join(', ', $out) . ')'; |
|
| 361 | + return 'array('.join(', ', $out).')'; |
|
| 362 | 362 | } |
| 363 | 363 | } |
| 364 | 364 | |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | // Y a-t-il une fonction de traitement des arguments ? |
| 439 | - $f = 'balise_' . $nom_balise . '_stat'; |
|
| 439 | + $f = 'balise_'.$nom_balise.'_stat'; |
|
| 440 | 440 | |
| 441 | 441 | $r = !function_exists($f) ? $args : $f($args, $context_compil); |
| 442 | 442 | |
@@ -446,18 +446,18 @@ discard block |
||
| 446 | 446 | |
| 447 | 447 | // verifier que la fonction dyn est la, |
| 448 | 448 | // sinon se replier sur la generique si elle existe |
| 449 | - if (!function_exists('balise_' . $nom_balise . '_dyn')) { |
|
| 449 | + if (!function_exists('balise_'.$nom_balise.'_dyn')) { |
|
| 450 | 450 | if ( |
| 451 | 451 | $balise_generique = chercher_balise_generique($nom) |
| 452 | 452 | and $nom_balise_generique = $balise_generique['nom_generique'] |
| 453 | - and $file = include_spip('balise/' . strtolower($nom_balise_generique)) |
|
| 454 | - and function_exists('balise_' . $nom_balise_generique . '_dyn') |
|
| 453 | + and $file = include_spip('balise/'.strtolower($nom_balise_generique)) |
|
| 454 | + and function_exists('balise_'.$nom_balise_generique.'_dyn') |
|
| 455 | 455 | ) { |
| 456 | 456 | // et lui injecter en premier arg le nom de la balise |
| 457 | 457 | array_unshift($r, $nom); |
| 458 | 458 | $nom_balise = $nom_balise_generique; |
| 459 | 459 | if (!_DIR_RESTREINT) { |
| 460 | - $file = _DIR_RESTREINT_ABS . $file; |
|
| 460 | + $file = _DIR_RESTREINT_ABS.$file; |
|
| 461 | 461 | } |
| 462 | 462 | } else { |
| 463 | 463 | $msg = ['zbug_balise_inexistante', ['from' => 'CVT', 'balise' => $nom]]; |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | $n = ''; |
| 559 | 559 | foreach (explode(',', $liste) as $val) { |
| 560 | 560 | if ($a = intval($val) and $val === strval($a)) { |
| 561 | - $n .= ',' . $val; |
|
| 561 | + $n .= ','.$val; |
|
| 562 | 562 | } |
| 563 | 563 | } |
| 564 | 564 | if (strlen($n)) { |
@@ -737,8 +737,8 @@ discard block |
||
| 737 | 737 | // on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction |
| 738 | 738 | $i = 0; |
| 739 | 739 | do { |
| 740 | - $where[$k] = remplace_sous_requete($w, '(' . calculer_select( |
|
| 741 | - [$sous[1] . ' AS id'], |
|
| 740 | + $where[$k] = remplace_sous_requete($w, '('.calculer_select( |
|
| 741 | + [$sous[1].' AS id'], |
|
| 742 | 742 | $from, |
| 743 | 743 | $from_type, |
| 744 | 744 | $wheresub, |
@@ -751,7 +751,7 @@ discard block |
||
| 751 | 751 | $id, |
| 752 | 752 | $serveur, |
| 753 | 753 | false |
| 754 | - ) . ')'); |
|
| 754 | + ).')'); |
|
| 755 | 755 | if (!$i) { |
| 756 | 756 | $i = 1; |
| 757 | 757 | $wherestring = calculer_where_to_string($where[$k]); |
@@ -771,7 +771,7 @@ discard block |
||
| 771 | 771 | if ($sous[0] == 'SUBSELECT') { |
| 772 | 772 | // c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having) |
| 773 | 773 | array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ? |
| 774 | - $where[$k] = remplace_sous_requete($w, '(' . calculer_select( |
|
| 774 | + $where[$k] = remplace_sous_requete($w, '('.calculer_select( |
|
| 775 | 775 | $sous[1], # select |
| 776 | 776 | $sous[2], #from |
| 777 | 777 | [], #from_type |
@@ -786,7 +786,7 @@ discard block |
||
| 786 | 786 | $id, |
| 787 | 787 | $serveur, |
| 788 | 788 | false |
| 789 | - ) . ')'); |
|
| 789 | + ).')'); |
|
| 790 | 790 | } |
| 791 | 791 | array_pop($where_simples); |
| 792 | 792 | } |
@@ -849,15 +849,15 @@ discard block |
||
| 849 | 849 | // sans recours a preg_match |
| 850 | 850 | // un implode(' ',..) est fait dans reinjecte_joint un peu plus bas |
| 851 | 851 | $afrom[$t][$cle] = [ |
| 852 | - "\n" . |
|
| 853 | - ($from_type[$cle] ?? 'INNER') . ' JOIN', |
|
| 852 | + "\n". |
|
| 853 | + ($from_type[$cle] ?? 'INNER').' JOIN', |
|
| 854 | 854 | $from[$cle], |
| 855 | 855 | "AS $cle", |
| 856 | 856 | 'ON (', |
| 857 | 857 | "$cle.$c", |
| 858 | 858 | '=', |
| 859 | 859 | "$t.$carr", |
| 860 | - ($and ? 'AND ' . $and : '') . |
|
| 860 | + ($and ? 'AND '.$and : ''). |
|
| 861 | 861 | ')' |
| 862 | 862 | ]; |
| 863 | 863 | if (isset($afrom[$cle])) { |
@@ -895,7 +895,7 @@ discard block |
||
| 895 | 895 | $t = key($from); |
| 896 | 896 | $c = current($from); |
| 897 | 897 | reset($from); |
| 898 | - $e = '/\b(' . "$t\\." . join('|' . $t . '\.', $equiv) . ')\b/'; |
|
| 898 | + $e = '/\b('."$t\\.".join('|'.$t.'\.', $equiv).')\b/'; |
|
| 899 | 899 | if ( |
| 900 | 900 | !(strpos($t, ' ') or // jointure des le depart cf boucle_doc |
| 901 | 901 | calculer_jointnul($t, $select, $e) or |
@@ -913,7 +913,7 @@ discard block |
||
| 913 | 913 | unset($afrom[$t][$nt]); |
| 914 | 914 | $afrom[$nt] = $afrom[$t]; |
| 915 | 915 | unset($afrom[$t]); |
| 916 | - $e = '/\b' . preg_quote($nfrom[6]) . '\b/'; |
|
| 916 | + $e = '/\b'.preg_quote($nfrom[6]).'\b/'; |
|
| 917 | 917 | $t = $nfrom[4]; |
| 918 | 918 | $alias = ''; |
| 919 | 919 | // verifier que les deux cles sont homonymes, sinon installer un alias dans le select |
@@ -924,14 +924,14 @@ discard block |
||
| 924 | 924 | if ($newcle != $oldcle) { |
| 925 | 925 | // si l'ancienne cle etait deja dans le select avec un AS |
| 926 | 926 | // reprendre simplement ce AS |
| 927 | - $as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/'; |
|
| 927 | + $as = '/\b'.preg_quote($nfrom[6]).'\s+(AS\s+\w+)\b/'; |
|
| 928 | 928 | if (preg_match($as, implode(',', $select), $m)) { |
| 929 | 929 | $alias = ''; |
| 930 | 930 | } else { |
| 931 | - $alias = ', ' . $nfrom[4] . " AS $oldcle"; |
|
| 931 | + $alias = ', '.$nfrom[4]." AS $oldcle"; |
|
| 932 | 932 | } |
| 933 | 933 | } |
| 934 | - $select = remplacer_jointnul($t . $alias, $select, $e); |
|
| 934 | + $select = remplacer_jointnul($t.$alias, $select, $e); |
|
| 935 | 935 | $join = remplacer_jointnul($t, $join, $e); |
| 936 | 936 | $where = remplacer_jointnul($t, $where, $e); |
| 937 | 937 | $having = remplacer_jointnul($t, $having, $e); |
@@ -981,9 +981,9 @@ discard block |
||
| 981 | 981 | } else { |
| 982 | 982 | $exp = ''; |
| 983 | 983 | if (strtoupper($join) === 'AND') { |
| 984 | - return $exp . join(" $join ", array_map('calculer_where_to_string', $v)); |
|
| 984 | + return $exp.join(" $join ", array_map('calculer_where_to_string', $v)); |
|
| 985 | 985 | } else { |
| 986 | - return $exp . join($join, $v); |
|
| 986 | + return $exp.join($join, $v); |
|
| 987 | 987 | } |
| 988 | 988 | } |
| 989 | 989 | } |
@@ -1045,6 +1045,6 @@ discard block |
||
| 1045 | 1045 | } |
| 1046 | 1046 | |
| 1047 | 1047 | return $mime_type |
| 1048 | - . (!$connect ? '' : preg_replace('/\W/', '_', $connect)) . '_' |
|
| 1049 | - . md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : '')); |
|
| 1048 | + . (!$connect ? '' : preg_replace('/\W/', '_', $connect)).'_' |
|
| 1049 | + . md5($GLOBALS['spip_version_code'].' * '.$skel.(isset($GLOBALS['marqueur_skel']) ? '*'.$GLOBALS['marqueur_skel'] : '')); |
|
| 1050 | 1050 | } |