@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | return sql_getfetsel( |
| 37 | 37 | 'virtuel', |
| 38 | 38 | 'spip_articles', |
| 39 | - array('id_article=' . intval($id_article), "statut='publie'"), |
|
| 39 | + array('id_article='.intval($id_article), "statut='publie'"), |
|
| 40 | 40 | '', |
| 41 | 41 | '', |
| 42 | 42 | '', |
@@ -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'] . '=' . intval($id), |
|
| 81 | + $cache_quete[$connect][$table]['_id'].'='.intval($id), |
|
| 82 | 82 | '', |
| 83 | 83 | '', |
| 84 | 84 | '', |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | return |
| 172 | 172 | (isset($GLOBALS['meta']['date_prochain_postdate']) |
| 173 | 173 | and $GLOBALS['meta']['date_prochain_postdate'] > time()) |
| 174 | - ? "$champ_date<" . sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur) |
|
| 174 | + ? "$champ_date<".sql_quote(date('Y-m-d H:i:s', $GLOBALS['meta']['date_prochain_postdate']), $serveur) |
|
| 175 | 175 | : '1=1'; |
| 176 | 176 | } |
| 177 | 177 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | and $id_table = reset($objet) |
| 230 | 230 | and $objet = objet_type($id_table) |
| 231 | 231 | ) { |
| 232 | - $w = "$mstatut<>" . sql_quote($v); |
|
| 232 | + $w = "$mstatut<>".sql_quote($v); |
|
| 233 | 233 | |
| 234 | 234 | // retrouver l’id_auteur qui a filé un lien de prévisu éventuellement, |
| 235 | 235 | // sinon l’auteur en session |
@@ -243,22 +243,22 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | |
| 245 | 245 | // dans ce cas (admin en general), pas de filtrage sur ce statut |
| 246 | - if (!autoriser('previsualiser' . $v, $objet, '', $id_auteur)) { |
|
| 246 | + if (!autoriser('previsualiser'.$v, $objet, '', $id_auteur)) { |
|
| 247 | 247 | // si pas d'auteur identifie pas de sous-requete car pas d'article qui matche |
| 248 | 248 | if (!$id_auteur) { |
| 249 | 249 | $where[] = $w; |
| 250 | 250 | } else { |
| 251 | 251 | $primary = id_table_objet($objet); |
| 252 | - $where[] = "($w OR $id_table.$primary IN (" . sql_get_select( |
|
| 252 | + $where[] = "($w OR $id_table.$primary IN (".sql_get_select( |
|
| 253 | 253 | 'ssss.id_objet', |
| 254 | 254 | 'spip_auteurs_liens AS ssss', |
| 255 | - 'ssss.objet=' . sql_quote($objet) . ' AND ssss.id_auteur=' . intval($id_auteur), |
|
| 255 | + 'ssss.objet='.sql_quote($objet).' AND ssss.id_auteur='.intval($id_auteur), |
|
| 256 | 256 | '', |
| 257 | 257 | '', |
| 258 | 258 | '', |
| 259 | 259 | '', |
| 260 | 260 | $serveur |
| 261 | - ) . '))'; |
|
| 261 | + ).'))'; |
|
| 262 | 262 | } |
| 263 | 263 | } |
| 264 | 264 | } // ignorer ce statut si on ne sait pas comment le filtrer |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | * @return array|bool|null |
| 297 | 297 | */ |
| 298 | 298 | function quete_fichier($id_document, $serveur = '') { |
| 299 | - return sql_getfetsel('fichier', 'spip_documents', ('id_document=' . intval($id_document)), '', array(), '', '', $serveur); |
|
| 299 | + return sql_getfetsel('fichier', 'spip_documents', ('id_document='.intval($id_document)), '', array(), '', '', $serveur); |
|
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | /** |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | * @return array|bool |
| 308 | 308 | */ |
| 309 | 309 | function quete_document($id_document, $serveur = '') { |
| 310 | - return sql_fetsel('*', 'spip_documents', ('id_document=' . intval($id_document)), '', array(), '', '', $serveur); |
|
| 310 | + return sql_fetsel('*', 'spip_documents', ('id_document='.intval($id_document)), '', array(), '', '', $serveur); |
|
| 311 | 311 | } |
| 312 | 312 | |
| 313 | 313 | /** |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | * @return array|bool|null |
| 319 | 319 | */ |
| 320 | 320 | function quete_meta($nom, $serveur) { |
| 321 | - return sql_getfetsel('valeur', 'spip_meta', 'nom=' . sql_quote($nom), '', '', '', '', $serveur); |
|
| 321 | + return sql_getfetsel('valeur', 'spip_meta', 'nom='.sql_quote($nom), '', '', '', '', $serveur); |
|
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | /** |
@@ -372,9 +372,9 @@ discard block |
||
| 372 | 372 | // qui permet de distinguer le changement de logo |
| 373 | 373 | // et placer un expire sur le dossier IMG/ |
| 374 | 374 | $res = array( |
| 375 | - $on['chemin'] . ($on['timestamp'] ? "?{$on['timestamp']}" : ''), |
|
| 376 | - ($off ? $off['chemin'] . ($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''), |
|
| 377 | - (!$taille ? '' : (' ' . $taille[3])) |
|
| 375 | + $on['chemin'].($on['timestamp'] ? "?{$on['timestamp']}" : ''), |
|
| 376 | + ($off ? $off['chemin'].($off['timestamp'] ? "?{$off['timestamp']}" : '') : ''), |
|
| 377 | + (!$taille ? '' : (' '.$taille[3])) |
|
| 378 | 378 | ); |
| 379 | 379 | $res['src'] = $res[0]; |
| 380 | 380 | $res['logo_on'] = $res[0]; |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | // si c'est une vignette type doc, la renvoyer direct |
| 471 | 471 | if (strcmp($logo, _DIR_PLUGINS) == 0 |
| 472 | 472 | or strcmp($logo, _DIR_PLUGINS_DIST) == 0 |
| 473 | - or strcmp($logo, _DIR_RACINE . 'prive/') == 0 |
|
| 473 | + or strcmp($logo, _DIR_RACINE.'prive/') == 0 |
|
| 474 | 474 | ) { |
| 475 | 475 | return $logo; |
| 476 | 476 | } |
@@ -589,8 +589,7 @@ discard block |
||
| 589 | 589 | // qu'une fois (par squelette) et on conserve le resultat |
| 590 | 590 | // en static. |
| 591 | 591 | if (!isset($exposer[$m = md5(serialize($reference))][$prim])) { |
| 592 | - $principal = isset($reference[$type]) ? $reference[$type] : |
|
| 593 | - // cas de la pagination indecte @xx qui positionne la page avec l'id xx |
|
| 592 | + $principal = isset($reference[$type]) ? $reference[$type] : // cas de la pagination indecte @xx qui positionne la page avec l'id xx |
|
| 594 | 593 | // et donne la reference dynamique @type=xx dans le contexte |
| 595 | 594 | (isset($reference["@$type"]) ? $reference["@$type"] : ''); |
| 596 | 595 | // le parent fournit en argument est le parent de $id, pas celui de $principal |
@@ -618,7 +617,7 @@ discard block |
||
| 618 | 617 | $exposer[$m][$type][$principal] = true; |
| 619 | 618 | if ($type == 'id_mot') { |
| 620 | 619 | if (!$parent) { |
| 621 | - $parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot=' . intval($principal), '', '', '', '', $connect); |
|
| 620 | + $parent = sql_getfetsel('id_groupe', 'spip_mots', 'id_mot='.intval($principal), '', '', '', '', $connect); |
|
| 622 | 621 | } |
| 623 | 622 | if ($parent) { |
| 624 | 623 | $exposer[$m]['id_groupe'][$parent] = true; |
@@ -44,44 +44,44 @@ discard block |
||
| 44 | 44 | } |
| 45 | 45 | ob_start(); |
| 46 | 46 | if (strpos($page['texte'], '?xml') !== false) { |
| 47 | - $page['texte'] = str_replace('<' . '?xml', "<\1?xml", $page['texte']); |
|
| 47 | + $page['texte'] = str_replace('<'.'?xml', "<\1?xml", $page['texte']); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | try { |
| 51 | - $res = eval('?' . '>' . $page['texte']); |
|
| 51 | + $res = eval('?'.'>'.$page['texte']); |
|
| 52 | 52 | // error catching 5.2<=PHP<7 |
| 53 | 53 | if ($res === false |
| 54 | 54 | and function_exists('error_get_last') |
| 55 | - and ($erreur = error_get_last()) ) { |
|
| 55 | + and ($erreur = error_get_last())) { |
|
| 56 | 56 | $code = $page['texte']; |
| 57 | 57 | $GLOBALS['numero_ligne_php'] = 1; |
| 58 | - if (!function_exists('numerote_ligne_php')){ |
|
| 59 | - function numerote_ligne_php($match){ |
|
| 58 | + if (!function_exists('numerote_ligne_php')) { |
|
| 59 | + function numerote_ligne_php($match) { |
|
| 60 | 60 | $GLOBALS['numero_ligne_php']++; |
| 61 | - return "\n/*".str_pad($GLOBALS['numero_ligne_php'],3,"0",STR_PAD_LEFT)."*/"; |
|
| 61 | + return "\n/*".str_pad($GLOBALS['numero_ligne_php'], 3, "0", STR_PAD_LEFT)."*/"; |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | - $code = "/*001*/".preg_replace_callback(",\n,","numerote_ligne_php",$code); |
|
| 65 | - $code = trim(highlight_string($code,true)); |
|
| 66 | - erreur_squelette("L".$erreur['line'].": ".$erreur['message']."<br />".$code,array($page['source'],'',$erreur['file'],'',$GLOBALS['spip_lang'])); |
|
| 64 | + $code = "/*001*/".preg_replace_callback(",\n,", "numerote_ligne_php", $code); |
|
| 65 | + $code = trim(highlight_string($code, true)); |
|
| 66 | + erreur_squelette("L".$erreur['line'].": ".$erreur['message']."<br />".$code, array($page['source'], '', $erreur['file'], '', $GLOBALS['spip_lang'])); |
|
| 67 | 67 | $page['texte'] = "<!-- Erreur -->"; |
| 68 | 68 | } |
| 69 | 69 | else { |
| 70 | 70 | $page['texte'] = ob_get_contents(); |
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | - catch (Exception $e){ |
|
| 73 | + catch (Exception $e) { |
|
| 74 | 74 | $code = $page['texte']; |
| 75 | 75 | $GLOBALS['numero_ligne_php'] = 1; |
| 76 | - if (!function_exists('numerote_ligne_php')){ |
|
| 77 | - function numerote_ligne_php($match){ |
|
| 76 | + if (!function_exists('numerote_ligne_php')) { |
|
| 77 | + function numerote_ligne_php($match) { |
|
| 78 | 78 | $GLOBALS['numero_ligne_php']++; |
| 79 | - return "\n/*".str_pad($GLOBALS['numero_ligne_php'],3,"0",STR_PAD_LEFT)."*/"; |
|
| 79 | + return "\n/*".str_pad($GLOBALS['numero_ligne_php'], 3, "0", STR_PAD_LEFT)."*/"; |
|
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | - $code = "/*001*/".preg_replace_callback(",\n,","numerote_ligne_php",$code); |
|
| 83 | - $code = trim(highlight_string($code,true)); |
|
| 84 | - erreur_squelette("L".$e->getLine().": ".$e->getMessage()."<br />".$code,array($page['source'],'',$e->getFile(),'',$GLOBALS['spip_lang'])); |
|
| 82 | + $code = "/*001*/".preg_replace_callback(",\n,", "numerote_ligne_php", $code); |
|
| 83 | + $code = trim(highlight_string($code, true)); |
|
| 84 | + erreur_squelette("L".$e->getLine().": ".$e->getMessage()."<br />".$code, array($page['source'], '', $e->getFile(), '', $GLOBALS['spip_lang'])); |
|
| 85 | 85 | $page['texte'] = "<!-- Erreur -->"; |
| 86 | 86 | } |
| 87 | 87 | ob_end_clean(); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | $page['process_ins'] = 'html'; |
| 90 | 90 | |
| 91 | 91 | if (strpos($page['texte'], '?xml') !== false) { |
| 92 | - $page['texte'] = str_replace("<\1?xml", '<' . '?xml', $page['texte']); |
|
| 92 | + $page['texte'] = str_replace("<\1?xml", '<'.'?xml', $page['texte']); |
|
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $p->etoile = '*'; |
| 54 | 54 | spip_log("filtre de logo obsolete $nom", 'vieilles_defs'); |
| 55 | 55 | |
| 56 | - } elseif (preg_match("/^" . NOM_DE_CHAMP . '(.*)$/sS', $nom, $m)) { |
|
| 56 | + } elseif (preg_match("/^".NOM_DE_CHAMP.'(.*)$/sS', $nom, $m)) { |
|
| 57 | 57 | $champ = new Champ(); |
| 58 | 58 | $champ->nom_boucle = $m[2]; |
| 59 | 59 | $champ->nom_champ = $m[3]; |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | $p->param[0][1] = array($c); |
| 132 | 132 | $p->param[0][0] = ''; |
| 133 | 133 | $p->fonctions = array(); |
| 134 | - spip_log('FORMULAIRE_RECHERCHE avec filtre ' . $c->texte, 'vieilles_defs'); |
|
| 134 | + spip_log('FORMULAIRE_RECHERCHE avec filtre '.$c->texte, 'vieilles_defs'); |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | |
@@ -37,11 +37,11 @@ |
||
| 37 | 37 | include_spip('inc/filtres'); |
| 38 | 38 | |
| 39 | 39 | // Inserer le css d'admin |
| 40 | - $css = "<link rel='stylesheet' href='" . url_absolue(direction_css(find_in_path('spip_admin.css'))) |
|
| 40 | + $css = "<link rel='stylesheet' href='".url_absolue(direction_css(find_in_path('spip_admin.css'))) |
|
| 41 | 41 | . "' type='text/css' />\n"; |
| 42 | 42 | if ($f = find_in_path('spip_admin_perso.css')) { |
| 43 | 43 | $css .= "<link rel='stylesheet' href='" |
| 44 | - . url_absolue(direction_css($f)) . "' type='text/css' />\n"; |
|
| 44 | + . url_absolue(direction_css($f))."' type='text/css' />\n"; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | ($pos = stripos($contenu, '</head>')) |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | $apl_constant = '_Z_AJAX_PARALLEL_LOAD'; |
| 54 | 54 | $page = _SPIP_PAGE; |
| 55 | 55 | $echafauder = charger_fonction('echafauder', 'public', true); |
| 56 | - define('_ZCORE_EXCLURE_PATH', '\bprive|\bsquelettes-dist' . (defined('_DIR_PLUGIN_DIST') ? '|\b' . rtrim(_DIR_PLUGIN_DIST, |
|
| 56 | + define('_ZCORE_EXCLURE_PATH', '\bprive|\bsquelettes-dist'.(defined('_DIR_PLUGIN_DIST') ? '|\b'.rtrim(_DIR_PLUGIN_DIST, |
|
| 57 | 57 | '/') : '')); |
| 58 | 58 | } |
| 59 | 59 | $prepend = (defined('_Z_PREPEND_PATH') ? _Z_PREPEND_PATH : ""); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | and in_array($dir, $z_blocs) // verifier deja qu'on est dans un bloc Z |
| 75 | 75 | and defined($apl_constant) |
| 76 | 76 | and in_array($dir, explode(',', constant($apl_constant))) // et dans un demande en APL |
| 77 | - and $pipe = z_trouver_bloc($prefix_path . $prepend, $dir, 'z_apl', $ext) // et qui contient le squelette APL |
|
| 77 | + and $pipe = z_trouver_bloc($prefix_path.$prepend, $dir, 'z_apl', $ext) // et qui contient le squelette APL |
|
| 78 | 78 | ) { |
| 79 | 79 | $flux['data'] = $pipe; |
| 80 | 80 | |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | $echafauder = ""; |
| 88 | 88 | } |
| 89 | 89 | if ($prepend) { |
| 90 | - $squelette = substr(find_in_path($prefix_path . $prepend . "$fond.$ext"), 0, -strlen(".$ext")); |
|
| 90 | + $squelette = substr(find_in_path($prefix_path.$prepend."$fond.$ext"), 0, -strlen(".$ext")); |
|
| 91 | 91 | if ($squelette) { |
| 92 | 92 | $flux['data'] = $squelette; |
| 93 | 93 | } |
@@ -111,11 +111,11 @@ discard block |
||
| 111 | 111 | // se brancher sur contenu/xx si il existe |
| 112 | 112 | // ou si c'est un objet spip, associe a une table, utiliser le fond homonyme |
| 113 | 113 | if (!isset($disponible[$fond])) { |
| 114 | - $disponible[$fond] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $fond, $ext, $echafauder); |
|
| 114 | + $disponible[$fond] = z_contenu_disponible($prefix_path.$prepend, $z_contenu, $fond, $ext, $echafauder); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | if ($disponible[$fond]) { |
| 118 | - $flux['data'] = substr(find_in_path($prefix_path . "page.$ext"), 0, -strlen(".$ext")); |
|
| 118 | + $flux['data'] = substr(find_in_path($prefix_path."page.$ext"), 0, -strlen(".$ext")); |
|
| 119 | 119 | } |
| 120 | 120 | } |
| 121 | 121 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $type = $flux['args']['contexte'][$page]; |
| 129 | 129 | } |
| 130 | 130 | if (!isset($disponible[$type])) { |
| 131 | - $disponible[$type] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $type, $ext, $echafauder); |
|
| 131 | + $disponible[$type] = z_contenu_disponible($prefix_path.$prepend, $z_contenu, $type, $ext, $echafauder); |
|
| 132 | 132 | } |
| 133 | 133 | if (is_string($disponible[$type])) { |
| 134 | 134 | $flux['data'] = $disponible[$type]; |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | ) { |
| 142 | 142 | $flux['data'] = $echafauder($type, $is[0], $is[1], $is[2], $ext); |
| 143 | 143 | } else { |
| 144 | - $flux['data'] = ($disponible['404'] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, '404', $ext, |
|
| 144 | + $flux['data'] = ($disponible['404'] = z_contenu_disponible($prefix_path.$prepend, $z_contenu, '404', $ext, |
|
| 145 | 145 | $echafauder)); |
| 146 | 146 | } |
| 147 | 147 | } |
@@ -160,10 +160,10 @@ discard block |
||
| 160 | 160 | $type = $flux['args']['contexte'][$page]; |
| 161 | 161 | } |
| 162 | 162 | if ($type !== 'page' and !isset($disponible[$type])) { |
| 163 | - $disponible[$type] = z_contenu_disponible($prefix_path . $prepend, $z_contenu, $type, $ext, $echafauder); |
|
| 163 | + $disponible[$type] = z_contenu_disponible($prefix_path.$prepend, $z_contenu, $type, $ext, $echafauder); |
|
| 164 | 164 | } |
| 165 | 165 | if ($type == 'page' or $disponible[$type]) { |
| 166 | - $flux['data'] = z_trouver_bloc($prefix_path . $prepend, $dir, 'dist', $ext); |
|
| 166 | + $flux['data'] = z_trouver_bloc($prefix_path.$prepend, $dir, 'dist', $ext); |
|
| 167 | 167 | } |
| 168 | 168 | } |
| 169 | 169 | } |
@@ -178,16 +178,16 @@ discard block |
||
| 178 | 178 | if (isset($flux['args']['contexte']['type-page']) |
| 179 | 179 | and ( |
| 180 | 180 | (isset($flux['args']['contexte']['composition']) |
| 181 | - and file_exists(($f = $squelette . "-" . $flux['args']['contexte']['type-page'] . "-" . $flux['args']['contexte']['composition']) . ".$ext")) |
|
| 181 | + and file_exists(($f = $squelette."-".$flux['args']['contexte']['type-page']."-".$flux['args']['contexte']['composition']).".$ext")) |
|
| 182 | 182 | or |
| 183 | - file_exists(($f = $squelette . "-" . $flux['args']['contexte']['type-page']) . ".$ext") |
|
| 183 | + file_exists(($f = $squelette."-".$flux['args']['contexte']['type-page']).".$ext") |
|
| 184 | 184 | ) |
| 185 | 185 | ) { |
| 186 | 186 | $flux['data'] = $f; |
| 187 | 187 | } |
| 188 | 188 | } elseif ($fond == 'structure' |
| 189 | 189 | and z_sanitize_var_zajax() |
| 190 | - and $f = find_in_path($prefix_path . $prepend . 'ajax' . ".$ext") |
|
| 190 | + and $f = find_in_path($prefix_path.$prepend.'ajax'.".$ext") |
|
| 191 | 191 | ) { |
| 192 | 192 | $flux['data'] = substr($f, 0, -strlen(".$ext")); |
| 193 | 193 | } // chercher le fond correspondant a la composition |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | and $dir = explode('/', $dir) |
| 198 | 198 | and $dir = reset($dir) |
| 199 | 199 | and in_array($dir, $z_blocs) |
| 200 | - and $f = find_in_path($prefix_path . $prepend . $fond . "-" . $flux['args']['contexte']['composition'] . ".$ext") |
|
| 200 | + and $f = find_in_path($prefix_path.$prepend.$fond."-".$flux['args']['contexte']['composition'].".$ext") |
|
| 201 | 201 | ) { |
| 202 | 202 | $flux['data'] = substr($f, 0, -strlen(".$ext")); |
| 203 | 203 | } |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | **/ |
| 259 | 259 | function z_fond_valide($squelette) { |
| 260 | 260 | if (!_ZCORE_EXCLURE_PATH |
| 261 | - or !preg_match(',(' . _ZCORE_EXCLURE_PATH . ')/,', $squelette) |
|
| 261 | + or !preg_match(',('._ZCORE_EXCLURE_PATH.')/,', $squelette) |
|
| 262 | 262 | ) { |
| 263 | 263 | return true; |
| 264 | 264 | } |
@@ -381,23 +381,23 @@ discard block |
||
| 381 | 381 | } |
| 382 | 382 | $dir = z_blocs(test_espace_prive()); |
| 383 | 383 | $dir = reset($dir); |
| 384 | - $scaffold = "<INCLURE{fond=prive/echafaudage/$dir/" . $fond . ",objet=" . $type . ",id_objet=#" . strtoupper($primary) . ",env}>"; |
|
| 384 | + $scaffold = "<INCLURE{fond=prive/echafaudage/$dir/".$fond.",objet=".$type.",id_objet=#".strtoupper($primary).",env}>"; |
|
| 385 | 385 | } // page objets |
| 386 | 386 | elseif ($type = $desc_exec and strpos($type, "/") === false) { |
| 387 | 387 | $dir = z_blocs(test_espace_prive()); |
| 388 | 388 | $dir = reset($dir); |
| 389 | - $scaffold = "<INCLURE{fond=prive/echafaudage/$dir/objets,objet=" . $type . ",env} />"; |
|
| 389 | + $scaffold = "<INCLURE{fond=prive/echafaudage/$dir/objets,objet=".$type.",env} />"; |
|
| 390 | 390 | } |
| 391 | 391 | // morceau d'objet : on fournit le fond de sibstitution dans $desc_exec |
| 392 | 392 | // et objet et tire de $table |
| 393 | 393 | elseif ($fond = $desc_exec) { |
| 394 | 394 | $dir = md5(dirname($fond)); |
| 395 | - $scaffold = "<INCLURE{fond=$fond,objet=" . objet_type($table) . ",env} />"; |
|
| 395 | + $scaffold = "<INCLURE{fond=$fond,objet=".objet_type($table).",env} />"; |
|
| 396 | 396 | } |
| 397 | 397 | |
| 398 | 398 | $base_dir = sous_repertoire(_DIR_CACHE, "scaffold", false); |
| 399 | 399 | $base_dir = sous_repertoire($base_dir, $dir, false); |
| 400 | - $f = $base_dir . "$exec"; |
|
| 400 | + $f = $base_dir."$exec"; |
|
| 401 | 401 | ecrire_fichier("$f.$ext", $scaffold); |
| 402 | 402 | |
| 403 | 403 | return $f; |
@@ -29,36 +29,36 @@ discard block |
||
| 29 | 29 | |
| 30 | 30 | function format_inclure_html($file, $args, $prof) { |
| 31 | 31 | if (strpos($file, '#') === false) { |
| 32 | - $t = $file ? ("(" . $file . ")") : ""; |
|
| 32 | + $t = $file ? ("(".$file.")") : ""; |
|
| 33 | 33 | } else { |
| 34 | - $t = "{fond=" . $file . '}'; |
|
| 34 | + $t = "{fond=".$file.'}'; |
|
| 35 | 35 | } |
| 36 | - $args = !$args ? '' : ("{" . join(", ", $args) . "}"); |
|
| 36 | + $args = !$args ? '' : ("{".join(", ", $args)."}"); |
|
| 37 | 37 | |
| 38 | - return ("<INCLURE" . $t . $args . ">"); |
|
| 38 | + return ("<INCLURE".$t.$args.">"); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | function format_polyglotte_html($args, $prof) { |
| 42 | 42 | $contenu = array(); |
| 43 | 43 | foreach ($args as $l => $t) { |
| 44 | - $contenu[] = ($l ? "[$l]" : '') . $t; |
|
| 44 | + $contenu[] = ($l ? "[$l]" : '').$t; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - return ("<multi>" . join(" ", $contenu) . "</multi>"); |
|
| 47 | + return ("<multi>".join(" ", $contenu)."</multi>"); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | function format_idiome_html($nom, $module, $args, $filtres, $prof) { |
| 51 | 51 | foreach ($args as $k => $v) { |
| 52 | 52 | $args[$k] = "$k=$v"; |
| 53 | 53 | } |
| 54 | - $args = (!$args ? '' : ('{' . join(',', $args) . '}')); |
|
| 54 | + $args = (!$args ? '' : ('{'.join(',', $args).'}')); |
|
| 55 | 55 | |
| 56 | - return ("<:" . ($module ? "$module:" : "") . $nom . $args . $filtres . ":>"); |
|
| 56 | + return ("<:".($module ? "$module:" : "").$nom.$args.$filtres.":>"); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | function format_champ_html($nom, $boucle, $etoile, $avant, $apres, $args, $filtres, $prof) { |
| 60 | 60 | $nom = "#" |
| 61 | - . ($boucle ? ($boucle . ":") : "") |
|
| 61 | + . ($boucle ? ($boucle.":") : "") |
|
| 62 | 62 | . $nom |
| 63 | 63 | . $etoile |
| 64 | 64 | . $args |
@@ -88,12 +88,12 @@ discard block |
||
| 88 | 88 | $critere[$k] = $crit_s; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - return (!$critere ? "" : ("{" . join(",", $critere) . "}")); |
|
| 91 | + return (!$critere ? "" : ("{".join(",", $critere)."}")); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | function format_liste_html($fonc, $args, $prof) { |
| 95 | 95 | return ((($fonc !== '') ? "|$fonc" : $fonc) |
| 96 | - . (!$args ? "" : ("{" . join(",", $args) . "}"))); |
|
| 96 | + . (!$args ? "" : ("{".join(",", $args)."}"))); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | // Concatenation sans separateur: verifier qu'on ne cree pas de faux lexemes |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | // si un texte se termine par ( et est suivi d'un champ |
| 110 | 110 | // ou assimiles, forcer la notation pleine |
| 111 | 111 | if ($c1 == '(' and substr($texte2, 0, 1) == '#') { |
| 112 | - $args[$i + 1][0] = '[(' . $texte2 . ')]'; |
|
| 112 | + $args[$i + 1][0] = '[('.$texte2.')]'; |
|
| 113 | 113 | } |
| 114 | 114 | } else { |
| 115 | 115 | if ($type == 'texte') { |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | if (($c1 == '}' and substr(ltrim($texte2), 0, 1) == '|') |
| 122 | 122 | or (preg_match('/[\w\d_*]/', $c1) and preg_match('/^[\w\d_*{|]/', $texte2)) |
| 123 | 123 | ) { |
| 124 | - $args[$i][0] = '[(' . $texte . ')]'; |
|
| 124 | + $args[$i][0] = '[('.$texte.')]'; |
|
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | **/ |
| 84 | 84 | function boucle_HIERARCHIE_dist($id_boucle, &$boucles) { |
| 85 | 85 | $boucle = &$boucles[$id_boucle]; |
| 86 | - $id_table = $boucle->id_table . ".id_rubrique"; |
|
| 86 | + $id_table = $boucle->id_table.".id_rubrique"; |
|
| 87 | 87 | |
| 88 | 88 | // Si la boucle mere est une boucle RUBRIQUES il faut ignorer la feuille |
| 89 | 89 | // sauf en presence du critere {tout} (vu par phraser_html) |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | . '$hierarchie = calcul_hierarchie_in($id_rubrique,' |
| 97 | 97 | . (isset($boucle->modificateur['tout']) ? 'true' : 'false') |
| 98 | 98 | . ");\n\t" |
| 99 | - . 'if (!$hierarchie) return "";' . "\n\t"; |
|
| 99 | + . 'if (!$hierarchie) return "";'."\n\t"; |
|
| 100 | 100 | |
| 101 | 101 | $boucle->where[] = array("'IN'", "'$id_table'", '"($hierarchie)"'); |
| 102 | 102 | |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * Texte |
| 42 | 42 | */ |
| 43 | 43 | function sandbox_composer_texte($texte, &$p) { |
| 44 | - $code = "'" . str_replace(array("\\", "'"), array("\\\\", "\\'"), $texte) . "'"; |
|
| 44 | + $code = "'".str_replace(array("\\", "'"), array("\\\\", "\\'"), $texte)."'"; |
|
| 45 | 45 | |
| 46 | 46 | return $code; |
| 47 | 47 | } |
@@ -162,8 +162,8 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | function sandbox_filtrer_squelette($skel, $corps, $filtres) { |
| 164 | 164 | $series_filtres = func_get_args(); |
| 165 | - array_shift($series_filtres);// skel |
|
| 166 | - array_shift($series_filtres);// corps |
|
| 165 | + array_shift($series_filtres); // skel |
|
| 166 | + array_shift($series_filtres); // corps |
|
| 167 | 167 | |
| 168 | 168 | // proteger les <INCLUDE> et tous les morceaux de php licites |
| 169 | 169 | if ($skel['process_ins'] == 'php') { |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | if (is_array($r)) { |
| 212 | 212 | $dst[] = $r[0]; |
| 213 | 213 | |
| 214 | - return $src[] = '___' . md5($r[0]) . '___'; |
|
| 214 | + return $src[] = '___'.md5($r[0]).'___'; |
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | // si on recoit pas un tableau, on renvoit les couples de substitution |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | echo pipeline('affiche_droite', array('args' => array('exec' => '404', 'exec_erreur' => $exec), 'data' => '')); |
| 43 | 43 | |
| 44 | 44 | echo debut_droite('404', true); |
| 45 | - echo "<h1 class='grostitre'>" . _T('fichier_introuvable', array('fichier' => $exec)) . '</h1>'; |
|
| 45 | + echo "<h1 class='grostitre'>"._T('fichier_introuvable', array('fichier' => $exec)).'</h1>'; |
|
| 46 | 46 | echo pipeline('affiche_milieu', array('args' => array('exec' => '404', 'exec_erreur' => $exec), 'data' => '')); |
| 47 | 47 | |
| 48 | 48 | echo fin_gauche(), fin_page(); |