@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | try { |
| 52 | - $res = eval('?' . '>' . $page['texte']); |
|
| 52 | + $res = eval('?'.'>'.$page['texte']); |
|
| 53 | 53 | $page['texte'] = ob_get_contents(); |
| 54 | 54 | } catch (\Throwable $e) { |
| 55 | 55 | $code = $page['texte']; |
@@ -57,12 +57,12 @@ discard block |
||
| 57 | 57 | if (!function_exists('numerote_ligne_php')) { |
| 58 | 58 | function numerote_ligne_php($match) { |
| 59 | 59 | $GLOBALS['numero_ligne_php']++; |
| 60 | - return "\n/*" . str_pad($GLOBALS['numero_ligne_php'], 3, '0', STR_PAD_LEFT) . '*/'; |
|
| 60 | + return "\n/*".str_pad($GLOBALS['numero_ligne_php'], 3, '0', STR_PAD_LEFT).'*/'; |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | - $code = '/*001*/' . preg_replace_callback(",\n,", 'numerote_ligne_php', $code); |
|
| 63 | + $code = '/*001*/'.preg_replace_callback(",\n,", 'numerote_ligne_php', $code); |
|
| 64 | 64 | $code = trim(highlight_string($code, true)); |
| 65 | - erreur_squelette('L' . $e->getLine() . ': ' . $e->getMessage() . '<br />' . $code, [$page['source'],'',$e->getFile(),'',$GLOBALS['spip_lang']]); |
|
| 65 | + erreur_squelette('L'.$e->getLine().': '.$e->getMessage().'<br />'.$code, [$page['source'], '', $e->getFile(), '', $GLOBALS['spip_lang']]); |
|
| 66 | 66 | $page['texte'] = '<!-- Erreur -->'; |
| 67 | 67 | } |
| 68 | 68 | ob_end_clean(); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | return sql_getfetsel( |
| 36 | 36 | 'virtuel', |
| 37 | 37 | 'spip_articles', |
| 38 | - ['id_article=' . (int) $id_article, "statut='publie'"], |
|
| 38 | + ['id_article='.(int) $id_article, "statut='publie'"], |
|
| 39 | 39 | '', |
| 40 | 40 | '', |
| 41 | 41 | '', |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $cache_quete[$connect][$table][$id] = sql_fetsel( |
| 79 | 79 | $cache_quete[$connect][$table]['_select'], |
| 80 | 80 | $table, |
| 81 | - $cache_quete[$connect][$table]['_id'] . '=' . (int) $id, |
|
| 81 | + $cache_quete[$connect][$table]['_id'].'='.(int) $id, |
|
| 82 | 82 | '', |
| 83 | 83 | '', |
| 84 | 84 | '', |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | return |
| 170 | 170 | (isset($GLOBALS['meta']['date_prochain_postdate']) |
| 171 | 171 | && $GLOBALS['meta']['date_prochain_postdate'] > time()) |
| 172 | - ? "$champ_date<" . sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur) |
|
| 172 | + ? "$champ_date<".sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur) |
|
| 173 | 173 | : '1=1'; |
| 174 | 174 | } |
| 175 | 175 | |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | && ($id_table = reset($objet)) |
| 229 | 229 | && ($objet = objet_type($id_table)) |
| 230 | 230 | ) { |
| 231 | - $w = "$mstatut<>" . sql_quote($v); |
|
| 231 | + $w = "$mstatut<>".sql_quote($v); |
|
| 232 | 232 | |
| 233 | 233 | // retrouver l’id_auteur qui a filé un lien de prévisu éventuellement, |
| 234 | 234 | // sinon l’auteur en session |
@@ -242,22 +242,22 @@ discard block |
||
| 242 | 242 | } |
| 243 | 243 | |
| 244 | 244 | // dans ce cas (admin en general), pas de filtrage sur ce statut |
| 245 | - if (!autoriser('previsualiser' . $v, $objet, '', $id_auteur)) { |
|
| 245 | + if (!autoriser('previsualiser'.$v, $objet, '', $id_auteur)) { |
|
| 246 | 246 | // si pas d'auteur identifie pas de sous-requete car pas d'article qui matche |
| 247 | 247 | if (!$id_auteur) { |
| 248 | 248 | $where[] = $w; |
| 249 | 249 | } else { |
| 250 | 250 | $primary = id_table_objet($objet); |
| 251 | - $where[] = "($w OR $id_table.$primary IN (" . sql_get_select( |
|
| 251 | + $where[] = "($w OR $id_table.$primary IN (".sql_get_select( |
|
| 252 | 252 | 'ssss.id_objet', |
| 253 | 253 | 'spip_auteurs_liens AS ssss', |
| 254 | - 'ssss.objet=' . sql_quote($objet) . ' AND ssss.id_auteur=' . (int) $id_auteur, |
|
| 254 | + 'ssss.objet='.sql_quote($objet).' AND ssss.id_auteur='.(int) $id_auteur, |
|
| 255 | 255 | '', |
| 256 | 256 | '', |
| 257 | 257 | '', |
| 258 | 258 | '', |
| 259 | 259 | $serveur |
| 260 | - ) . '))'; |
|
| 260 | + ).'))'; |
|
| 261 | 261 | } |
| 262 | 262 | } |
| 263 | 263 | } // ignorer ce statut si on ne sait pas comment le filtrer |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | * @return array|bool|null |
| 296 | 296 | */ |
| 297 | 297 | function quete_fichier($id_document, $serveur = '') { |
| 298 | - return sql_getfetsel('fichier', 'spip_documents', ('id_document=' . (int) $id_document), '', [], '', '', $serveur); |
|
| 298 | + return sql_getfetsel('fichier', 'spip_documents', ('id_document='.(int) $id_document), '', [], '', '', $serveur); |
|
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | /** |
@@ -306,7 +306,7 @@ discard block |
||
| 306 | 306 | * @return array|bool |
| 307 | 307 | */ |
| 308 | 308 | function quete_document($id_document, $serveur = '') { |
| 309 | - return sql_fetsel('*', 'spip_documents', ('id_document=' . (int) $id_document), '', [], '', '', $serveur); |
|
| 309 | + return sql_fetsel('*', 'spip_documents', ('id_document='.(int) $id_document), '', [], '', '', $serveur); |
|
| 310 | 310 | } |
| 311 | 311 | |
| 312 | 312 | /** |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | * @return array|bool|null |
| 318 | 318 | */ |
| 319 | 319 | function quete_meta($nom, $serveur) { |
| 320 | - return sql_getfetsel('valeur', 'spip_meta', 'nom=' . sql_quote($nom), '', '', '', '', $serveur); |
|
| 320 | + return sql_getfetsel('valeur', 'spip_meta', 'nom='.sql_quote($nom), '', '', '', '', $serveur); |
|
| 321 | 321 | } |
| 322 | 322 | |
| 323 | 323 | /** |
@@ -368,9 +368,9 @@ discard block |
||
| 368 | 368 | // qui permet de distinguer le changement de logo |
| 369 | 369 | // et placer un expire sur le dossier IMG/ |
| 370 | 370 | $res = [ |
| 371 | - $on['chemin'] . ($on['timestamp'] ? "?{$on['timestamp']}" : ''), |
|
| 372 | - ($off ? $off['chemin'] . ($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''), |
|
| 373 | - ($taille ? ' ' . $taille[3] : ('')) |
|
| 371 | + $on['chemin'].($on['timestamp'] ? "?{$on['timestamp']}" : ''), |
|
| 372 | + ($off ? $off['chemin'].($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''), |
|
| 373 | + ($taille ? ' '.$taille[3] : ('')) |
|
| 374 | 374 | ]; |
| 375 | 375 | $res['src'] = $res[0]; |
| 376 | 376 | $res['logo_on'] = $res[0]; |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | if ( |
| 481 | 481 | strcmp($logo, _DIR_PLUGINS) == 0 |
| 482 | 482 | || strcmp($logo, _DIR_PLUGINS_DIST) == 0 |
| 483 | - || strcmp($logo, _DIR_RACINE . 'prive/') == 0 |
|
| 483 | + || strcmp($logo, _DIR_RACINE.'prive/') == 0 |
|
| 484 | 484 | ) { |
| 485 | 485 | return $logo; |
| 486 | 486 | } |
@@ -656,7 +656,7 @@ discard block |
||
| 656 | 656 | $exposer[$m][$type][$principal] = true; |
| 657 | 657 | if ($type == 'id_mot') { |
| 658 | 658 | if (!$parent) { |
| 659 | - $parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot=' . (int) $principal, '', '', '', '', $connect); |
|
| 659 | + $parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot='.(int) $principal, '', '', '', '', $connect); |
|
| 660 | 660 | } |
| 661 | 661 | if ($parent) { |
| 662 | 662 | $exposer[$m]['id_groupe'][$parent] = true; |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | * texte |
| 41 | 41 | */ |
| 42 | 42 | function sandbox_composer_texte($texte, &$p) { |
| 43 | - return "'" . str_replace(['\\', "'"], ['\\\\', "\\'"], $texte) . "'"; |
|
| 43 | + return "'".str_replace(['\\', "'"], ['\\\\', "\\'"], $texte)."'"; |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $min_f = $refl->getNumberOfRequiredParameters(); |
| 79 | 79 | if (($nb_args_f < $min_f)) { |
| 80 | 80 | $msg_args = ['filtre' => texte_script($fonc), 'nb' => $min_f - $nb_args_f]; |
| 81 | - erreur_squelette([ 'zbug_erreur_filtre_nbarg_min', $msg_args], $p); |
|
| 81 | + erreur_squelette(['zbug_erreur_filtre_nbarg_min', $msg_args], $p); |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | // le filtre n'existe pas, |
@@ -159,8 +159,8 @@ discard block |
||
| 159 | 159 | */ |
| 160 | 160 | function sandbox_filtrer_squelette($skel, $corps, $filtres) { |
| 161 | 161 | $series_filtres = func_get_args(); |
| 162 | - array_shift($series_filtres);// skel |
|
| 163 | - array_shift($series_filtres);// corps |
|
| 162 | + array_shift($series_filtres); // skel |
|
| 163 | + array_shift($series_filtres); // corps |
|
| 164 | 164 | |
| 165 | 165 | // proteger les <INCLUDE> et tous les morceaux de php licites |
| 166 | 166 | if ($skel['process_ins'] == 'php') { |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | if (is_array($r)) { |
| 209 | 209 | $dst[] = $r[0]; |
| 210 | 210 | |
| 211 | - return $src[] = '___' . md5($r[0]) . '___'; |
|
| 211 | + return $src[] = '___'.md5($r[0]).'___'; |
|
| 212 | 212 | } |
| 213 | 213 | |
| 214 | 214 | // si on recoit pas un tableau, on renvoit les couples de substitution |
@@ -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,19 +55,19 @@ discard block |
||
| 55 | 55 | * Nom d'une balise #TOTO |
| 56 | 56 | * |
| 57 | 57 | * Écriture alambiquée pour rester compatible avec les hexadecimaux des vieux squelettes */ |
| 58 | -define('NOM_DE_CHAMP', '#((' . NOM_DE_BOUCLE . "):)?(([A-F]*[G-Z_][A-Z_0-9]*)|[A-Z_]+)\b(\*{0,2})"); |
|
| 58 | +define('NOM_DE_CHAMP', '#(('.NOM_DE_BOUCLE."):)?(([A-F]*[G-Z_][A-Z_0-9]*)|[A-Z_]+)\b(\*{0,2})"); |
|
| 59 | 59 | /** Balise complète [...(#TOTO) ... ] */ |
| 60 | -define('CHAMP_ETENDU', '/\[([^]\[]*)\(' . NOM_DE_CHAMP . '([^[)]*\)[^]\[]*)\]/S'); |
|
| 60 | +define('CHAMP_ETENDU', '/\[([^]\[]*)\('.NOM_DE_CHAMP.'([^[)]*\)[^]\[]*)\]/S'); |
|
| 61 | 61 | |
| 62 | 62 | define('BALISE_INCLURE', '/<INCLU[DR]E[[:space:]]*(\(([^)]*)\))?/S'); |
| 63 | 63 | define('BALISE_POLYGLOTTE', ',<multi>(.*)</multi>,Uims'); |
| 64 | 64 | define('BALISE_IDIOMES', ',<:(([a-z0-9_]+):)?([a-z0-9_]*)({([^\|=>]*=[^\|>]*)})?((\|[^>]*)?:/?>),iS'); |
| 65 | -define('BALISE_IDIOMES_ARGS', '@^\s*([^= ]*)\s*=\s*((' . NOM_DE_CHAMP . '[{][^}]*})?[^,]*)\s*,?\s*@s'); |
|
| 65 | +define('BALISE_IDIOMES_ARGS', '@^\s*([^= ]*)\s*=\s*(('.NOM_DE_CHAMP.'[{][^}]*})?[^,]*)\s*,?\s*@s'); |
|
| 66 | 66 | |
| 67 | 67 | /** Champ sql dans parenthèse ex: (id_article) */ |
| 68 | 68 | define('SQL_ARGS', '(\([^)]*\))'); |
| 69 | 69 | /** Fonction SQL sur un champ ex: SUM(visites) */ |
| 70 | -define('CHAMP_SQL_PLUS_FONC', '`?([A-Z_\/][A-Z_\/0-9.]*)' . SQL_ARGS . '?`?'); |
|
| 70 | +define('CHAMP_SQL_PLUS_FONC', '`?([A-Z_\/][A-Z_\/0-9.]*)'.SQL_ARGS.'?`?'); |
|
| 71 | 71 | |
| 72 | 72 | function phraser_inclure($texte, $ligne, $result) { |
| 73 | 73 | |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | * @return array |
| 223 | 223 | **/ |
| 224 | 224 | function phraser_champs($texte, $ligne, $result) { |
| 225 | - while (preg_match('/' . NOM_DE_CHAMP . '/S', $texte, $match)) { |
|
| 225 | + while (preg_match('/'.NOM_DE_CHAMP.'/S', $texte, $match)) { |
|
| 226 | 226 | $p = strpos($texte, (string) $match[0]); |
| 227 | 227 | // texte après la balise |
| 228 | 228 | $suite = substr($texte, $p + strlen($match[0])); |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | $collecte[] = $champ; |
| 370 | 370 | $args = ltrim($regs[count($regs) - 1]); |
| 371 | 371 | } else { |
| 372 | - if (!preg_match('/' . NOM_DE_CHAMP . '([{|])/', $arg, $r)) { |
|
| 372 | + if (!preg_match('/'.NOM_DE_CHAMP.'([{|])/', $arg, $r)) { |
|
| 373 | 373 | // 0 est un aveu d'impuissance. A completer |
| 374 | 374 | $arg = phraser_champs_exterieurs($arg, 0, $sep, $result); |
| 375 | 375 | |
@@ -453,7 +453,7 @@ discard block |
||
| 453 | 453 | function phraser_champs_exterieurs($texte, $ligne, $sep, $nested) { |
| 454 | 454 | $res = []; |
| 455 | 455 | while (($p = strpos($texte, (string) "%$sep")) !== false) { |
| 456 | - if (!preg_match(',^%' . preg_quote($sep, ',') . '([0-9]+)@,', substr($texte, $p), $m)) { |
|
| 456 | + if (!preg_match(',^%'.preg_quote($sep, ',').'([0-9]+)@,', substr($texte, $p), $m)) { |
|
| 457 | 457 | break; |
| 458 | 458 | } |
| 459 | 459 | $debut = substr($texte, 0, $p); |
@@ -493,7 +493,7 @@ discard block |
||
| 493 | 493 | $pos_apres = 0; |
| 494 | 494 | $result = phraser_args($match[7], ')', $sep, $result, $champ, $pos_apres); |
| 495 | 495 | phraser_vieux($champ); |
| 496 | - $champ->avant = phraser_champs_exterieurs($match[1], $n, $sep, $result); |
|
| 496 | + $champ->avant = phraser_champs_exterieurs($match[1], $n, $sep, $result); |
|
| 497 | 497 | $debut = substr($match[7], $pos_apres + 1); |
| 498 | 498 | if (!empty($debut)) { |
| 499 | 499 | $n += substr_count(substr($texte, 0, strpos($texte, $debut)), "\n"); |
@@ -623,7 +623,7 @@ discard block |
||
| 623 | 623 | // une maniere tres sale de supprimer les "' autour de {critere "xxx","yyy"} |
| 624 | 624 | if (preg_match(',^(["\'])(.*)\1$,', $m[4])) { |
| 625 | 625 | $c = null; |
| 626 | - eval('$c = ' . $m[4] . ';'); |
|
| 626 | + eval('$c = '.$m[4].';'); |
|
| 627 | 627 | if (isset($c)) { |
| 628 | 628 | $m[4] = $c; |
| 629 | 629 | } |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | if (preg_match(',^ *([0-9-]+) *(/) *(.+) *$,', $param, $m)) { |
| 704 | 704 | $crit = phraser_critere_infixe($m[1], $m[3], $v, '/', '', ''); |
| 705 | 705 | } elseif ( |
| 706 | - preg_match(',^([!]?)(' . CHAMP_SQL_PLUS_FONC . |
|
| 706 | + preg_match(',^([!]?)('.CHAMP_SQL_PLUS_FONC. |
|
| 707 | 707 | ')[[:space:]]*(\??)(!?)(<=?|>=?|==?|\b(?:IN|LIKE)\b)(.*)$,is', $param, $m) |
| 708 | 708 | ) { |
| 709 | 709 | $a2 = trim($m[8]); |
@@ -720,8 +720,8 @@ discard block |
||
| 720 | 720 | ); |
| 721 | 721 | $crit->exclus = $m[1]; |
| 722 | 722 | } elseif ( |
| 723 | - preg_match('/^([!]?)\s*(' . |
|
| 724 | - CHAMP_SQL_PLUS_FONC . |
|
| 723 | + preg_match('/^([!]?)\s*('. |
|
| 724 | + CHAMP_SQL_PLUS_FONC. |
|
| 725 | 725 | ')\s*(\??)(.*)$/is', $param, $m) |
| 726 | 726 | ) { |
| 727 | 727 | // contient aussi les comparaisons implicites ! |
@@ -866,7 +866,7 @@ discard block |
||
| 866 | 866 | } |
| 867 | 867 | |
| 868 | 868 | // trouver sa position de depart reelle : au <Bxx> ou au <BBxx> |
| 869 | - $precond_boucle = BALISE_PRECOND_BOUCLE . $id_boucle . '>'; |
|
| 869 | + $precond_boucle = BALISE_PRECOND_BOUCLE.$id_boucle.'>'; |
|
| 870 | 870 | $pos_precond = strpos($texte, $precond_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme); |
| 871 | 871 | if ( |
| 872 | 872 | $pos_precond !== false |
@@ -877,7 +877,7 @@ discard block |
||
| 877 | 877 | $boucle['pos_precond_inside'] = $pos_precond + strlen($precond_boucle); |
| 878 | 878 | } |
| 879 | 879 | |
| 880 | - $preaff_boucle = BALISE_PREAFF_BOUCLE . $id_boucle . '>'; |
|
| 880 | + $preaff_boucle = BALISE_PREAFF_BOUCLE.$id_boucle.'>'; |
|
| 881 | 881 | $pos_preaff = strpos($texte, $preaff_boucle, $id_boucle ? $pos_debut_texte : $pos_derniere_boucle_anonyme); |
| 882 | 882 | if ( |
| 883 | 883 | $pos_preaff !== false |
@@ -925,13 +925,13 @@ discard block |
||
| 925 | 925 | $pos_anonyme_next = null; |
| 926 | 926 | // si c'est une boucle anonyme, chercher la position de la prochaine boucle anonyme |
| 927 | 927 | if (!strlen($id_boucle)) { |
| 928 | - $pos_anonyme_next = strpos($texte, BALISE_BOUCLE . '(', $pos_courante); |
|
| 928 | + $pos_anonyme_next = strpos($texte, BALISE_BOUCLE.'(', $pos_courante); |
|
| 929 | 929 | } |
| 930 | 930 | |
| 931 | 931 | // |
| 932 | 932 | // 1. Recuperer la partie conditionnelle apres |
| 933 | 933 | // |
| 934 | - $apres_boucle = BALISE_POSTCOND_BOUCLE . $id_boucle . '>'; |
|
| 934 | + $apres_boucle = BALISE_POSTCOND_BOUCLE.$id_boucle.'>'; |
|
| 935 | 935 | $pos_apres = strpos($texte, $apres_boucle, $pos_courante); |
| 936 | 936 | if ( |
| 937 | 937 | $pos_apres !== false |
@@ -940,13 +940,13 @@ discard block |
||
| 940 | 940 | $boucle['pos_postcond'] = $pos_apres; |
| 941 | 941 | $pos_apres += strlen($apres_boucle); |
| 942 | 942 | $boucle['pos_postcond_inside'] = $pos_apres; |
| 943 | - $pos_courante = $pos_apres ; |
|
| 943 | + $pos_courante = $pos_apres; |
|
| 944 | 944 | } |
| 945 | 945 | |
| 946 | 946 | // |
| 947 | 947 | // 2. Récuperer la partie alternative apres |
| 948 | 948 | // |
| 949 | - $altern_boucle = BALISE_ALT_BOUCLE . $id_boucle . '>'; |
|
| 949 | + $altern_boucle = BALISE_ALT_BOUCLE.$id_boucle.'>'; |
|
| 950 | 950 | $pos_altern = strpos($texte, $altern_boucle, $pos_courante); |
| 951 | 951 | if ( |
| 952 | 952 | $pos_altern !== false |
@@ -961,7 +961,7 @@ discard block |
||
| 961 | 961 | // |
| 962 | 962 | // 3. Recuperer la partie footer non alternative |
| 963 | 963 | // |
| 964 | - $postaff_boucle = BALISE_POSTAFF_BOUCLE . $id_boucle . '>'; |
|
| 964 | + $postaff_boucle = BALISE_POSTAFF_BOUCLE.$id_boucle.'>'; |
|
| 965 | 965 | $pos_postaff = strpos($texte, $postaff_boucle, $pos_courante); |
| 966 | 966 | if ( |
| 967 | 967 | $pos_postaff !== false |
@@ -970,7 +970,7 @@ discard block |
||
| 970 | 970 | $boucle['pos_postaff'] = $pos_postaff; |
| 971 | 971 | $pos_postaff += strlen($postaff_boucle); |
| 972 | 972 | $boucle['pos_postaff_inside'] = $pos_postaff; |
| 973 | - $pos_courante = $pos_postaff ; |
|
| 973 | + $pos_courante = $pos_postaff; |
|
| 974 | 974 | } |
| 975 | 975 | |
| 976 | 976 | return $boucle; |
@@ -1010,7 +1010,7 @@ discard block |
||
| 1010 | 1010 | * @return string |
| 1011 | 1011 | */ |
| 1012 | 1012 | function public_generer_boucle_placeholder($id_boucle, &$boucle, $boucle_placeholder, $nb_lignes) { |
| 1013 | - $placeholder = "[(#{$boucle_placeholder}{" . $id_boucle . '})' . str_pad('', $nb_lignes, "\n") . ']'; |
|
| 1013 | + $placeholder = "[(#{$boucle_placeholder}{".$id_boucle.'})'.str_pad('', $nb_lignes, "\n").']'; |
|
| 1014 | 1014 | //memoriser la boucle a reinjecter |
| 1015 | 1015 | $id_boucle = "$id_boucle"; |
| 1016 | 1016 | phraser_boucle_placeholder($id_boucle, $boucle_placeholder, $boucle); |
@@ -1023,7 +1023,7 @@ discard block |
||
| 1023 | 1023 | // definir un placholder pour les boucles dont on est sur d'avoir aucune occurence dans le squelette |
| 1024 | 1024 | if (is_null($boucle_placeholder)) { |
| 1025 | 1025 | do { |
| 1026 | - $boucle_placeholder = 'BOUCLE_PLACEHOLDER_' . strtoupper(md5(uniqid())); |
|
| 1026 | + $boucle_placeholder = 'BOUCLE_PLACEHOLDER_'.strtoupper(md5(uniqid())); |
|
| 1027 | 1027 | } while (str_contains($texte, $boucle_placeholder)); |
| 1028 | 1028 | } |
| 1029 | 1029 | |
@@ -1043,7 +1043,7 @@ discard block |
||
| 1043 | 1043 | |
| 1044 | 1044 | // boucle anonyme ? |
| 1045 | 1045 | if (!strlen($id_boucle)) { |
| 1046 | - $id_boucle = '_anon_L' . $ligne_milieu . '_' . substr(md5('anonyme:' . $id_parent . ':' . json_encode($boucle, JSON_THROW_ON_ERROR)), 0, 8); |
|
| 1046 | + $id_boucle = '_anon_L'.$ligne_milieu.'_'.substr(md5('anonyme:'.$id_parent.':'.json_encode($boucle, JSON_THROW_ON_ERROR)), 0, 8); |
|
| 1047 | 1047 | } |
| 1048 | 1048 | |
| 1049 | 1049 | $pos_debut_boucle = $pos_courante; |
@@ -1056,7 +1056,7 @@ discard block |
||
| 1056 | 1056 | |
| 1057 | 1057 | $pos_avant = $boucle['pos_precond_inside']; |
| 1058 | 1058 | $result->avant = substr($texte, $pos_avant, $pos_courante - $pos_avant); |
| 1059 | - $ligne_avant = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_avant); |
|
| 1059 | + $ligne_avant = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_avant); |
|
| 1060 | 1060 | } |
| 1061 | 1061 | |
| 1062 | 1062 | // Regarder si on a une partie inconditionnelle avant <BB_xxx> |
@@ -1065,7 +1065,7 @@ discard block |
||
| 1065 | 1065 | |
| 1066 | 1066 | $pos_preaff = $boucle['pos_preaff_inside']; |
| 1067 | 1067 | $result->preaff = substr($texte, $pos_preaff, $end_preaff - $pos_preaff); |
| 1068 | - $ligne_preaff = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_preaff); |
|
| 1068 | + $ligne_preaff = $ligne_debut_texte + public_compte_ligne($texte, $pos_debut_texte, $pos_preaff); |
|
| 1069 | 1069 | } |
| 1070 | 1070 | |
| 1071 | 1071 | $result->id_boucle = $id_boucle; |
@@ -1122,7 +1122,7 @@ discard block |
||
| 1122 | 1122 | } else { |
| 1123 | 1123 | $pos_milieu += 1; |
| 1124 | 1124 | |
| 1125 | - $fin_boucle = BALISE_FIN_BOUCLE . $id_boucle_search . '>'; |
|
| 1125 | + $fin_boucle = BALISE_FIN_BOUCLE.$id_boucle_search.'>'; |
|
| 1126 | 1126 | $pos_fin = strpos($texte, $fin_boucle, $pos_milieu); |
| 1127 | 1127 | if ($pos_fin === false) { |
| 1128 | 1128 | $err_b = [ |
@@ -1135,7 +1135,7 @@ discard block |
||
| 1135 | 1135 | else { |
| 1136 | 1136 | // verifier une eventuelle imbrication d'une boucle homonyme |
| 1137 | 1137 | // (interdite, generera une erreur plus loin, mais permet de signaler la bonne erreur) |
| 1138 | - $search_debut_boucle = BALISE_BOUCLE . $id_boucle_search . '('; |
|
| 1138 | + $search_debut_boucle = BALISE_BOUCLE.$id_boucle_search.'('; |
|
| 1139 | 1139 | $search_from = $pos_milieu; |
| 1140 | 1140 | $nb_open = 1; |
| 1141 | 1141 | $nb_close = 1; |
@@ -1175,7 +1175,7 @@ discard block |
||
| 1175 | 1175 | if ($boucle['pos_postcond']) { |
| 1176 | 1176 | $result->apres = substr($texte, $pos_courante, $boucle['pos_postcond'] - $pos_courante); |
| 1177 | 1177 | $ligne_suite += public_compte_ligne($texte, $pos_courante, $boucle['pos_postcond_inside']); |
| 1178 | - $pos_courante = $boucle['pos_postcond_inside'] ; |
|
| 1178 | + $pos_courante = $boucle['pos_postcond_inside']; |
|
| 1179 | 1179 | } |
| 1180 | 1180 | |
| 1181 | 1181 | |
@@ -107,13 +107,13 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | function chrono_requete($temps) { |
| 109 | 109 | $total = 0; |
| 110 | - $hors = '<i>' . _T('zbug_hors_compilation') . '</i>'; |
|
| 110 | + $hors = '<i>'._T('zbug_hors_compilation').'</i>'; |
|
| 111 | 111 | $t = $q = $n = $d = []; |
| 112 | 112 | // Totaliser les temps et completer le Explain |
| 113 | 113 | foreach ($temps as $key => $v) { |
| 114 | 114 | [$dt, $nb, $boucle, $query, $explain, $res, $contexte] = $v; |
| 115 | 115 | if (is_array($contexte)) { |
| 116 | - $k = ($contexte[0] . " $boucle"); |
|
| 116 | + $k = ($contexte[0]." $boucle"); |
|
| 117 | 117 | include_spip('public/compiler'); |
| 118 | 118 | $env = reconstruire_contexte_compil($contexte); |
| 119 | 119 | } else { |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | // Fabriquer les liens de navigations dans le tableau des temps |
| 159 | 159 | foreach ($temps as $k => $v) { |
| 160 | 160 | $titre = strip_tags($v[2]); |
| 161 | - $href = quote_amp($GLOBALS['REQUEST_URI']) . "#req$i"; |
|
| 161 | + $href = quote_amp($GLOBALS['REQUEST_URI'])."#req$i"; |
|
| 162 | 162 | $href = str_replace("\\'", ''', $href); |
| 163 | 163 | |
| 164 | 164 | if (!isset($t[$v[2]])) { |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | unset($d['']); |
| 180 | 180 | // Fabriquer le tableau des liens de navigation dans le grand tableau |
| 181 | 181 | foreach ($d as $k => $v) { |
| 182 | - $d[$k] = $n[$k] . "</td><td>$k</td><td class='time'>$v</td><td class='liste-reqs'>" |
|
| 182 | + $d[$k] = $n[$k]."</td><td>$k</td><td class='time'>$v</td><td class='liste-reqs'>" |
|
| 183 | 183 | . implode('', $t[$k]); |
| 184 | 184 | } |
| 185 | 185 | |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | . implode("</td></tr>\n<tr><td>", $d) |
| 190 | 190 | . "</td></tr>\n" |
| 191 | 191 | . (# _request('var_mode_objet') ? '' : |
| 192 | - ('<tr><td>' . (is_countable($temps) ? count($temps) : 0) . '</td><td>' . _T('info_total') . '</td><td class="time">' . $total . '</td><td></td></tr>')) |
|
| 192 | + ('<tr><td>'.(is_countable($temps) ? count($temps) : 0).'</td><td>'._T('info_total').'</td><td class="time">'.$total.'</td><td></td></tr>')) |
|
| 193 | 193 | ]; |
| 194 | 194 | |
| 195 | 195 | return [$temps, $navigation]; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $apl_constant = '_Z_AJAX_PARALLEL_LOAD'; |
| 53 | 53 | $page = _SPIP_PAGE; |
| 54 | 54 | $echafauder = charger_fonction('echafauder', 'public', true); |
| 55 | - define('_ZCORE_EXCLURE_PATH', '\bprive|\bsquelettes-dist' . (defined('_DIR_PLUGIN_DIST') ? '|\b' . rtrim( |
|
| 55 | + define('_ZCORE_EXCLURE_PATH', '\bprive|\bsquelettes-dist'.(defined('_DIR_PLUGIN_DIST') ? '|\b'.rtrim( |
|
| 56 | 56 | _DIR_PLUGIN_DIST, |
| 57 | 57 | '/' |
| 58 | 58 | ) : '')); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | && in_array($dir, $z_blocs) // verifier deja qu'on est dans un bloc Z |
| 77 | 77 | && defined($apl_constant) |
| 78 | 78 | && in_array($dir, explode(',', constant($apl_constant))) // et dans un demande en APL |
| 79 | - && ($pipe = z_trouver_bloc($prefix_path . $prepend, $dir, 'z_apl', $ext)) // et qui contient le squelette APL |
|
| 79 | + && ($pipe = z_trouver_bloc($prefix_path.$prepend, $dir, 'z_apl', $ext)) // et qui contient le squelette APL |
|
| 80 | 80 | ) { |
| 81 | 81 | $flux['data'] = $pipe; |
| 82 | 82 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $echafauder = ''; |
| 90 | 90 | } |
| 91 | 91 | if ($prepend) { |
| 92 | - $squelette = substr(find_in_path($prefix_path . $prepend . "$fond.$ext"), 0, -strlen(".$ext")); |
|
| 92 | + $squelette = substr(find_in_path($prefix_path.$prepend."$fond.$ext"), 0, -strlen(".$ext")); |
|
| 93 | 93 | if ($squelette) { |
| 94 | 94 | $flux['data'] = $squelette; |
| 95 | 95 | } |
@@ -109,11 +109,11 @@ discard block |
||
| 109 | 109 | // se brancher sur contenu/xx si il existe |
| 110 | 110 | // ou si c'est un objet spip, associe a une table, utiliser le fond homonyme |
| 111 | 111 | if (!isset($disponible[$fond])) { |
| 112 | - $disponible[$fond] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $fond, $ext, $echafauder); |
|
| 112 | + $disponible[$fond] = z_contenu_disponible($prefix_path.$prepend, $z_contenu, $fond, $ext, $echafauder); |
|
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | if ($disponible[$fond]) { |
| 116 | - $flux['data'] = substr(find_in_path($prefix_path . "page.$ext"), 0, -strlen(".$ext")); |
|
| 116 | + $flux['data'] = substr(find_in_path($prefix_path."page.$ext"), 0, -strlen(".$ext")); |
|
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $type = $flux['args']['contexte'][$page]; |
| 127 | 127 | } |
| 128 | 128 | if (!isset($disponible[$type])) { |
| 129 | - $disponible[$type] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $type, $ext, $echafauder); |
|
| 129 | + $disponible[$type] = z_contenu_disponible($prefix_path.$prepend, $z_contenu, $type, $ext, $echafauder); |
|
| 130 | 130 | } |
| 131 | 131 | if (is_string($disponible[$type])) { |
| 132 | 132 | $flux['data'] = $disponible[$type]; |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | $flux['data'] = $echafauder($type, $is[0], $is[1], $is[2], $ext); |
| 142 | 142 | } else { |
| 143 | 143 | $flux['data'] = ($disponible['404'] = z_contenu_disponible( |
| 144 | - $prefix_path . $prepend, |
|
| 144 | + $prefix_path.$prepend, |
|
| 145 | 145 | $z_contenu, |
| 146 | 146 | '404', |
| 147 | 147 | $ext, |
@@ -165,10 +165,10 @@ discard block |
||
| 165 | 165 | $type = $flux['args']['contexte'][$page]; |
| 166 | 166 | } |
| 167 | 167 | if ($type !== 'page' && !isset($disponible[$type])) { |
| 168 | - $disponible[$type] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $type, $ext, $echafauder); |
|
| 168 | + $disponible[$type] = z_contenu_disponible($prefix_path.$prepend, $z_contenu, $type, $ext, $echafauder); |
|
| 169 | 169 | } |
| 170 | 170 | if ($type == 'page' || $disponible[$type]) { |
| 171 | - $flux['data'] = z_trouver_bloc($prefix_path . $prepend, $dir, 'dist', $ext); |
|
| 171 | + $flux['data'] = z_trouver_bloc($prefix_path.$prepend, $dir, 'dist', $ext); |
|
| 172 | 172 | } |
| 173 | 173 | } |
| 174 | 174 | } |
@@ -183,8 +183,8 @@ discard block |
||
| 183 | 183 | if ( |
| 184 | 184 | isset($flux['args']['contexte']['type-page']) |
| 185 | 185 | && ( |
| 186 | - isset($flux['args']['contexte']['composition']) && file_exists(($f = $squelette . '-' . $flux['args']['contexte']['type-page'] . '-' . $flux['args']['contexte']['composition']) . ".$ext") |
|
| 187 | - || file_exists(($f = $squelette . '-' . $flux['args']['contexte']['type-page']) . ".$ext") |
|
| 186 | + isset($flux['args']['contexte']['composition']) && file_exists(($f = $squelette.'-'.$flux['args']['contexte']['type-page'].'-'.$flux['args']['contexte']['composition']).".$ext") |
|
| 187 | + || file_exists(($f = $squelette.'-'.$flux['args']['contexte']['type-page']).".$ext") |
|
| 188 | 188 | ) |
| 189 | 189 | ) { |
| 190 | 190 | $flux['data'] = $f; |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | } elseif ( |
| 193 | 193 | $fond == 'structure' |
| 194 | 194 | && z_sanitize_var_zajax() |
| 195 | - && ($f = find_in_path($prefix_path . $prepend . 'ajax' . ".$ext")) |
|
| 195 | + && ($f = find_in_path($prefix_path.$prepend.'ajax'.".$ext")) |
|
| 196 | 196 | ) { |
| 197 | 197 | $flux['data'] = substr($f, 0, -strlen(".$ext")); |
| 198 | 198 | } // chercher le fond correspondant a la composition |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | && ($dir = explode('/', $dir)) |
| 204 | 204 | && ($dir = reset($dir)) |
| 205 | 205 | && in_array($dir, $z_blocs) |
| 206 | - && ($f = find_in_path($prefix_path . $prepend . $fond . '-' . $flux['args']['contexte']['composition'] . ".$ext")) |
|
| 206 | + && ($f = find_in_path($prefix_path.$prepend.$fond.'-'.$flux['args']['contexte']['composition'].".$ext")) |
|
| 207 | 207 | ) { |
| 208 | 208 | $flux['data'] = substr($f, 0, -strlen(".$ext")); |
| 209 | 209 | } |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | * `true` si on peut l'utiliser, `false` sinon. |
| 264 | 264 | **/ |
| 265 | 265 | function z_fond_valide($squelette) { |
| 266 | - return !_ZCORE_EXCLURE_PATH || !preg_match(',(' . _ZCORE_EXCLURE_PATH . ')/,', $squelette); |
|
| 266 | + return !_ZCORE_EXCLURE_PATH || !preg_match(',('._ZCORE_EXCLURE_PATH.')/,', $squelette); |
|
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | /** |
@@ -378,23 +378,23 @@ discard block |
||
| 378 | 378 | } |
| 379 | 379 | $dir = z_blocs(test_espace_prive()); |
| 380 | 380 | $dir = reset($dir); |
| 381 | - $scaffold = "<INCLURE{fond=prive/echafaudage/$dir/" . $fond . ',objet=' . $type . ',id_objet=#' . strtoupper($primary) . ',env}>'; |
|
| 381 | + $scaffold = "<INCLURE{fond=prive/echafaudage/$dir/".$fond.',objet='.$type.',id_objet=#'.strtoupper($primary).',env}>'; |
|
| 382 | 382 | } // page objets |
| 383 | 383 | elseif (($type = $desc_exec) && !str_contains($type, '/')) { |
| 384 | 384 | $dir = z_blocs(test_espace_prive()); |
| 385 | 385 | $dir = reset($dir); |
| 386 | - $scaffold = "<INCLURE{fond=prive/echafaudage/$dir/objets,objet=" . $type . ',env} />'; |
|
| 386 | + $scaffold = "<INCLURE{fond=prive/echafaudage/$dir/objets,objet=".$type.',env} />'; |
|
| 387 | 387 | } |
| 388 | 388 | // morceau d'objet : on fournit le fond de sibstitution dans $desc_exec |
| 389 | 389 | // et objet et tire de $table |
| 390 | 390 | elseif ($fond = $desc_exec) { |
| 391 | 391 | $dir = md5(dirname($fond)); |
| 392 | - $scaffold = "<INCLURE{fond=$fond,objet=" . objet_type($table) . ',env} />'; |
|
| 392 | + $scaffold = "<INCLURE{fond=$fond,objet=".objet_type($table).',env} />'; |
|
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | $base_dir = sous_repertoire(_DIR_CACHE, 'scaffold', false); |
| 396 | 396 | $base_dir = sous_repertoire($base_dir, $dir, false); |
| 397 | - $f = $base_dir . "$exec"; |
|
| 397 | + $f = $base_dir."$exec"; |
|
| 398 | 398 | ecrire_fichier("$f.$ext", $scaffold); |
| 399 | 399 | |
| 400 | 400 | return $f; |