@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | if ($objet == 'rubrique') { |
| 116 | 116 | // si c'est une rubrique-secteur contenant des breves, demander la |
| 117 | 117 | // confirmation du deplacement |
| 118 | - $contient_breves = sql_countsel('spip_breves', "id_rubrique=" . intval($id_objet)); |
|
| 118 | + $contient_breves = sql_countsel('spip_breves', "id_rubrique=".intval($id_objet)); |
|
| 119 | 119 | |
| 120 | 120 | if ($contient_breves > 0) { |
| 121 | 121 | $scb = ($contient_breves > 1 ? 's' : ''); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | )); |
| 127 | 127 | $confirm .= "\n<div class='confirmer_deplacement verdana2'>" |
| 128 | 128 | . "<div class='choix'><input type='checkbox' name='confirme_deplace' value='oui' id='confirme-deplace' /><label for='confirme-deplace'>" |
| 129 | - . $scb . |
|
| 129 | + . $scb. |
|
| 130 | 130 | "</label></div></div>\n"; |
| 131 | 131 | } else { |
| 132 | 132 | $confirm .= "<input type='hidden' name='confirme_deplace' value='oui' />\n"; |
@@ -135,11 +135,11 @@ discard block |
||
| 135 | 135 | $form .= $confirm; |
| 136 | 136 | if ($actionable) { |
| 137 | 137 | if (strpos($form, '<select') !== false) { |
| 138 | - $form .= "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>" |
|
| 139 | - . '<input class="fondo submit btn" type="submit" value="' . _T('bouton_choisir') . '"/>' |
|
| 138 | + $form .= "<div style='text-align: ".$GLOBALS['spip_lang_right'].";'>" |
|
| 139 | + . '<input class="fondo submit btn" type="submit" value="'._T('bouton_choisir').'"/>' |
|
| 140 | 140 | . "</div>"; |
| 141 | 141 | } |
| 142 | - $form = "<input type='hidden' name='editer_$objet' value='oui' />\n" . $form; |
|
| 142 | + $form = "<input type='hidden' name='editer_$objet' value='oui' />\n".$form; |
|
| 143 | 143 | if ($action = charger_fonction("editer_$objet", "action", true)) { |
| 144 | 144 | $form = generer_action_auteur("editer_$objet", $id_objet, self(), $form, |
| 145 | 145 | " method='post' class='submit_plongeur'"); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | |
| 156 | 156 | include_spip('inc/presentation'); |
| 157 | 157 | |
| 158 | - return debut_cadre_couleur($logo, true, "", $titre) . $form . fin_cadre_couleur(true); |
|
| 158 | + return debut_cadre_couleur($logo, true, "", $titre).$form.fin_cadre_couleur(true); |
|
| 159 | 159 | |
| 160 | 160 | } |
| 161 | 161 | |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | if ($statut == 'nouveau') { |
| 231 | 231 | if ($attente) { |
| 232 | 232 | $statut = $attente; |
| 233 | - $plus = " (" . _T('info_statut_auteur_a_confirmer') . ")"; |
|
| 233 | + $plus = " ("._T('info_statut_auteur_a_confirmer').")"; |
|
| 234 | 234 | } else { |
| 235 | 235 | return _T('info_statut_auteur_a_confirmer'); |
| 236 | 236 | } |
@@ -243,16 +243,16 @@ discard block |
||
| 243 | 243 | '5poubelle' => _T('texte_statut_poubelle'), // bouh |
| 244 | 244 | ); |
| 245 | 245 | if (isset($recom[$statut])) { |
| 246 | - return $recom[$statut] . $plus; |
|
| 246 | + return $recom[$statut].$plus; |
|
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | // retrouver directement par le statut sinon |
| 250 | 250 | if ($t = array_search($statut, $GLOBALS['liste_des_statuts'])) { |
| 251 | 251 | if (isset($recom[$t])) { |
| 252 | - return $recom[$t] . $plus; |
|
| 252 | + return $recom[$t].$plus; |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | - return _T($t) . $plus; |
|
| 255 | + return _T($t).$plus; |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | // si on a pas reussi a le traduire, retournons la chaine telle quelle |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | if (!$id_rubrique and defined('_CHOIX_RUBRIQUE_PAR_DEFAUT') and _CHOIX_RUBRIQUE_PAR_DEFAUT) { |
| 377 | 377 | $in = !count($GLOBALS['connect_id_rubrique']) |
| 378 | 378 | ? '' |
| 379 | - : (" AND " . sql_in('id_rubrique', $GLOBALS['connect_id_rubrique'])); |
|
| 379 | + : (" AND ".sql_in('id_rubrique', $GLOBALS['connect_id_rubrique'])); |
|
| 380 | 380 | |
| 381 | 381 | // on tente d'abord l'ecriture a la racine dans le cas des rubriques uniquement |
| 382 | 382 | if ($objet == 'rubrique') { |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | return ''; |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | - return propre("[->" . $virtuel . "]"); |
|
| 413 | + return propre("[->".$virtuel."]"); |
|
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | $args = param_low_sec($op, $args, $lang, 'rss'); |
| 439 | 439 | $url = generer_url_public('rss', $args); |
| 440 | 440 | |
| 441 | - return "<a style='float: " . $GLOBALS['spip_lang_right'] . ";' href='$url'>$clic</a>"; |
|
| 441 | + return "<a style='float: ".$GLOBALS['spip_lang_right'].";' href='$url'>$clic</a>"; |
|
| 442 | 442 | } |
| 443 | 443 | |
| 444 | 444 | |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | ); |
| 511 | 511 | |
| 512 | 512 | if ($alertes = array_filter($alertes)) { |
| 513 | - return "<div class='wrap-messages-alertes'><div class='messages-alertes'>" . |
|
| 513 | + return "<div class='wrap-messages-alertes'><div class='messages-alertes'>". |
|
| 514 | 514 | join(' | ', $alertes) |
| 515 | 515 | . "</div></div>"; |
| 516 | 516 | } |
@@ -544,13 +544,13 @@ discard block |
||
| 544 | 544 | */ |
| 545 | 545 | function afficher_plus_info($lien, $titre = "+", $titre_lien = "") { |
| 546 | 546 | $titre = attribut_html($titre); |
| 547 | - $icone = "\n<a href='$lien' title='$titre' class='plus_info'>" . |
|
| 548 | - http_img_pack("information-16.png", $titre) . "</a>"; |
|
| 547 | + $icone = "\n<a href='$lien' title='$titre' class='plus_info'>". |
|
| 548 | + http_img_pack("information-16.png", $titre)."</a>"; |
|
| 549 | 549 | |
| 550 | 550 | if (!$titre_lien) { |
| 551 | 551 | return $icone; |
| 552 | 552 | } else { |
| 553 | - return $icone . "\n<a href='$lien'>$titre_lien</a>"; |
|
| 553 | + return $icone."\n<a href='$lien'>$titre_lien</a>"; |
|
| 554 | 554 | } |
| 555 | 555 | } |
| 556 | 556 | |
@@ -53,12 +53,12 @@ discard block |
||
| 53 | 53 | if (strlen($dossier) and substr($dossier, -1) != '/') { |
| 54 | 54 | $dossier .= '/'; |
| 55 | 55 | } |
| 56 | - $f = str_replace('/', '_', $dossier) . $nom; |
|
| 56 | + $f = str_replace('/', '_', $dossier).$nom; |
|
| 57 | 57 | |
| 58 | 58 | if (function_exists($f)) { |
| 59 | 59 | return $f; |
| 60 | 60 | } |
| 61 | - if (function_exists($g = $f . '_dist')) { |
|
| 61 | + if (function_exists($g = $f.'_dist')) { |
|
| 62 | 62 | return $g; |
| 63 | 63 | } |
| 64 | 64 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | // passer en minuscules (cf les balises de formulaires) |
| 80 | 80 | // et inclure le fichier |
| 81 | - if (!$inc = include_spip($dossier . ($d = strtolower($nom))) |
|
| 81 | + if (!$inc = include_spip($dossier.($d = strtolower($nom))) |
|
| 82 | 82 | // si le fichier truc/machin/nom.php n'existe pas, |
| 83 | 83 | // la fonction peut etre definie dans truc/machin.php qui regroupe plusieurs petites fonctions |
| 84 | 84 | and strlen(dirname($dossier)) and dirname($dossier) != '.' |
@@ -97,13 +97,13 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | // Echec : message d'erreur |
| 100 | - spip_log("fonction $nom ($f ou $g) indisponible" . |
|
| 100 | + spip_log("fonction $nom ($f ou $g) indisponible". |
|
| 101 | 101 | ($inc ? "" : " (fichier $d absent de $dossier)")); |
| 102 | 102 | |
| 103 | 103 | include_spip('inc/minipres'); |
| 104 | 104 | echo minipres(_T('forum_titre_erreur'), |
| 105 | - _T('fichier_introuvable', array('fichier' => '<b>' . spip_htmlentities($d) . '</b>')), |
|
| 106 | - array('all_inline'=>true,'status'=>404)); |
|
| 105 | + _T('fichier_introuvable', array('fichier' => '<b>'.spip_htmlentities($d).'</b>')), |
|
| 106 | + array('all_inline'=>true, 'status'=>404)); |
|
| 107 | 107 | exit; |
| 108 | 108 | } |
| 109 | 109 | |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | * - string : chemin du fichier trouvé |
| 149 | 149 | **/ |
| 150 | 150 | function include_spip($f, $include = true) { |
| 151 | - return find_in_path($f . '.php', '', $include); |
|
| 151 | + return find_in_path($f.'.php', '', $include); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | /** |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | * - string : chemin du fichier trouvé |
| 169 | 169 | **/ |
| 170 | 170 | function require_spip($f) { |
| 171 | - return find_in_path($f . '.php', '', 'required'); |
|
| 171 | + return find_in_path($f.'.php', '', 'required'); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | // donc il faut l'inclure "en globals" |
| 186 | 186 | if ($f = find_in_path('mes_fonctions.php')) { |
| 187 | 187 | global $dossier_squelettes; |
| 188 | - include_once(_ROOT_CWD . $f); |
|
| 188 | + include_once(_ROOT_CWD.$f); |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | if (@is_readable(_CACHE_PLUGINS_FCT)) { |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | // appliquer notre fonction si elle existe |
| 292 | - $fonc = 'execute_pipeline_' . strtolower($action); |
|
| 292 | + $fonc = 'execute_pipeline_'.strtolower($action); |
|
| 293 | 293 | if (function_exists($fonc)) { |
| 294 | 294 | $val = $fonc($val); |
| 295 | 295 | } // plantage ? |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | function spip_log($message = null, $name = null) { |
| 354 | 354 | static $pre = array(); |
| 355 | 355 | static $log; |
| 356 | - preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs); |
|
| 356 | + preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string) $name, $regs); |
|
| 357 | 357 | if (!isset($regs[1]) or !$logname = $regs[1]) { |
| 358 | 358 | $logname = null; |
| 359 | 359 | } |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | if (!is_string($message)) { |
| 382 | 382 | $message = print_r($message, true); |
| 383 | 383 | } |
| 384 | - $log($pre[$niveau] . ' ' . $message, $logname); |
|
| 384 | + $log($pre[$niveau].' '.$message, $logname); |
|
| 385 | 385 | } |
| 386 | 386 | } |
| 387 | 387 | |
@@ -494,9 +494,9 @@ discard block |
||
| 494 | 494 | * @param string $sanitize_function |
| 495 | 495 | * @return array|mixed|string |
| 496 | 496 | */ |
| 497 | -function spip_sanitize_from_request($value, $key, $sanitize_function='entites_html') { |
|
| 497 | +function spip_sanitize_from_request($value, $key, $sanitize_function = 'entites_html') { |
|
| 498 | 498 | if (is_array($value)) { |
| 499 | - if ($key=='*') { |
|
| 499 | + if ($key == '*') { |
|
| 500 | 500 | $key = array_keys($value); |
| 501 | 501 | } |
| 502 | 502 | if (!is_array($key)) { |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | $a = './'; |
| 582 | 582 | } |
| 583 | 583 | |
| 584 | - $regexp = ',^(' . str_replace('[]', '\[\]', $c) . '[[]?[]]?)(=.*)?$,'; |
|
| 584 | + $regexp = ',^('.str_replace('[]', '\[\]', $c).'[[]?[]]?)(=.*)?$,'; |
|
| 585 | 585 | $ajouts = array_flip(explode('|', $c)); |
| 586 | 586 | $u = is_array($v) ? $v : rawurlencode($v); |
| 587 | 587 | $testv = (is_array($v) ? count($v) : strlen($v)); |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | // Ajout. Pour une variable, remplacer au meme endroit, |
| 609 | 609 | // pour un tableau ce sera fait dans la prochaine boucle |
| 610 | 610 | elseif (substr($r[1], -2) != '[]') { |
| 611 | - $url[$n] = $r[1] . '=' . $u; |
|
| 611 | + $url[$n] = $r[1].'='.$u; |
|
| 612 | 612 | unset($ajouts[$r[1]]); |
| 613 | 613 | } |
| 614 | 614 | // Pour les tableaux on laisse tomber les valeurs de |
@@ -628,11 +628,11 @@ discard block |
||
| 628 | 628 | } elseif ($testv) { |
| 629 | 629 | foreach ($ajouts as $k => $n) { |
| 630 | 630 | if (!is_array($v)) { |
| 631 | - $url[] = $k . '=' . $u; |
|
| 631 | + $url[] = $k.'='.$u; |
|
| 632 | 632 | } else { |
| 633 | - $id = (substr($k, -2) == '[]') ? $k : ($k . "[]"); |
|
| 633 | + $id = (substr($k, -2) == '[]') ? $k : ($k."[]"); |
|
| 634 | 634 | foreach ($v as $w) { |
| 635 | - $url[] = $id . '=' . (is_array($w) ? 'Array' : $w); |
|
| 635 | + $url[] = $id.'='.(is_array($w) ? 'Array' : $w); |
|
| 636 | 636 | } |
| 637 | 637 | } |
| 638 | 638 | } |
@@ -643,10 +643,10 @@ discard block |
||
| 643 | 643 | |
| 644 | 644 | // recomposer l'adresse |
| 645 | 645 | if ($url) { |
| 646 | - $a .= '?' . join($sep, $url); |
|
| 646 | + $a .= '?'.join($sep, $url); |
|
| 647 | 647 | } |
| 648 | 648 | |
| 649 | - return $a . $ancre; |
|
| 649 | + return $a.$ancre; |
|
| 650 | 650 | } |
| 651 | 651 | |
| 652 | 652 | /** |
@@ -678,7 +678,7 @@ discard block |
||
| 678 | 678 | translitteration($ancre) |
| 679 | 679 | ); |
| 680 | 680 | } |
| 681 | - return $url . (strlen($ancre) ? '#' . $ancre : ''); |
|
| 681 | + return $url.(strlen($ancre) ? '#'.$ancre : ''); |
|
| 682 | 682 | } |
| 683 | 683 | |
| 684 | 684 | /** |
@@ -790,7 +790,7 @@ discard block |
||
| 790 | 790 | * @return bool |
| 791 | 791 | */ |
| 792 | 792 | function test_plugin_actif($plugin) { |
| 793 | - return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false; |
|
| 793 | + return ($plugin and defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false; |
|
| 794 | 794 | } |
| 795 | 795 | |
| 796 | 796 | /** |
@@ -858,8 +858,7 @@ discard block |
||
| 858 | 858 | // pour les chaines non traduites, assurer un service minimum |
| 859 | 859 | if (!$GLOBALS['test_i18n'] and (_request('var_mode') != 'traduction')) { |
| 860 | 860 | $text = str_replace('_', ' ', |
| 861 | - (($n = strpos($text, ':')) === false ? $texte : |
|
| 862 | - substr($texte, $n + 1))); |
|
| 861 | + (($n = strpos($text, ':')) === false ? $texte : substr($texte, $n + 1))); |
|
| 863 | 862 | } |
| 864 | 863 | $o['class'] = null; |
| 865 | 864 | |
@@ -931,7 +930,7 @@ discard block |
||
| 931 | 930 | // Si des variables n'ont pas ete inserees, le signaler |
| 932 | 931 | // (chaines de langues pas a jour) |
| 933 | 932 | if ($args) { |
| 934 | - spip_log("$f: variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG); |
|
| 933 | + spip_log("$f: variables inutilisees ".join(', ', array_keys($args)), _LOG_DEBUG); |
|
| 935 | 934 | } |
| 936 | 935 | } |
| 937 | 936 | |
@@ -955,7 +954,7 @@ discard block |
||
| 955 | 954 | function joli_repertoire($rep) { |
| 956 | 955 | $a = substr($rep, 0, 1); |
| 957 | 956 | if ($a <> '.' and $a <> '/') { |
| 958 | - $rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep; |
|
| 957 | + $rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep; |
|
| 959 | 958 | } |
| 960 | 959 | $rep = preg_replace(',(^\.\.\/),', '', $rep); |
| 961 | 960 | |
@@ -1009,7 +1008,7 @@ discard block |
||
| 1009 | 1008 | $p -= ($x * 1000); |
| 1010 | 1009 | } |
| 1011 | 1010 | |
| 1012 | - return $s . sprintf($s ? "%07.3f ms" : "%.3f ms", $p); |
|
| 1011 | + return $s.sprintf($s ? "%07.3f ms" : "%.3f ms", $p); |
|
| 1013 | 1012 | } |
| 1014 | 1013 | } |
| 1015 | 1014 | |
@@ -1078,7 +1077,7 @@ discard block |
||
| 1078 | 1077 | if ($taches and count($taches) and !spip_connect()) { |
| 1079 | 1078 | return false; |
| 1080 | 1079 | } |
| 1081 | - spip_log("cron !", 'jq' . _LOG_DEBUG); |
|
| 1080 | + spip_log("cron !", 'jq'._LOG_DEBUG); |
|
| 1082 | 1081 | if ($genie = charger_fonction('genie', 'inc', true)) { |
| 1083 | 1082 | return $genie($taches); |
| 1084 | 1083 | } |
@@ -1182,7 +1181,7 @@ discard block |
||
| 1182 | 1181 | |
| 1183 | 1182 | if ($queue_next_job_time == -1) { |
| 1184 | 1183 | if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) { |
| 1185 | - define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . "job_queue_next.txt"); |
|
| 1184 | + define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP."job_queue_next.txt"); |
|
| 1186 | 1185 | } |
| 1187 | 1186 | // utiliser un cache memoire si dispo |
| 1188 | 1187 | if (function_exists("cache_get") and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) { |
@@ -1249,8 +1248,8 @@ discard block |
||
| 1249 | 1248 | $src = ''; |
| 1250 | 1249 | } |
| 1251 | 1250 | if ($script) { |
| 1252 | - $script = ("/*<![CDATA[*/\n" . |
|
| 1253 | - preg_replace(',</([^>]*)>,', '<\/\1>', $script) . |
|
| 1251 | + $script = ("/*<![CDATA[*/\n". |
|
| 1252 | + preg_replace(',</([^>]*)>,', '<\/\1>', $script). |
|
| 1254 | 1253 | "/*]]>*/"); |
| 1255 | 1254 | } |
| 1256 | 1255 | if ($noscript) { |
@@ -1336,13 +1335,13 @@ discard block |
||
| 1336 | 1335 | if ($path_base == null) { |
| 1337 | 1336 | // Chemin standard depuis l'espace public |
| 1338 | 1337 | $path = defined('_SPIP_PATH') ? _SPIP_PATH : |
| 1339 | - _DIR_RACINE . ':' . |
|
| 1340 | - _DIR_RACINE . 'squelettes-dist/:' . |
|
| 1341 | - _DIR_RACINE . 'prive/:' . |
|
| 1338 | + _DIR_RACINE.':'. |
|
| 1339 | + _DIR_RACINE.'squelettes-dist/:'. |
|
| 1340 | + _DIR_RACINE.'prive/:'. |
|
| 1342 | 1341 | _DIR_RESTREINT; |
| 1343 | 1342 | // Ajouter squelettes/ |
| 1344 | - if (@is_dir(_DIR_RACINE . 'squelettes')) { |
|
| 1345 | - $path = _DIR_RACINE . 'squelettes/:' . $path; |
|
| 1343 | + if (@is_dir(_DIR_RACINE.'squelettes')) { |
|
| 1344 | + $path = _DIR_RACINE.'squelettes/:'.$path; |
|
| 1346 | 1345 | } |
| 1347 | 1346 | foreach (explode(':', $path) as $dir) { |
| 1348 | 1347 | if (strlen($dir) and substr($dir, -1) != '/') { |
@@ -1354,7 +1353,7 @@ discard block |
||
| 1354 | 1353 | // Et le(s) dossier(s) des squelettes nommes |
| 1355 | 1354 | if (strlen($GLOBALS['dossier_squelettes'])) { |
| 1356 | 1355 | foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) { |
| 1357 | - array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/'); |
|
| 1356 | + array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE).$d.'/'); |
|
| 1358 | 1357 | } |
| 1359 | 1358 | } |
| 1360 | 1359 | $GLOBALS['path_sig'] = md5(serialize($path_full)); |
@@ -1365,7 +1364,7 @@ discard block |
||
| 1365 | 1364 | |
| 1366 | 1365 | if (is_array($dir_path) or strlen($dir_path)) { |
| 1367 | 1366 | $tete = ""; |
| 1368 | - if (reset($path_base) == _DIR_RACINE . 'squelettes/') { |
|
| 1367 | + if (reset($path_base) == _DIR_RACINE.'squelettes/') { |
|
| 1369 | 1368 | $tete = array_shift($path_base); |
| 1370 | 1369 | } |
| 1371 | 1370 | $dirs = (is_array($dir_path) ? $dir_path : explode(':', $dir_path)); |
@@ -1386,7 +1385,7 @@ discard block |
||
| 1386 | 1385 | // Et le(s) dossier(s) des squelettes nommes |
| 1387 | 1386 | if (strlen($GLOBALS['dossier_squelettes'])) { |
| 1388 | 1387 | foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) { |
| 1389 | - array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/'); |
|
| 1388 | + array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE).$d.'/'); |
|
| 1390 | 1389 | } |
| 1391 | 1390 | } |
| 1392 | 1391 | |
@@ -1456,9 +1455,9 @@ discard block |
||
| 1456 | 1455 | // on peut fournir une icone generique -xx.svg qui fera le job dans toutes les tailles, et qui est prioritaire sur le png |
| 1457 | 1456 | // si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png |
| 1458 | 1457 | if (preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m) |
| 1459 | - and $file_svg_generique = substr($file,0, -strlen($m[0])) . "-xx.svg" |
|
| 1458 | + and $file_svg_generique = substr($file, 0, -strlen($m[0]))."-xx.svg" |
|
| 1460 | 1459 | and $f = find_in_theme("$file_svg_generique")) { |
| 1461 | - if ($fsize = substr($f,0,-6) . $m[1] . ".svg" and file_exists($fsize)) { |
|
| 1460 | + if ($fsize = substr($f, 0, -6).$m[1].".svg" and file_exists($fsize)) { |
|
| 1462 | 1461 | return $themefiles["$subdir$file"] = $fsize; |
| 1463 | 1462 | } |
| 1464 | 1463 | else { |
@@ -1472,7 +1471,7 @@ discard block |
||
| 1472 | 1471 | return $themefiles["$subdir$file"] = $f; |
| 1473 | 1472 | } |
| 1474 | 1473 | } |
| 1475 | - spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme'); |
|
| 1474 | + spip_log("$file introuvable dans le theme prive ".reset($themes), 'theme'); |
|
| 1476 | 1475 | |
| 1477 | 1476 | return $themefiles["$subdir$file"] = ""; |
| 1478 | 1477 | } |
@@ -1500,7 +1499,7 @@ discard block |
||
| 1500 | 1499 | function chemin_image($icone) { |
| 1501 | 1500 | static $icone_renommer; |
| 1502 | 1501 | if ($p = strpos($icone, '?')) { |
| 1503 | - $icone = substr($icone,0, $p); |
|
| 1502 | + $icone = substr($icone, 0, $p); |
|
| 1504 | 1503 | } |
| 1505 | 1504 | // gerer le cas d'un double appel en evitant de refaire le travail inutilement |
| 1506 | 1505 | if (strpos($icone, "/") !== false and file_exists($icone)) { |
@@ -1580,8 +1579,8 @@ discard block |
||
| 1580 | 1579 | return false; |
| 1581 | 1580 | } |
| 1582 | 1581 | if ($include and !isset($inc[$dirname][$file])) { |
| 1583 | - include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
|
| 1584 | - $inc[$dirname][$file] = $inc[''][$dirname . $file] = true; |
|
| 1582 | + include_once _ROOT_CWD.$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
|
| 1583 | + $inc[$dirname][$file] = $inc[''][$dirname.$file] = true; |
|
| 1585 | 1584 | } |
| 1586 | 1585 | |
| 1587 | 1586 | return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
@@ -1594,14 +1593,14 @@ discard block |
||
| 1594 | 1593 | } |
| 1595 | 1594 | |
| 1596 | 1595 | foreach (creer_chemin() as $dir) { |
| 1597 | - if (!isset($dirs[$a = $dir . $dirname])) { |
|
| 1598 | - $dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a); |
|
| 1596 | + if (!isset($dirs[$a = $dir.$dirname])) { |
|
| 1597 | + $dirs[$a] = (is_dir(_ROOT_CWD.$a) || !$a); |
|
| 1599 | 1598 | } |
| 1600 | 1599 | if ($dirs[$a]) { |
| 1601 | - if (file_exists(_ROOT_CWD . ($a .= $file))) { |
|
| 1600 | + if (file_exists(_ROOT_CWD.($a .= $file))) { |
|
| 1602 | 1601 | if ($include and !isset($inc[$dirname][$file])) { |
| 1603 | - include_once _ROOT_CWD . $a; |
|
| 1604 | - $inc[$dirname][$file] = $inc[''][$dirname . $file] = true; |
|
| 1602 | + include_once _ROOT_CWD.$a; |
|
| 1603 | + $inc[$dirname][$file] = $inc[''][$dirname.$file] = true; |
|
| 1605 | 1604 | } |
| 1606 | 1605 | if (!defined('_SAUVER_CHEMIN')) { |
| 1607 | 1606 | // si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher |
@@ -1611,7 +1610,7 @@ discard block |
||
| 1611 | 1610 | define('_SAUVER_CHEMIN', true); |
| 1612 | 1611 | } |
| 1613 | 1612 | |
| 1614 | - return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a; |
|
| 1613 | + return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = $a; |
|
| 1615 | 1614 | } |
| 1616 | 1615 | } |
| 1617 | 1616 | } |
@@ -1637,7 +1636,7 @@ discard block |
||
| 1637 | 1636 | define('_SAUVER_CHEMIN', true); |
| 1638 | 1637 | } |
| 1639 | 1638 | |
| 1640 | - return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false; |
|
| 1639 | + return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = false; |
|
| 1641 | 1640 | } |
| 1642 | 1641 | |
| 1643 | 1642 | function clear_path_cache() { |
@@ -1706,12 +1705,12 @@ discard block |
||
| 1706 | 1705 | // cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue |
| 1707 | 1706 | // on a pas encore inclus flock.php |
| 1708 | 1707 | if (!function_exists('preg_files')) { |
| 1709 | - include_once _ROOT_RESTREINT . 'inc/flock.php'; |
|
| 1708 | + include_once _ROOT_RESTREINT.'inc/flock.php'; |
|
| 1710 | 1709 | } |
| 1711 | 1710 | |
| 1712 | 1711 | // Parcourir le chemin |
| 1713 | 1712 | foreach (creer_chemin() as $d) { |
| 1714 | - $f = $d . $dir; |
|
| 1713 | + $f = $d.$dir; |
|
| 1715 | 1714 | if (@is_dir($f)) { |
| 1716 | 1715 | $liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? array() : $recurs); |
| 1717 | 1716 | foreach ($liste as $chemin) { |
@@ -1741,9 +1740,9 @@ discard block |
||
| 1741 | 1740 | static $autsanscookie = array('install', 'base_repair'); |
| 1742 | 1741 | |
| 1743 | 1742 | if (in_array($nom, $autsanscookie)) { |
| 1744 | - if (test_espace_prive()){ |
|
| 1743 | + if (test_espace_prive()) { |
|
| 1745 | 1744 | include_spip('base/connect_sql'); |
| 1746 | - if (!$strict or !spip_connect()){ |
|
| 1745 | + if (!$strict or !spip_connect()) { |
|
| 1747 | 1746 | return true; |
| 1748 | 1747 | } |
| 1749 | 1748 | } |
@@ -1822,7 +1821,7 @@ discard block |
||
| 1822 | 1821 | return $res; |
| 1823 | 1822 | } |
| 1824 | 1823 | // Sinon c'est un raccourci ou compat SPIP < 2 |
| 1825 | - if (!function_exists($f = 'generer_url_' . $entite)) { |
|
| 1824 | + if (!function_exists($f = 'generer_url_'.$entite)) { |
|
| 1826 | 1825 | if (!function_exists($f .= '_dist')) { |
| 1827 | 1826 | $f = ''; |
| 1828 | 1827 | } |
@@ -1831,8 +1830,8 @@ discard block |
||
| 1831 | 1830 | $url = $f($id, $args, $ancre); |
| 1832 | 1831 | if (strlen($args)) { |
| 1833 | 1832 | $url .= strstr($url, '?') |
| 1834 | - ? '&' . $args |
|
| 1835 | - : '?' . $args; |
|
| 1833 | + ? '&'.$args |
|
| 1834 | + : '?'.$args; |
|
| 1836 | 1835 | } |
| 1837 | 1836 | |
| 1838 | 1837 | return $url; |
@@ -1863,8 +1862,8 @@ discard block |
||
| 1863 | 1862 | include_spip('base/connect_sql'); |
| 1864 | 1863 | $id_type = id_table_objet($entite, $public); |
| 1865 | 1864 | |
| 1866 | - return _DIR_RACINE . get_spip_script('./') |
|
| 1867 | - . "?" . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public" |
|
| 1865 | + return _DIR_RACINE.get_spip_script('./') |
|
| 1866 | + . "?"._SPIP_PAGE."=$entite&$id_type=$i&connect=$public" |
|
| 1868 | 1867 | . (!$args ? '' : "&$args") |
| 1869 | 1868 | . (!$ancre ? '' : "#$ancre"); |
| 1870 | 1869 | } |
@@ -2016,7 +2015,7 @@ discard block |
||
| 2016 | 2015 | if (!empty($_SERVER['QUERY_STRING']) |
| 2017 | 2016 | and !strpos($_SERVER['REQUEST_URI'], '?') |
| 2018 | 2017 | ) { |
| 2019 | - $GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; |
|
| 2018 | + $GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; |
|
| 2020 | 2019 | } |
| 2021 | 2020 | } |
| 2022 | 2021 | } |
@@ -2043,17 +2042,17 @@ discard block |
||
| 2043 | 2042 | list($myself) = explode('?', $myself); |
| 2044 | 2043 | // vieux mode HTTP qui envoie après le nom de la methode l'URL compléte |
| 2045 | 2044 | // protocole, "://", nom du serveur avant le path dans _SERVER["REQUEST_URI"] |
| 2046 | - if (strpos($myself,'://') !== false) { |
|
| 2047 | - $myself = explode('://',$myself); |
|
| 2045 | + if (strpos($myself, '://') !== false) { |
|
| 2046 | + $myself = explode('://', $myself); |
|
| 2048 | 2047 | array_shift($myself); |
| 2049 | - $myself = implode('://',$myself); |
|
| 2050 | - $myself = explode('/',$myself); |
|
| 2048 | + $myself = implode('://', $myself); |
|
| 2049 | + $myself = explode('/', $myself); |
|
| 2051 | 2050 | array_shift($myself); |
| 2052 | - $myself = implode('/',$myself); |
|
| 2051 | + $myself = implode('/', $myself); |
|
| 2053 | 2052 | } |
| 2054 | - $url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/'; |
|
| 2053 | + $url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)).'/'; |
|
| 2055 | 2054 | |
| 2056 | - $url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/'); |
|
| 2055 | + $url = $http.'://'.rtrim($host, '/').'/'.ltrim($url, '/'); |
|
| 2057 | 2056 | |
| 2058 | 2057 | return $url; |
| 2059 | 2058 | } |
@@ -2091,17 +2090,17 @@ discard block |
||
| 2091 | 2090 | **/ |
| 2092 | 2091 | function generer_url_ecrire($script = '', $args = "", $no_entities = false, $rel = false) { |
| 2093 | 2092 | if (!$rel) { |
| 2094 | - $rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT; |
|
| 2093 | + $rel = url_de_base()._DIR_RESTREINT_ABS._SPIP_ECRIRE_SCRIPT; |
|
| 2095 | 2094 | } else { |
| 2096 | 2095 | if (!is_string($rel)) { |
| 2097 | 2096 | $rel = _DIR_RESTREINT ? _DIR_RESTREINT : |
| 2098 | - ('./' . _SPIP_ECRIRE_SCRIPT); |
|
| 2097 | + ('./'._SPIP_ECRIRE_SCRIPT); |
|
| 2099 | 2098 | } |
| 2100 | 2099 | } |
| 2101 | 2100 | |
| 2102 | 2101 | list($script, $ancre) = array_pad(explode('#', $script), 2, null); |
| 2103 | 2102 | if ($script and ($script <> 'accueil' or $rel)) { |
| 2104 | - $args = "?exec=$script" . (!$args ? '' : "&$args"); |
|
| 2103 | + $args = "?exec=$script".(!$args ? '' : "&$args"); |
|
| 2105 | 2104 | } elseif ($args) { |
| 2106 | 2105 | $args = "?$args"; |
| 2107 | 2106 | } |
@@ -2109,7 +2108,7 @@ discard block |
||
| 2109 | 2108 | $args .= "#$ancre"; |
| 2110 | 2109 | } |
| 2111 | 2110 | |
| 2112 | - return $rel . ($no_entities ? $args : str_replace('&', '&', $args)); |
|
| 2111 | + return $rel.($no_entities ? $args : str_replace('&', '&', $args)); |
|
| 2113 | 2112 | } |
| 2114 | 2113 | |
| 2115 | 2114 | // |
@@ -2179,25 +2178,25 @@ discard block |
||
| 2179 | 2178 | if (is_array($args)) { |
| 2180 | 2179 | $r = ''; |
| 2181 | 2180 | foreach ($args as $k => $v) { |
| 2182 | - $r .= '&' . $k . '=' . $v; |
|
| 2181 | + $r .= '&'.$k.'='.$v; |
|
| 2183 | 2182 | } |
| 2184 | 2183 | $args = substr($r, 1); |
| 2185 | 2184 | } |
| 2186 | 2185 | $action .= |
| 2187 | - (strpos($action, '?') !== false ? '&' : '?') . $args; |
|
| 2186 | + (strpos($action, '?') !== false ? '&' : '?').$args; |
|
| 2188 | 2187 | } |
| 2189 | 2188 | if (!$no_entities) { |
| 2190 | 2189 | $action = quote_amp($action); |
| 2191 | 2190 | } |
| 2192 | 2191 | |
| 2193 | 2192 | // ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide |
| 2194 | - return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(",^/[.]/,", "/", "/$action")); |
|
| 2193 | + return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/').preg_replace(",^/[.]/,", "/", "/$action")); |
|
| 2195 | 2194 | } |
| 2196 | 2195 | |
| 2197 | 2196 | // https://code.spip.net/@generer_url_prive |
| 2198 | 2197 | function generer_url_prive($script, $args = "", $no_entities = false) { |
| 2199 | 2198 | |
| 2200 | - return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php'); |
|
| 2199 | + return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS.'prive.php'); |
|
| 2201 | 2200 | } |
| 2202 | 2201 | |
| 2203 | 2202 | // Pour les formulaires en methode POST, |
@@ -2232,8 +2231,7 @@ discard block |
||
| 2232 | 2231 | . "><div>\n" |
| 2233 | 2232 | . "<input type='hidden' name='exec' value='$script1' />" |
| 2234 | 2233 | . $corps |
| 2235 | - . (!$submit ? '' : |
|
| 2236 | - ("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . "\" /></div>")) |
|
| 2234 | + . (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo submit btn' type='submit' value=\"".entites_html($submit)."\" /></div>")) |
|
| 2237 | 2235 | . "</div></form>\n"; |
| 2238 | 2236 | } |
| 2239 | 2237 | |
@@ -2258,14 +2256,14 @@ discard block |
||
| 2258 | 2256 | ? generer_url_ecrire(_request('exec')) |
| 2259 | 2257 | : generer_url_public(); |
| 2260 | 2258 | |
| 2261 | - return "\n<form action='" . |
|
| 2262 | - $h . |
|
| 2263 | - "'" . |
|
| 2264 | - $atts . |
|
| 2265 | - ">\n" . |
|
| 2266 | - "<div>" . |
|
| 2267 | - "\n<input type='hidden' name='action' value='$script' />" . |
|
| 2268 | - $corps . |
|
| 2259 | + return "\n<form action='". |
|
| 2260 | + $h. |
|
| 2261 | + "'". |
|
| 2262 | + $atts. |
|
| 2263 | + ">\n". |
|
| 2264 | + "<div>". |
|
| 2265 | + "\n<input type='hidden' name='action' value='$script' />". |
|
| 2266 | + $corps. |
|
| 2269 | 2267 | "</div></form>"; |
| 2270 | 2268 | } |
| 2271 | 2269 | |
@@ -2293,7 +2291,7 @@ discard block |
||
| 2293 | 2291 | : generer_url_public('', '', false, false); |
| 2294 | 2292 | $url = parametre_url($url, 'action', $script); |
| 2295 | 2293 | if ($args) { |
| 2296 | - $url .= quote_amp('&' . $args); |
|
| 2294 | + $url .= quote_amp('&'.$args); |
|
| 2297 | 2295 | } |
| 2298 | 2296 | |
| 2299 | 2297 | if ($no_entities) { |
@@ -2343,17 +2341,17 @@ discard block |
||
| 2343 | 2341 | |
| 2344 | 2342 | // le nom du repertoire plugins/ activables/desactivables |
| 2345 | 2343 | if (!defined('_DIR_PLUGINS')) { |
| 2346 | - define('_DIR_PLUGINS', _DIR_RACINE . "plugins/"); |
|
| 2344 | + define('_DIR_PLUGINS', _DIR_RACINE."plugins/"); |
|
| 2347 | 2345 | } |
| 2348 | 2346 | |
| 2349 | 2347 | // le nom du repertoire des extensions/ permanentes du core, toujours actives |
| 2350 | 2348 | if (!defined('_DIR_PLUGINS_DIST')) { |
| 2351 | - define('_DIR_PLUGINS_DIST', _DIR_RACINE . "plugins-dist/"); |
|
| 2349 | + define('_DIR_PLUGINS_DIST', _DIR_RACINE."plugins-dist/"); |
|
| 2352 | 2350 | } |
| 2353 | 2351 | |
| 2354 | 2352 | // le nom du repertoire des librairies |
| 2355 | 2353 | if (!defined('_DIR_LIB')) { |
| 2356 | - define('_DIR_LIB', _DIR_RACINE . "lib/"); |
|
| 2354 | + define('_DIR_LIB', _DIR_RACINE."lib/"); |
|
| 2357 | 2355 | } |
| 2358 | 2356 | |
| 2359 | 2357 | if (!defined('_DIR_IMG')) { |
@@ -2363,29 +2361,29 @@ discard block |
||
| 2363 | 2361 | define('_DIR_LOGOS', $pa); |
| 2364 | 2362 | } |
| 2365 | 2363 | if (!defined('_DIR_IMG_ICONES')) { |
| 2366 | - define('_DIR_IMG_ICONES', _DIR_LOGOS . "icones/"); |
|
| 2364 | + define('_DIR_IMG_ICONES', _DIR_LOGOS."icones/"); |
|
| 2367 | 2365 | } |
| 2368 | 2366 | |
| 2369 | 2367 | if (!defined('_DIR_DUMP')) { |
| 2370 | - define('_DIR_DUMP', $ti . "dump/"); |
|
| 2368 | + define('_DIR_DUMP', $ti."dump/"); |
|
| 2371 | 2369 | } |
| 2372 | 2370 | if (!defined('_DIR_SESSIONS')) { |
| 2373 | - define('_DIR_SESSIONS', $ti . "sessions/"); |
|
| 2371 | + define('_DIR_SESSIONS', $ti."sessions/"); |
|
| 2374 | 2372 | } |
| 2375 | 2373 | if (!defined('_DIR_TRANSFERT')) { |
| 2376 | - define('_DIR_TRANSFERT', $ti . "upload/"); |
|
| 2374 | + define('_DIR_TRANSFERT', $ti."upload/"); |
|
| 2377 | 2375 | } |
| 2378 | 2376 | if (!defined('_DIR_CACHE')) { |
| 2379 | - define('_DIR_CACHE', $ti . "cache/"); |
|
| 2377 | + define('_DIR_CACHE', $ti."cache/"); |
|
| 2380 | 2378 | } |
| 2381 | 2379 | if (!defined('_DIR_CACHE_XML')) { |
| 2382 | - define('_DIR_CACHE_XML', _DIR_CACHE . "xml/"); |
|
| 2380 | + define('_DIR_CACHE_XML', _DIR_CACHE."xml/"); |
|
| 2383 | 2381 | } |
| 2384 | 2382 | if (!defined('_DIR_SKELS')) { |
| 2385 | - define('_DIR_SKELS', _DIR_CACHE . "skel/"); |
|
| 2383 | + define('_DIR_SKELS', _DIR_CACHE."skel/"); |
|
| 2386 | 2384 | } |
| 2387 | 2385 | if (!defined('_DIR_AIDE')) { |
| 2388 | - define('_DIR_AIDE', _DIR_CACHE . "aide/"); |
|
| 2386 | + define('_DIR_AIDE', _DIR_CACHE."aide/"); |
|
| 2389 | 2387 | } |
| 2390 | 2388 | if (!defined('_DIR_TMP')) { |
| 2391 | 2389 | define('_DIR_TMP', $ti); |
@@ -2415,27 +2413,27 @@ discard block |
||
| 2415 | 2413 | // Declaration des fichiers |
| 2416 | 2414 | |
| 2417 | 2415 | if (!defined('_CACHE_PLUGINS_PATH')) { |
| 2418 | - define('_CACHE_PLUGINS_PATH', _DIR_CACHE . "charger_plugins_chemins.php"); |
|
| 2416 | + define('_CACHE_PLUGINS_PATH', _DIR_CACHE."charger_plugins_chemins.php"); |
|
| 2419 | 2417 | } |
| 2420 | 2418 | if (!defined('_CACHE_PLUGINS_OPT')) { |
| 2421 | - define('_CACHE_PLUGINS_OPT', _DIR_CACHE . "charger_plugins_options.php"); |
|
| 2419 | + define('_CACHE_PLUGINS_OPT', _DIR_CACHE."charger_plugins_options.php"); |
|
| 2422 | 2420 | } |
| 2423 | 2421 | if (!defined('_CACHE_PLUGINS_FCT')) { |
| 2424 | - define('_CACHE_PLUGINS_FCT', _DIR_CACHE . "charger_plugins_fonctions.php"); |
|
| 2422 | + define('_CACHE_PLUGINS_FCT', _DIR_CACHE."charger_plugins_fonctions.php"); |
|
| 2425 | 2423 | } |
| 2426 | 2424 | if (!defined('_CACHE_PIPELINES')) { |
| 2427 | - define('_CACHE_PIPELINES', _DIR_CACHE . "charger_pipelines.php"); |
|
| 2425 | + define('_CACHE_PIPELINES', _DIR_CACHE."charger_pipelines.php"); |
|
| 2428 | 2426 | } |
| 2429 | 2427 | if (!defined('_CACHE_CHEMIN')) { |
| 2430 | - define('_CACHE_CHEMIN', _DIR_CACHE . "chemin.txt"); |
|
| 2428 | + define('_CACHE_CHEMIN', _DIR_CACHE."chemin.txt"); |
|
| 2431 | 2429 | } |
| 2432 | 2430 | |
| 2433 | 2431 | # attention .php obligatoire pour ecrire_fichier_securise |
| 2434 | 2432 | if (!defined('_FILE_META')) { |
| 2435 | - define('_FILE_META', $ti . 'meta_cache.php'); |
|
| 2433 | + define('_FILE_META', $ti.'meta_cache.php'); |
|
| 2436 | 2434 | } |
| 2437 | 2435 | if (!defined('_DIR_LOG')) { |
| 2438 | - define('_DIR_LOG', _DIR_TMP . 'log/'); |
|
| 2436 | + define('_DIR_LOG', _DIR_TMP.'log/'); |
|
| 2439 | 2437 | } |
| 2440 | 2438 | if (!defined('_FILE_LOG')) { |
| 2441 | 2439 | define('_FILE_LOG', 'spip'); |
@@ -2451,8 +2449,8 @@ discard block |
||
| 2451 | 2449 | } |
| 2452 | 2450 | if (!defined('_FILE_CONNECT')) { |
| 2453 | 2451 | define('_FILE_CONNECT', |
| 2454 | - (@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f |
|
| 2455 | - : (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f |
|
| 2452 | + (@is_readable($f = _DIR_CONNECT._FILE_CONNECT_INS.'.php') ? $f |
|
| 2453 | + : (@is_readable($f = _DIR_RESTREINT.'inc_connect.php') ? $f |
|
| 2456 | 2454 | : false))); |
| 2457 | 2455 | } |
| 2458 | 2456 | |
@@ -2462,7 +2460,7 @@ discard block |
||
| 2462 | 2460 | } |
| 2463 | 2461 | if (!defined('_FILE_CHMOD')) { |
| 2464 | 2462 | define('_FILE_CHMOD', |
| 2465 | - (@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f |
|
| 2463 | + (@is_readable($f = _DIR_CHMOD._FILE_CHMOD_INS.'.php') ? $f |
|
| 2466 | 2464 | : false)); |
| 2467 | 2465 | } |
| 2468 | 2466 | |
@@ -2474,10 +2472,10 @@ discard block |
||
| 2474 | 2472 | define('_FILE_TMP_SUFFIX', '.tmp.php'); |
| 2475 | 2473 | } |
| 2476 | 2474 | if (!defined('_FILE_CONNECT_TMP')) { |
| 2477 | - define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX); |
|
| 2475 | + define('_FILE_CONNECT_TMP', _DIR_CONNECT._FILE_CONNECT_INS._FILE_TMP_SUFFIX); |
|
| 2478 | 2476 | } |
| 2479 | 2477 | if (!defined('_FILE_CHMOD_TMP')) { |
| 2480 | - define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX); |
|
| 2478 | + define('_FILE_CHMOD_TMP', _DIR_CHMOD._FILE_CHMOD_INS._FILE_TMP_SUFFIX); |
|
| 2481 | 2479 | } |
| 2482 | 2480 | |
| 2483 | 2481 | // Definition des droits d'acces en ecriture |
@@ -2495,13 +2493,13 @@ discard block |
||
| 2495 | 2493 | define('_DEFAULT_CHARSET', 'utf-8'); |
| 2496 | 2494 | } |
| 2497 | 2495 | if (!defined('_ROOT_PLUGINS')) { |
| 2498 | - define('_ROOT_PLUGINS', _ROOT_RACINE . "plugins/"); |
|
| 2496 | + define('_ROOT_PLUGINS', _ROOT_RACINE."plugins/"); |
|
| 2499 | 2497 | } |
| 2500 | 2498 | if (!defined('_ROOT_PLUGINS_DIST')) { |
| 2501 | - define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . "plugins-dist/"); |
|
| 2499 | + define('_ROOT_PLUGINS_DIST', _ROOT_RACINE."plugins-dist/"); |
|
| 2502 | 2500 | } |
| 2503 | 2501 | if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) { |
| 2504 | - define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL)); |
|
| 2502 | + define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE.str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL)); |
|
| 2505 | 2503 | } |
| 2506 | 2504 | |
| 2507 | 2505 | // La taille des Log |
@@ -2538,7 +2536,7 @@ discard block |
||
| 2538 | 2536 | // (non surchargeable en l'etat ; attention si on utilise include_spip() |
| 2539 | 2537 | // pour le rendre surchargeable, on va provoquer un reecriture |
| 2540 | 2538 | // systematique du noyau ou une baisse de perfs => a etudier) |
| 2541 | - include_once _ROOT_RESTREINT . 'inc/flock.php'; |
|
| 2539 | + include_once _ROOT_RESTREINT.'inc/flock.php'; |
|
| 2542 | 2540 | |
| 2543 | 2541 | // charger tout de suite le path et son cache |
| 2544 | 2542 | load_path_cache(); |
@@ -2585,7 +2583,7 @@ discard block |
||
| 2585 | 2583 | if (!empty($_SERVER['QUERY_STRING']) |
| 2586 | 2584 | and !strpos($_SERVER['REQUEST_URI'], '?') |
| 2587 | 2585 | ) { |
| 2588 | - $GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; |
|
| 2586 | + $GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; |
|
| 2589 | 2587 | } |
| 2590 | 2588 | } |
| 2591 | 2589 | |
@@ -2621,7 +2619,7 @@ discard block |
||
| 2621 | 2619 | |
| 2622 | 2620 | if (isset($GLOBALS['meta']['adresse_site'])) { |
| 2623 | 2621 | $uri_ref = parse_url($GLOBALS['meta']['adresse_site']); |
| 2624 | - $uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '') . '/'; |
|
| 2622 | + $uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '').'/'; |
|
| 2625 | 2623 | } else { |
| 2626 | 2624 | $uri_ref = ""; |
| 2627 | 2625 | } |
@@ -2709,7 +2707,7 @@ discard block |
||
| 2709 | 2707 | } |
| 2710 | 2708 | if (!defined('_CACHE_RUBRIQUES')) { |
| 2711 | 2709 | /** Fichier cache pour le navigateur de rubrique du bandeau */ |
| 2712 | - define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt'); |
|
| 2710 | + define('_CACHE_RUBRIQUES', _DIR_TMP.'menu-rubriques-cache.txt'); |
|
| 2713 | 2711 | } |
| 2714 | 2712 | if (!defined('_CACHE_RUBRIQUES_MAX')) { |
| 2715 | 2713 | /** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */ |
@@ -2808,7 +2806,7 @@ discard block |
||
| 2808 | 2806 | $memory *= 1024; |
| 2809 | 2807 | } |
| 2810 | 2808 | if ($memory < _MEMORY_LIMIT_MIN * 1024 * 1024) { |
| 2811 | - @ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN . 'M'); |
|
| 2809 | + @ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN.'M'); |
|
| 2812 | 2810 | if (trim(ini_get('memory_limit')) != $m) { |
| 2813 | 2811 | if (!defined('_INTERDIRE_COMPACTE_HEAD_ECRIRE')) { |
| 2814 | 2812 | define('_INTERDIRE_COMPACTE_HEAD_ECRIRE', true); |
@@ -2958,7 +2956,7 @@ discard block |
||
| 2958 | 2956 | } |
| 2959 | 2957 | if (isset($GLOBALS['visiteur_session']['nom'])) { |
| 2960 | 2958 | spip_log($GLOBALS['visiteur_session']['nom'] |
| 2961 | - . " " . _VAR_MODE); |
|
| 2959 | + . " "._VAR_MODE); |
|
| 2962 | 2960 | } |
| 2963 | 2961 | } // pas autorise ? |
| 2964 | 2962 | else { |
@@ -2971,7 +2969,7 @@ discard block |
||
| 2971 | 2969 | if (strpos($self, 'page=login') === false) { |
| 2972 | 2970 | include_spip('inc/headers'); |
| 2973 | 2971 | $redirect = parametre_url(self('&', true), 'var_mode', $_GET['var_mode'], '&'); |
| 2974 | - redirige_par_entete(generer_url_public('login','url=' . rawurlencode($redirect), true)); |
|
| 2972 | + redirige_par_entete(generer_url_public('login', 'url='.rawurlencode($redirect), true)); |
|
| 2975 | 2973 | } |
| 2976 | 2974 | } |
| 2977 | 2975 | // sinon tant pis |
@@ -3015,10 +3013,10 @@ discard block |
||
| 3015 | 3013 | // mais on risque de perturber des plugins en initialisant trop tot |
| 3016 | 3014 | // certaines constantes |
| 3017 | 3015 | @spip_initialisation_core( |
| 3018 | - (_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES), |
|
| 3019 | - (_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES), |
|
| 3020 | - (_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 3021 | - (_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 3016 | + (_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES), |
|
| 3017 | + (_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES), |
|
| 3018 | + (_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 3019 | + (_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 3022 | 3020 | ); |
| 3023 | 3021 | |
| 3024 | 3022 | // Demarrer une session NON AUTHENTIFIEE si on donne son nom |
@@ -3051,7 +3049,7 @@ discard block |
||
| 3051 | 3049 | } |
| 3052 | 3050 | |
| 3053 | 3051 | $h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']); |
| 3054 | - if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) { |
|
| 3052 | + if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) { |
|
| 3055 | 3053 | |
| 3056 | 3054 | $session = charger_fonction('session', 'inc'); |
| 3057 | 3055 | if ($session()) { |
@@ -3131,7 +3129,7 @@ discard block |
||
| 3131 | 3129 | $s = pipeline('definir_session', |
| 3132 | 3130 | $GLOBALS['visiteur_session'] |
| 3133 | 3131 | ? serialize($GLOBALS['visiteur_session']) |
| 3134 | - . '_' . @$_COOKIE['spip_session'] |
|
| 3132 | + . '_'.@$_COOKIE['spip_session'] |
|
| 3135 | 3133 | : '' |
| 3136 | 3134 | ); |
| 3137 | 3135 | $session = $s ? substr(md5($s), 0, 8) : ''; |
@@ -3287,12 +3285,12 @@ discard block |
||
| 3287 | 3285 | $GLOBALS['_INC_PUBLIC']++; |
| 3288 | 3286 | |
| 3289 | 3287 | // fix #4235 |
| 3290 | - $cache_utilise_session_appelant = (isset($GLOBALS['cache_utilise_session']) ? $GLOBALS['cache_utilise_session'] : null); |
|
| 3288 | + $cache_utilise_session_appelant = (isset($GLOBALS['cache_utilise_session']) ? $GLOBALS['cache_utilise_session'] : null); |
|
| 3291 | 3289 | |
| 3292 | 3290 | |
| 3293 | 3291 | foreach (is_array($fond) ? $fond : array($fond) as $f) { |
| 3294 | 3292 | |
| 3295 | - unset($GLOBALS['cache_utilise_session']); // fix #4235 |
|
| 3293 | + unset($GLOBALS['cache_utilise_session']); // fix #4235 |
|
| 3296 | 3294 | |
| 3297 | 3295 | $page = evaluer_fond($f, $contexte, $connect); |
| 3298 | 3296 | if ($page === '') { |
@@ -3331,7 +3329,7 @@ discard block |
||
| 3331 | 3329 | } |
| 3332 | 3330 | |
| 3333 | 3331 | // contamination de la session appelante, pour les inclusions statiques |
| 3334 | - if (isset($page['invalideurs']['session'])){ |
|
| 3332 | + if (isset($page['invalideurs']['session'])) { |
|
| 3335 | 3333 | $cache_utilise_session_appelant = $page['invalideurs']['session']; |
| 3336 | 3334 | } |
| 3337 | 3335 | } |
@@ -3377,7 +3375,7 @@ discard block |
||
| 3377 | 3375 | * @return array|string |
| 3378 | 3376 | */ |
| 3379 | 3377 | function trouver_fond($nom, $dir = '', $pathinfo = false) { |
| 3380 | - $f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : ''); |
|
| 3378 | + $f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : ''); |
|
| 3381 | 3379 | if (!$pathinfo) { |
| 3382 | 3380 | return $f; |
| 3383 | 3381 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | if ($aff_racine) { |
| 56 | 56 | $info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id="); |
| 57 | - $idom3 = $idom . "_selection"; |
|
| 57 | + $idom3 = $idom."_selection"; |
|
| 58 | 58 | |
| 59 | 59 | $onClick = "jQuery(this).parent().addClass('on');jQuery('#choix_parent_principal .on').removeClass('on'); aff_selection(0, '$idom3', '$info', event);return false;"; |
| 60 | 60 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | textebrut(_T('info_racine_site')))), |
| 64 | 64 | "\n\r", " "); |
| 65 | 65 | |
| 66 | - $js_func = $do . '_selection_titre'; |
|
| 66 | + $js_func = $do.'_selection_titre'; |
|
| 67 | 67 | $ondbClick = "$js_func('$ondbClick',0,'selection_rubrique','id_parent');"; |
| 68 | 68 | |
| 69 | 69 | $aff_racine = "<div class='petit-item petite-racine item'>" |
@@ -104,12 +104,12 @@ discard block |
||
| 104 | 104 | **/ |
| 105 | 105 | function construire_selectionner_hierarchie($idom, $liste, $racine, $url, $name, $url_init = '') { |
| 106 | 106 | |
| 107 | - $idom1 = $idom . "_champ_recherche"; |
|
| 108 | - $idom2 = $idom . "_principal"; |
|
| 109 | - $idom3 = $idom . "_selection"; |
|
| 110 | - $idom4 = $idom . "_col_1"; |
|
| 111 | - $idom5 = 'img_' . $idom4; |
|
| 112 | - $idom6 = $idom . "_fonc"; |
|
| 107 | + $idom1 = $idom."_champ_recherche"; |
|
| 108 | + $idom2 = $idom."_principal"; |
|
| 109 | + $idom3 = $idom."_selection"; |
|
| 110 | + $idom4 = $idom."_col_1"; |
|
| 111 | + $idom5 = 'img_'.$idom4; |
|
| 112 | + $idom6 = $idom."_fonc"; |
|
| 113 | 113 | |
| 114 | 114 | return "<div id='$idom'>" |
| 115 | 115 | . "<a id='$idom6' style='visibility: hidden;'" |
@@ -117,9 +117,9 @@ discard block |
||
| 117 | 117 | . "></a>" |
| 118 | 118 | . "<div class='recherche_rapide_parent'>" |
| 119 | 119 | . http_img_pack("loader.svg", "", |
| 120 | - "class='loader' style='visibility: hidden;float:" . $GLOBALS['spip_lang_right'] . "' id='$idom5'") |
|
| 120 | + "class='loader' style='visibility: hidden;float:".$GLOBALS['spip_lang_right']."' id='$idom5'") |
|
| 121 | 121 | . "" |
| 122 | - . "<input style='width: 10em;float:" . $GLOBALS['spip_lang_right'] . ";' type='search' class='text search' id='$idom1' placeholder='" . _T('info_rechercher') . "'" |
|
| 122 | + . "<input style='width: 10em;float:".$GLOBALS['spip_lang_right'].";' type='search' class='text search' id='$idom1' placeholder='"._T('info_rechercher')."'" |
|
| 123 | 123 | // eliminer Return car il provoque la soumission (balise unique) |
| 124 | 124 | // et eliminer Tab pour la navigation au clavier |
| 125 | 125 | // ce serait encore mieux de ne le faire que s'il y a encore plusieurs |
@@ -166,8 +166,8 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | $liste = $id_rubrique; |
| 168 | 168 | $id_rubrique = intval($id_rubrique); |
| 169 | - while ($id_rubrique = sql_getfetsel("id_parent", "spip_rubriques", "id_rubrique = " . $id_rubrique)) { |
|
| 170 | - $liste = $id_rubrique . ",$liste"; |
|
| 169 | + while ($id_rubrique = sql_getfetsel("id_parent", "spip_rubriques", "id_rubrique = ".$id_rubrique)) { |
|
| 170 | + $liste = $id_rubrique.",$liste"; |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | return explode(',', "0,$liste"); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | { |
| 147 | 147 | $r = "<option$selected value='$root' class='$class' style='$style'>$espace" |
| 148 | 148 | . $data[$root] |
| 149 | - . '</option>' . "\n"; |
|
| 149 | + . '</option>'."\n"; |
|
| 150 | 150 | } else { |
| 151 | 151 | $r = ''; |
| 152 | 152 | } |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | // et voila le travail |
| 169 | - return $r . $sous; |
|
| 169 | + return $r.$sous; |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | /** |
@@ -208,11 +208,11 @@ discard block |
||
| 208 | 208 | while ($r = sql_fetch($q)) { |
| 209 | 209 | if (autoriser('voir', 'rubrique', $r['id_rubrique'])) { |
| 210 | 210 | // titre largeur maxi a 50 |
| 211 | - $titre = couper(supprimer_tags(typo($r['titre'])) . " ", 50); |
|
| 211 | + $titre = couper(supprimer_tags(typo($r['titre']))." ", 50); |
|
| 212 | 212 | if ($GLOBALS['meta']['multi_rubriques'] == 'oui' |
| 213 | 213 | and ($r['langue_choisie'] == "oui" or $r['id_parent'] == 0) |
| 214 | 214 | ) { |
| 215 | - $titre .= ' [' . traduire_nom_langue($r['lang']) . ']'; |
|
| 215 | + $titre .= ' ['.traduire_nom_langue($r['lang']).']'; |
|
| 216 | 216 | } |
| 217 | 217 | $data[$r['id_rubrique']] = $titre; |
| 218 | 218 | $enfants[$r['id_parent']][] = $r['id_rubrique']; |
@@ -238,9 +238,9 @@ discard block |
||
| 238 | 238 | $att = " id='id_parent' name='id_parent'\nclass='selecteur_parent verdana1'"; |
| 239 | 239 | |
| 240 | 240 | if (preg_match(',^<option[^<>]*value=.(\d*).[^<>]*>([^<]*)</option>$,', $opt, $r)) { |
| 241 | - $r = "<input$att type='hidden' value='" . $r[1] . "' />" . $r[2]; |
|
| 241 | + $r = "<input$att type='hidden' value='".$r[1]."' />".$r[2]; |
|
| 242 | 242 | } else { |
| 243 | - $r = "<select" . $att . " size='1'>\n$opt</select>\n"; |
|
| 243 | + $r = "<select".$att." size='1'>\n$opt</select>\n"; |
|
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | # message pour neuneus (a supprimer ?) |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | function selecteur_rubrique_ajax($id_rubrique, $type, $restreint, $idem = 0, $do = 'aff') { |
| 283 | 283 | |
| 284 | 284 | if ($id_rubrique) { |
| 285 | - $titre = sql_getfetsel("titre", "spip_rubriques", "id_rubrique=" . intval($id_rubrique)); |
|
| 285 | + $titre = sql_getfetsel("titre", "spip_rubriques", "id_rubrique=".intval($id_rubrique)); |
|
| 286 | 286 | } else { |
| 287 | 287 | if ($type == 'auteur') { |
| 288 | 288 | $titre = ' '; |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | } |
| 293 | 293 | |
| 294 | 294 | $titre = str_replace('&', '&', entites_html(textebrut(typo($titre)))); |
| 295 | - $init = " disabled='disabled' type='text' value=\"" . $titre . "\"\nstyle='width:300px;'"; |
|
| 295 | + $init = " disabled='disabled' type='text' value=\"".$titre."\"\nstyle='width:300px;'"; |
|
| 296 | 296 | |
| 297 | 297 | $url = generer_url_ecrire('selectionner', "id=$id_rubrique&type=$type&do=$do" |
| 298 | 298 | . (!$idem ? '' : "&exclus=$idem") |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | . " jQuery(this).toggleClass('toggled'); " |
| 342 | 342 | . "return charger_node_url_si_vide('" |
| 343 | 343 | . $url |
| 344 | - . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='" . attribut_html(_T('titre_image_selecteur')) . "'>" |
|
| 344 | + . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='".attribut_html(_T('titre_image_selecteur'))."'>" |
|
| 345 | 345 | . $img_icone |
| 346 | 346 | . "</a><img src='" |
| 347 | 347 | . chemin_image('loader.svg') |
@@ -145,8 +145,8 @@ discard block |
||
| 145 | 145 | $message_alerte_ouvrir = chercher_filtre('message_alerte_ouvrir'); |
| 146 | 146 | $message_alerte_fermer = chercher_filtre('message_alerte_fermer'); |
| 147 | 147 | $message = |
| 148 | - $message_alerte_ouvrir($titre, $class, $role, $id) . |
|
| 149 | - $texte . |
|
| 148 | + $message_alerte_ouvrir($titre, $class, $role, $id). |
|
| 149 | + $texte. |
|
| 150 | 150 | $message_alerte_fermer(); |
| 151 | 151 | |
| 152 | 152 | return $message; |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | ]; |
| 187 | 187 | $type = array_intersect(explode(' ', $class), $types); |
| 188 | 188 | $type = reset($type) ?: 'notice'; |
| 189 | - $class = trim(str_replace($types, '', $class) . " $type"); |
|
| 189 | + $class = trim(str_replace($types, '', $class)." $type"); |
|
| 190 | 190 | |
| 191 | 191 | // Role |
| 192 | 192 | $role = $role ?: 'alert'; |
@@ -217,8 +217,8 @@ discard block |
||
| 217 | 217 | $attr_data = ($type ? "data-$role=\"$type\"" : ''); |
| 218 | 218 | |
| 219 | 219 | $message = |
| 220 | - "<div class=\"$class_alerte\" role=\"$role\" $attr_id $attr_data>" . |
|
| 221 | - $titre . |
|
| 220 | + "<div class=\"$class_alerte\" role=\"$role\" $attr_id $attr_data>". |
|
| 221 | + $titre. |
|
| 222 | 222 | "<div class=\"$class_texte\">"; |
| 223 | 223 | |
| 224 | 224 | return $message; |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | $titre = "<h3>$titre</h3>"; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - return '<div class="' . $class . ($id ? "\" id=\"$id" : '') . '">' |
|
| 138 | + return '<div class="'.$class.($id ? "\" id=\"$id" : '').'">' |
|
| 139 | 139 | . ($titre ? "<div class=\"$head_class\">$titre<!--/hd--></div>" : '') |
| 140 | 140 | . '<div class="box__body clearfix">'; |
| 141 | 141 | } |
@@ -204,8 +204,8 @@ discard block |
||
| 204 | 204 | $hsl = _couleur_hex_to_hsl($couleur); |
| 205 | 205 | $hsl = [ |
| 206 | 206 | 'h' => round($hsl['h'] * 360), |
| 207 | - 's' => round($hsl['s'] * 100) . '%', |
|
| 208 | - 'l' => round($hsl['l'] * 100) . '%' |
|
| 207 | + 's' => round($hsl['s'] * 100).'%', |
|
| 208 | + 'l' => round($hsl['l'] * 100).'%' |
|
| 209 | 209 | ]; |
| 210 | 210 | if ($format === null) { |
| 211 | 211 | return "hsl({$hsl['h']}, {$hsl['s']}, {$hsl['l']})"; |
@@ -384,11 +384,11 @@ discard block |
||
| 384 | 384 | $process = 'AUTO' |
| 385 | 385 | ) { |
| 386 | 386 | // PHP 7+ type hint |
| 387 | - $img = (string)$img; |
|
| 388 | - $taille_x = (int)$taille_x; |
|
| 389 | - $taille_y = (int)$taille_y; |
|
| 390 | - $force = (bool)$force; |
|
| 391 | - $process = (string)$process; |
|
| 387 | + $img = (string) $img; |
|
| 388 | + $taille_x = (int) $taille_x; |
|
| 389 | + $taille_y = (int) $taille_y; |
|
| 390 | + $force = (bool) $force; |
|
| 391 | + $process = (string) $process; |
|
| 392 | 392 | |
| 393 | 393 | if (!$img) { |
| 394 | 394 | return ''; |
@@ -465,11 +465,11 @@ discard block |
||
| 465 | 465 | $process = 'AUTO' |
| 466 | 466 | ) { |
| 467 | 467 | // PHP 7+ type hint |
| 468 | - $img = (string)$img; |
|
| 469 | - $taille = (int)$taille; |
|
| 470 | - $taille_y = (int)$taille_y; |
|
| 471 | - $force = (bool)$force; |
|
| 472 | - $process = (string)$process; |
|
| 468 | + $img = (string) $img; |
|
| 469 | + $taille = (int) $taille; |
|
| 470 | + $taille_y = (int) $taille_y; |
|
| 471 | + $force = (bool) $force; |
|
| 472 | + $process = (string) $process; |
|
| 473 | 473 | |
| 474 | 474 | // Determiner la taille x,y maxi |
| 475 | 475 | // prendre le reglage de previsu par defaut |
@@ -505,14 +505,14 @@ discard block |
||
| 505 | 505 | * |
| 506 | 506 | **/ |
| 507 | 507 | |
| 508 | -function image_recadre_avec_fallback ( |
|
| 508 | +function image_recadre_avec_fallback( |
|
| 509 | 509 | $im, |
| 510 | 510 | $width, |
| 511 | - $height='-', |
|
| 511 | + $height = '-', |
|
| 512 | 512 | $position = 'focus', |
| 513 | 513 | $background_color = 'white') { |
| 514 | 514 | |
| 515 | - if (function_exists("image_recadre") && lire_meta("image_process")=="gd2") |
|
| 515 | + if (function_exists("image_recadre") && lire_meta("image_process") == "gd2") |
|
| 516 | 516 | return image_reduire(image_recadre($im, $width.":".$height, "-", $position, $background_color), $width, $height); |
| 517 | 517 | else |
| 518 | 518 | return image_passe_partout($im, $width, $height); |
@@ -536,9 +536,9 @@ discard block |
||
| 536 | 536 | **/ |
| 537 | 537 | function image_reduire_par($img, $val = 1, $force = false) { |
| 538 | 538 | // PHP 7+ type hint |
| 539 | - $img = (string)$img; |
|
| 540 | - $val = (int)$val; |
|
| 541 | - $force = (bool)$force; |
|
| 539 | + $img = (string) $img; |
|
| 540 | + $val = (int) $val; |
|
| 541 | + $force = (bool) $force; |
|
| 542 | 542 | |
| 543 | 543 | list($hauteur, $largeur) = taille_image($img); |
| 544 | 544 | |
@@ -70,24 +70,23 @@ discard block |
||
| 70 | 70 | list($fid, $dir, $nom, $format) = $logo; |
| 71 | 71 | $logo = image_recadre_avec_fallback("<img src='$fid' alt='' />", 70, 70); |
| 72 | 72 | if ($logo) { |
| 73 | - $logo = wrap(inserer_attribut($logo, 'class', 'logo'),'<span class="logo-carre">'); |
|
| 73 | + $logo = wrap(inserer_attribut($logo, 'class', 'logo'), '<span class="logo-carre">'); |
|
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - $lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? '' : |
|
| 79 | - http_img_pack( |
|
| 78 | + $lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? '' : http_img_pack( |
|
| 80 | 79 | 'auteur-0minirezo-16.png', |
| 81 | 80 | '', |
| 82 | 81 | " width='16' height='16'", |
| 83 | 82 | _T('image_administrer_rubrique') |
| 84 | - )) . |
|
| 85 | - " <a dir='$lang_dir'" . |
|
| 86 | - ($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='" . $row['lang'] . "'" : '') . |
|
| 87 | - " href='" . |
|
| 88 | - generer_url_entite($id_rubrique, 'rubrique') . |
|
| 89 | - "'><span class='titre'>" . |
|
| 90 | - $rang . $titre |
|
| 83 | + )). |
|
| 84 | + " <a dir='$lang_dir'". |
|
| 85 | + ($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='".$row['lang']."'" : ''). |
|
| 86 | + " href='". |
|
| 87 | + generer_url_entite($id_rubrique, 'rubrique'). |
|
| 88 | + "'><span class='titre'>". |
|
| 89 | + $rang.$titre |
|
| 91 | 90 | . '</span>' |
| 92 | 91 | . (is_string($logo) ? $logo : '') |
| 93 | 92 | . '</a>'; |
@@ -97,8 +96,8 @@ discard block |
||
| 97 | 96 | ; |
| 98 | 97 | |
| 99 | 98 | $res[] = |
| 100 | - debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre) . |
|
| 101 | - $les_sous_enfants . |
|
| 99 | + debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre). |
|
| 100 | + $les_sous_enfants. |
|
| 102 | 101 | fin_cadre_sous_rub(true); |
| 103 | 102 | } |
| 104 | 103 | } |
@@ -129,10 +128,10 @@ discard block |
||
| 129 | 128 | * Si > 500 on affiche une pagination |
| 130 | 129 | */ |
| 131 | 130 | if ($nb > $limite) { |
| 132 | - $debut = _request('debut_rubrique' . $collection2) ? _request('debut_rubrique' . $collection2) : $debut; |
|
| 131 | + $debut = _request('debut_rubrique'.$collection2) ? _request('debut_rubrique'.$collection2) : $debut; |
|
| 133 | 132 | $pagination = chercher_filtre('pagination'); |
| 134 | - $pagination = '<p class="pagination">' . $pagination($nb, '_rubrique' . $collection2, $debut, $limite, true, |
|
| 135 | - 'prive') . '</p>'; |
|
| 133 | + $pagination = '<p class="pagination">'.$pagination($nb, '_rubrique'.$collection2, $debut, $limite, true, |
|
| 134 | + 'prive').'</p>'; |
|
| 136 | 135 | $limite = $debut + $limite; |
| 137 | 136 | } |
| 138 | 137 | |
@@ -159,14 +158,14 @@ discard block |
||
| 159 | 158 | changer_typo($row['lang']); |
| 160 | 159 | $lang_dir = lang_dir($row['lang']); |
| 161 | 160 | if (autoriser('voir', 'rubrique', $id_rubrique2)) { |
| 162 | - $retour .= "\n<li class='item' dir='$lang_dir'><a href='" . generer_url_entite( |
|
| 161 | + $retour .= "\n<li class='item' dir='$lang_dir'><a href='".generer_url_entite( |
|
| 163 | 162 | $id_rubrique2, |
| 164 | 163 | 'rubrique' |
| 165 | - ) . "'>" . $rang2 . $titre2 . "</a></li>\n"; |
|
| 164 | + )."'>".$rang2.$titre2."</a></li>\n"; |
|
| 166 | 165 | } |
| 167 | 166 | } |
| 168 | 167 | |
| 169 | - $retour = $pagination . $retour . $pagination; |
|
| 168 | + $retour = $pagination.$retour.$pagination; |
|
| 170 | 169 | |
| 171 | 170 | if (!$retour) { |
| 172 | 171 | return ''; |
@@ -175,7 +174,7 @@ discard block |
||
| 175 | 174 | return debut_block_depliable($debut > 0 ? true : false, "enfants$collection2") |
| 176 | 175 | . "\n<ul class='liste-items sous-sous-rub'>\n" |
| 177 | 176 | . $retour |
| 178 | - . "</ul>\n" . fin_block() . "\n\n"; |
|
| 177 | + . "</ul>\n".fin_block()."\n\n"; |
|
| 179 | 178 | } |
| 180 | 179 | |
| 181 | 180 | /** |
@@ -197,10 +196,10 @@ discard block |
||
| 197 | 196 | $nb = sql_countsel('spip_rubriques', 'id_parent='.intval($id_rubrique)); |
| 198 | 197 | |
| 199 | 198 | if ($nb > $limite) { |
| 200 | - $debut = _request('debut_rubrique' . $id_rubrique) ? _request('debut_rubrique' . $id_rubrique) : $debut; |
|
| 199 | + $debut = _request('debut_rubrique'.$id_rubrique) ? _request('debut_rubrique'.$id_rubrique) : $debut; |
|
| 201 | 200 | $pagination = chercher_filtre('pagination'); |
| 202 | - $pagination = '<br class="nettoyeur"><p class="pagination">' . |
|
| 203 | - $pagination($nb, '_rubrique' . $id_rubrique, $debut, $limite, true, 'prive') . |
|
| 201 | + $pagination = '<br class="nettoyeur"><p class="pagination">'. |
|
| 202 | + $pagination($nb, '_rubrique'.$id_rubrique, $debut, $limite, true, 'prive'). |
|
| 204 | 203 | '</p>'; |
| 205 | 204 | } |
| 206 | 205 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | // Typographie |
| 41 | 41 | $vars->add('--spip-font-size', $Pile[0]['font-size']); |
| 42 | - $vars->add('--spip-line-height', $Pile[0]['line-height']); |
|
| 42 | + $vars->add('--spip-line-height', $Pile[0]['line-height']); |
|
| 43 | 43 | $vars->add('--spip-text-indent', $Pile[0]['text-indent']); |
| 44 | 44 | $vars->add('--spip-font-family', $Pile[0]['font-family']); |
| 45 | 45 | |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | // Espacements pour le rythme vertical et les gouttières |
| 51 | 51 | // Basés sur la hauteur d'une ligne de texte à la racine du document |
| 52 | - $vars->add('--spip-spacing-y', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4) . 'rem'); |
|
| 53 | - $vars->add('--spip-spacing-x', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4) . 'rem'); |
|
| 52 | + $vars->add('--spip-spacing-y', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4).'rem'); |
|
| 53 | + $vars->add('--spip-spacing-x', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4).'rem'); |
|
| 54 | 54 | $vars->add('--spip-margin-bottom', $Pile[0]['margin-bottom']); // À déprécier |
| 55 | 55 | |
| 56 | 56 | // Bordures |
@@ -60,20 +60,20 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | // Ombres portées |
| 62 | 62 | $shadow_mini = |
| 63 | - '0 0.05em 0.1em hsla(0, 0%, 0%, 0.33),' . |
|
| 64 | - '0 0.1em 0.15em hsla(0, 0%, 0%, 0.05),' . |
|
| 63 | + '0 0.05em 0.1em hsla(0, 0%, 0%, 0.33),'. |
|
| 64 | + '0 0.1em 0.15em hsla(0, 0%, 0%, 0.05),'. |
|
| 65 | 65 | '0 0.1em 0.25em hsla(0, 0%, 0%, 0.05)'; |
| 66 | 66 | $shadow = |
| 67 | - '0 0.05em 0.15em hsla(0, 0%, 0%, 0.33),' . |
|
| 68 | - '0 0.1em 0.25em hsla(0, 0%, 0%, 0.05),' . |
|
| 67 | + '0 0.05em 0.15em hsla(0, 0%, 0%, 0.33),'. |
|
| 68 | + '0 0.1em 0.25em hsla(0, 0%, 0%, 0.05),'. |
|
| 69 | 69 | '0 0.1em 0.5em hsla(0, 0%, 0%, 0.05)'; |
| 70 | 70 | $shadow_large = |
| 71 | - '0 0.05em 0.15em hsla(0, 0%, 0%, 0.1),' . |
|
| 72 | - '0 0.2em 0.5em hsla(0, 0%, 0%, 0.1),' . |
|
| 71 | + '0 0.05em 0.15em hsla(0, 0%, 0%, 0.1),'. |
|
| 72 | + '0 0.2em 0.5em hsla(0, 0%, 0%, 0.1),'. |
|
| 73 | 73 | '0 0.2em 1em hsla(0, 0%, 0%, 0.075)'; |
| 74 | 74 | $shadow_huge = |
| 75 | - '0 0.1em 0.25em hsla(0, 0%, 0%, 0.1),' . |
|
| 76 | - '0 0.25em 1em hsla(0, 0%, 0%, 0.1),' . |
|
| 75 | + '0 0.1em 0.25em hsla(0, 0%, 0%, 0.1),'. |
|
| 76 | + '0 0.25em 1em hsla(0, 0%, 0%, 0.1),'. |
|
| 77 | 77 | '0 0.5em 2em hsla(0, 0%, 0%, 0.075)'; |
| 78 | 78 | $vars->add('--spip-box-shadow-mini', $shadow_mini); |
| 79 | 79 | $vars->add('--spip-box-shadow-mini-hover', $shadow); |