@@ -53,11 +53,11 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | // si spip_log() dans mes_options, ou repertoire log/ non present, poser dans tmp/ |
| 55 | 55 | if (!defined('_DIR_LOG') or !$test_repertoire[$d]) { |
| 56 | - $logfile = _DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES . $logname . '.log'; |
|
| 56 | + $logfile = _DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES.$logname.'.log'; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | $rotate = 0; |
| 60 | - $pid = '(pid ' . @getmypid() . ')'; |
|
| 60 | + $pid = '(pid '.@getmypid().')'; |
|
| 61 | 61 | |
| 62 | 62 | // accepter spip_log( Array ) |
| 63 | 63 | if (!is_string($message)) { |
@@ -72,10 +72,10 @@ discard block |
||
| 72 | 72 | $fi = substr($fi, strlen(_ROOT_RACINE)); |
| 73 | 73 | } |
| 74 | 74 | $fu = isset($debug[2]['function']) ? $debug[2]['function'] : ''; |
| 75 | - $debugverb = "$fi:L$l:$fu" . '():'; |
|
| 75 | + $debugverb = "$fi:L$l:$fu".'():'; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - $m = date('Y-m-d H:i:s') . ' ' . (isset($GLOBALS['ip']) ? $GLOBALS['ip'] : '') . ' ' . $pid . ' ' |
|
| 78 | + $m = date('Y-m-d H:i:s').' '.(isset($GLOBALS['ip']) ? $GLOBALS['ip'] : '').' '.$pid.' ' |
|
| 79 | 79 | //distinguer les logs prives et publics dans les grep |
| 80 | 80 | . $debugverb |
| 81 | 81 | . (test_espace_prive() ? ':Pri:' : ':Pub:') |
@@ -100,9 +100,9 @@ discard block |
||
| 100 | 100 | $rotate-- > 0 |
| 101 | 101 | and function_exists('spip_unlink') |
| 102 | 102 | ) { |
| 103 | - spip_unlink($logfile . '.' . $rotate); |
|
| 103 | + spip_unlink($logfile.'.'.$rotate); |
|
| 104 | 104 | while ($rotate--) { |
| 105 | - @rename($logfile . ($rotate ? '.' . $rotate : ''), $logfile . '.' . ($rotate + 1)); |
|
| 105 | + @rename($logfile.($rotate ? '.'.$rotate : ''), $logfile.'.'.($rotate + 1)); |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | // mais apres la fonction autoriser() |
| 115 | 115 | if ($f = find_in_path('mes_fonctions.php')) { |
| 116 | 116 | global $dossier_squelettes; |
| 117 | - include_once(_ROOT_CWD . $f); |
|
| 117 | + include_once(_ROOT_CWD.$f); |
|
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | $qui = $GLOBALS['visiteur_session'] ? $GLOBALS['visiteur_session'] : []; |
| 149 | 149 | $qui = array_merge(['statut' => '', 'id_auteur' => 0, 'webmestre' => 'non'], $qui); |
| 150 | 150 | } elseif (is_numeric($qui)) { |
| 151 | - $qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . $qui); |
|
| 151 | + $qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.$qui); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | // Admins restreints, on construit ici (pas generique mais...) |
@@ -158,8 +158,8 @@ discard block |
||
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | spip_log( |
| 161 | - "autoriser $faire $type $id (" . (isset($qui['nom']) ? $qui['nom'] : '') . ') ?', |
|
| 162 | - 'autoriser' . _LOG_DEBUG |
|
| 161 | + "autoriser $faire $type $id (".(isset($qui['nom']) ? $qui['nom'] : '').') ?', |
|
| 162 | + 'autoriser'._LOG_DEBUG |
|
| 163 | 163 | ); |
| 164 | 164 | |
| 165 | 165 | // passer par objet_type pour avoir les alias |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | (isset($GLOBALS['autoriser_exception'][$faire][$type][$id]) and autoriser_exception($faire, $type, $id, 'verifier')) |
| 172 | 172 | or (isset($GLOBALS['autoriser_exception'][$faire][$type]['*']) and autoriser_exception($faire, $type, '*', 'verifier')) |
| 173 | 173 | ) { |
| 174 | - spip_log("autoriser ($faire, $type, $id, " . (isset($qui['nom']) ? $qui['nom'] : '') . ') : OK Exception', 'autoriser' . _LOG_DEBUG); |
|
| 174 | + spip_log("autoriser ($faire, $type, $id, ".(isset($qui['nom']) ? $qui['nom'] : '').') : OK Exception', 'autoriser'._LOG_DEBUG); |
|
| 175 | 175 | return true; |
| 176 | 176 | } |
| 177 | 177 | |
@@ -180,18 +180,18 @@ discard block |
||
| 180 | 180 | // autoriser_faire[_dist], autoriser_defaut[_dist] |
| 181 | 181 | $fonctions = $type |
| 182 | 182 | ? [ |
| 183 | - 'autoriser_' . $type . '_' . $faire, |
|
| 184 | - 'autoriser_' . $type . '_' . $faire . '_dist', |
|
| 185 | - 'autoriser_' . $type, |
|
| 186 | - 'autoriser_' . $type . '_dist', |
|
| 187 | - 'autoriser_' . $faire, |
|
| 188 | - 'autoriser_' . $faire . '_dist', |
|
| 183 | + 'autoriser_'.$type.'_'.$faire, |
|
| 184 | + 'autoriser_'.$type.'_'.$faire.'_dist', |
|
| 185 | + 'autoriser_'.$type, |
|
| 186 | + 'autoriser_'.$type.'_dist', |
|
| 187 | + 'autoriser_'.$faire, |
|
| 188 | + 'autoriser_'.$faire.'_dist', |
|
| 189 | 189 | 'autoriser_defaut', |
| 190 | 190 | 'autoriser_defaut_dist' |
| 191 | 191 | ] |
| 192 | 192 | : [ |
| 193 | - 'autoriser_' . $faire, |
|
| 194 | - 'autoriser_' . $faire . '_dist', |
|
| 193 | + 'autoriser_'.$faire, |
|
| 194 | + 'autoriser_'.$faire.'_dist', |
|
| 195 | 195 | 'autoriser_defaut', |
| 196 | 196 | 'autoriser_defaut_dist' |
| 197 | 197 | ]; |
@@ -204,8 +204,8 @@ discard block |
||
| 204 | 204 | } |
| 205 | 205 | |
| 206 | 206 | spip_log( |
| 207 | - "$f($faire, $type, $id, " . (isset($qui['nom']) ? $qui['nom'] : '') . ') : ' . ($a ? 'OK' : 'niet'), |
|
| 208 | - 'autoriser' . _LOG_DEBUG |
|
| 207 | + "$f($faire, $type, $id, ".(isset($qui['nom']) ? $qui['nom'] : '').') : '.($a ? 'OK' : 'niet'), |
|
| 208 | + 'autoriser'._LOG_DEBUG |
|
| 209 | 209 | ); |
| 210 | 210 | |
| 211 | 211 | return $a; |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | function autoriser_previsualiser_dist($faire, $type, $id, $qui, $opt) { |
| 334 | 334 | |
| 335 | 335 | // Le visiteur a-t-il un statut prevu par la config ? |
| 336 | - if (strpos($GLOBALS['meta']['preview'], ',' . $qui['statut'] . ',') !== false) { |
|
| 336 | + if (strpos($GLOBALS['meta']['preview'], ','.$qui['statut'].',') !== false) { |
|
| 337 | 337 | return test_previsualiser_objet_champ($type, $id, $qui, $opt); |
| 338 | 338 | } |
| 339 | 339 | |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | } // pas de champ passe a la demande => NIET |
| 391 | 391 | $previsu = explode(',', $c['previsu']); |
| 392 | 392 | // regarder si ce statut est autorise pour l'auteur |
| 393 | - if (in_array($opt[$champ] . '/auteur', $previsu)) { |
|
| 393 | + if (in_array($opt[$champ].'/auteur', $previsu)) { |
|
| 394 | 394 | // retrouver l’id_auteur qui a filé un lien de prévisu éventuellement, |
| 395 | 395 | // sinon l’auteur en session |
| 396 | 396 | include_spip('inc/securiser_action'); |
@@ -404,12 +404,12 @@ discard block |
||
| 404 | 404 | |
| 405 | 405 | if (!$id_auteur) { |
| 406 | 406 | return false; |
| 407 | - } elseif (autoriser('previsualiser' . $opt[$champ], $type, '', $id_auteur)) { |
|
| 407 | + } elseif (autoriser('previsualiser'.$opt[$champ], $type, '', $id_auteur)) { |
|
| 408 | 408 | // dans ce cas (admin en general), pas de filtrage sur ce statut |
| 409 | 409 | } elseif ( |
| 410 | 410 | !sql_countsel( |
| 411 | 411 | 'spip_auteurs_liens', |
| 412 | - 'id_auteur=' . intval($id_auteur) . ' AND objet=' . sql_quote($type) . ' AND id_objet=' . intval($id) |
|
| 412 | + 'id_auteur='.intval($id_auteur).' AND objet='.sql_quote($type).' AND id_objet='.intval($id) |
|
| 413 | 413 | ) |
| 414 | 414 | ) { |
| 415 | 415 | return false; |
@@ -452,16 +452,16 @@ discard block |
||
| 452 | 452 | // multilinguisme par secteur et objet rattaché à une rubrique |
| 453 | 453 | $primary = id_table_objet($type); |
| 454 | 454 | if ($table != 'spip_rubriques') { |
| 455 | - $id_rubrique = sql_getfetsel('id_rubrique', "$table", "$primary=" . intval($id)); |
|
| 455 | + $id_rubrique = sql_getfetsel('id_rubrique', "$table", "$primary=".intval($id)); |
|
| 456 | 456 | } else { |
| 457 | 457 | $id_rubrique = $id; |
| 458 | 458 | } |
| 459 | - $id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 459 | + $id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique)); |
|
| 460 | 460 | if (!$id_secteur > 0) { |
| 461 | 461 | $id_secteur = $id_rubrique; |
| 462 | 462 | } |
| 463 | - $langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . intval($id_secteur)); |
|
| 464 | - $langue_objet = sql_getfetsel('lang', "$table", "$primary=" . intval($id)); |
|
| 463 | + $langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique='.intval($id_secteur)); |
|
| 464 | + $langue_objet = sql_getfetsel('lang', "$table", "$primary=".intval($id)); |
|
| 465 | 465 | if ($langue_secteur != $langue_objet) { |
| 466 | 466 | // configuration incohérente, on laisse l'utilisateur corriger la situation |
| 467 | 467 | return true; |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | if ($table != 'spip_rubriques') { // le choix de la langue se fait seulement sur les rubriques |
| 470 | 470 | return false; |
| 471 | 471 | } else { |
| 472 | - $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id)); |
|
| 472 | + $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique='.intval($id)); |
|
| 473 | 473 | if ($id_parent != 0) { |
| 474 | 474 | // sous-rubriques : pas de choix de langue |
| 475 | 475 | return false; |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | |
| 518 | 518 | if (!isset($opt['statut'])) { |
| 519 | 519 | if (isset($desc['field']['statut'])) { |
| 520 | - $statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type) . '=' . intval($id)); |
|
| 520 | + $statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type).'='.intval($id)); |
|
| 521 | 521 | } else { |
| 522 | 522 | $statut = 'publie'; |
| 523 | 523 | } // pas de statut => publie |
@@ -677,11 +677,11 @@ discard block |
||
| 677 | 677 | return false; |
| 678 | 678 | } |
| 679 | 679 | |
| 680 | - if (sql_countsel('spip_rubriques', 'id_parent=' . intval($id))) { |
|
| 680 | + if (sql_countsel('spip_rubriques', 'id_parent='.intval($id))) { |
|
| 681 | 681 | return false; |
| 682 | 682 | } |
| 683 | 683 | |
| 684 | - if (sql_countsel('spip_articles', 'id_rubrique=' . intval($id) . " AND (statut<>'poubelle')")) { |
|
| 684 | + if (sql_countsel('spip_articles', 'id_rubrique='.intval($id)." AND (statut<>'poubelle')")) { |
|
| 685 | 685 | return false; |
| 686 | 686 | } |
| 687 | 687 | |
@@ -713,7 +713,7 @@ discard block |
||
| 713 | 713 | * @return bool true s'il a le droit, false sinon |
| 714 | 714 | **/ |
| 715 | 715 | function autoriser_article_modifier_dist($faire, $type, $id, $qui, $opt) { |
| 716 | - $r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article=' . sql_quote($id)); |
|
| 716 | + $r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article='.sql_quote($id)); |
|
| 717 | 717 | |
| 718 | 718 | return |
| 719 | 719 | $r |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | (!isset($opt['statut']) or $opt['statut'] !== 'publie') |
| 725 | 725 | and in_array($qui['statut'], ['0minirezo', '1comite']) |
| 726 | 726 | and in_array($r['statut'], ['prop', 'prepa', 'poubelle']) |
| 727 | - and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur']) |
|
| 727 | + and auteurs_objet('article', $id, 'id_auteur='.$qui['id_auteur']) |
|
| 728 | 728 | ) |
| 729 | 729 | ); |
| 730 | 730 | } |
@@ -778,7 +778,7 @@ discard block |
||
| 778 | 778 | if (!$id) { |
| 779 | 779 | return false; |
| 780 | 780 | } |
| 781 | - $statut = sql_getfetsel('statut', 'spip_articles', 'id_article=' . intval($id)); |
|
| 781 | + $statut = sql_getfetsel('statut', 'spip_articles', 'id_article='.intval($id)); |
|
| 782 | 782 | } |
| 783 | 783 | |
| 784 | 784 | return |
@@ -789,7 +789,7 @@ discard block |
||
| 789 | 789 | or |
| 790 | 790 | ($id |
| 791 | 791 | and $qui['id_auteur'] |
| 792 | - and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur'])); |
|
| 792 | + and auteurs_objet('article', $id, 'id_auteur='.$qui['id_auteur'])); |
|
| 793 | 793 | } |
| 794 | 794 | |
| 795 | 795 | |
@@ -808,8 +808,8 @@ discard block |
||
| 808 | 808 | function autoriser_voir_dist($faire, $type, $id, $qui, $opt) { |
| 809 | 809 | # securite, mais on aurait pas du arriver ici ! |
| 810 | 810 | if ( |
| 811 | - function_exists($f = 'autoriser_' . $type . '_voir') |
|
| 812 | - or function_exists($f = 'autoriser_' . $type . '_voir_dist') |
|
| 811 | + function_exists($f = 'autoriser_'.$type.'_voir') |
|
| 812 | + or function_exists($f = 'autoriser_'.$type.'_voir_dist') |
|
| 813 | 813 | ) { |
| 814 | 814 | return $f($faire, $type, $id, $qui, $opt); |
| 815 | 815 | } |
@@ -929,7 +929,7 @@ discard block |
||
| 929 | 929 | $n = sql_fetsel( |
| 930 | 930 | 'A.id_article', |
| 931 | 931 | 'spip_auteurs_liens AS L LEFT JOIN spip_articles AS A ON (L.objet=\'article\' AND L.id_objet=A.id_article)', |
| 932 | - "A.statut='publie' AND L.id_auteur=" . sql_quote($id) |
|
| 932 | + "A.statut='publie' AND L.id_auteur=".sql_quote($id) |
|
| 933 | 933 | ); |
| 934 | 934 | |
| 935 | 935 | return $n ? true : false; |
@@ -1131,7 +1131,7 @@ discard block |
||
| 1131 | 1131 | and $r = sql_allfetsel( |
| 1132 | 1132 | 'id_objet', |
| 1133 | 1133 | 'spip_auteurs_liens', |
| 1134 | - 'id_auteur=' . intval($id_auteur) . " AND objet='rubrique' AND id_objet!=0" |
|
| 1134 | + 'id_auteur='.intval($id_auteur)." AND objet='rubrique' AND id_objet!=0" |
|
| 1135 | 1135 | ) |
| 1136 | 1136 | and count($r) |
| 1137 | 1137 | ) { |
@@ -1747,8 +1747,8 @@ discard block |
||
| 1747 | 1747 | function auteurs_objet($objet, $id_objet, $cond = '') { |
| 1748 | 1748 | $objet = objet_type($objet); |
| 1749 | 1749 | $where = [ |
| 1750 | - 'objet=' . sql_quote($objet), |
|
| 1751 | - 'id_objet=' . intval($id_objet) |
|
| 1750 | + 'objet='.sql_quote($objet), |
|
| 1751 | + 'id_objet='.intval($id_objet) |
|
| 1752 | 1752 | ]; |
| 1753 | 1753 | if (!empty($cond)) { |
| 1754 | 1754 | if (is_array($cond)) { |
@@ -1783,7 +1783,7 @@ discard block |
||
| 1783 | 1783 | return sql_allfetsel( |
| 1784 | 1784 | 'id_auteur', |
| 1785 | 1785 | 'spip_auteurs_liens', |
| 1786 | - "objet='article' AND id_objet=" . intval($id_article) . ($cond ? " AND $cond" : '') |
|
| 1786 | + "objet='article' AND id_objet=".intval($id_article).($cond ? " AND $cond" : '') |
|
| 1787 | 1787 | ); |
| 1788 | 1788 | } |
| 1789 | 1789 | |
@@ -47,15 +47,15 @@ discard block |
||
| 47 | 47 | $je_suis_poste = $flux['args']['je_suis_poste']; |
| 48 | 48 | |
| 49 | 49 | $cle_autosave = serialize($cle_autosave); |
| 50 | - $cle_autosave = $form . '_' . md5($cle_autosave); |
|
| 50 | + $cle_autosave = $form.'_'.md5($cle_autosave); |
|
| 51 | 51 | |
| 52 | 52 | // si on a un backup en session et qu'on est au premier chargement, non poste |
| 53 | 53 | // on restitue les donnees |
| 54 | 54 | if ( |
| 55 | - isset($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave]) |
|
| 55 | + isset($GLOBALS['visiteur_session']['session_autosave_'.$cle_autosave]) |
|
| 56 | 56 | and !$je_suis_poste |
| 57 | 57 | ) { |
| 58 | - parse_str($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave], $vars); |
|
| 58 | + parse_str($GLOBALS['visiteur_session']['session_autosave_'.$cle_autosave], $vars); |
|
| 59 | 59 | foreach ($vars as $key => $val) { |
| 60 | 60 | if (isset($flux['data'][$key])) { |
| 61 | 61 | $flux['data'][$key] = (is_string($val) ? autosave_clean_value($val) : array_map( |
@@ -71,8 +71,8 @@ discard block |
||
| 71 | 71 | if ($je_suis_poste and _request('autosave') === $cle_autosave and function_exists('terminer_actualiser_sessions')) { |
| 72 | 72 | terminer_actualiser_sessions(); |
| 73 | 73 | // et verifions si jamais l'autosave a fait un come back, dans ce cas on le revide |
| 74 | - if (isset($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave])) { |
|
| 75 | - session_set('session_autosave_' . $cle_autosave, null); |
|
| 74 | + if (isset($GLOBALS['visiteur_session']['session_autosave_'.$cle_autosave])) { |
|
| 75 | + session_set('session_autosave_'.$cle_autosave, null); |
|
| 76 | 76 | // en court sleep pour etre certain que la concurrence est finie |
| 77 | 77 | sleep(1); |
| 78 | 78 | terminer_actualiser_sessions(); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | $flux['data']['_hidden'] .= "<input type='hidden' name='autosave' class='autosaveactive' value='$cle_autosave' />" |
| 87 | 87 | . '<script type="text/javascript">/*<![CDATA[*/if (window.jQuery) jQuery(function(){ |
| 88 | - $("input.autosaveactive").closest("form:not(.autosaveon)").autosave({url:"' . $GLOBALS['meta']['adresse_site'] . '/"}).addClass("autosaveon"); |
|
| 88 | + $("input.autosaveactive").closest("form:not(.autosaveon)").autosave({url:"' . $GLOBALS['meta']['adresse_site'].'/"}).addClass("autosaveon"); |
|
| 89 | 89 | });/*]]>*/</script>'; |
| 90 | 90 | } |
| 91 | 91 | |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | // on elimine les donnees de la session |
| 108 | 108 | if ($cle_autosave = _request('autosave')) { |
| 109 | 109 | include_spip('inc/session'); |
| 110 | - session_set('session_autosave_' . $cle_autosave, null); |
|
| 110 | + session_set('session_autosave_'.$cle_autosave, null); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | if (isset($GLOBALS['visiteur_session']) and $GLOBALS['visiteur_session']) { |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $role = $roles['roles']['defaut']; |
| 151 | 151 | } |
| 152 | 152 | // where |
| 153 | - $cond = ["$colonne_role=" . sql_quote($role)]; |
|
| 153 | + $cond = ["$colonne_role=".sql_quote($role)]; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | return [$role, $colonne_role, $cond]; |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | if ($colonne_role) { |
| 186 | 186 | // on ajoute la condition du role aux autres conditions. |
| 187 | 187 | if ($role != '*') { |
| 188 | - $cond[] = "$colonne_role=" . sql_quote($role); |
|
| 188 | + $cond[] = "$colonne_role=".sql_quote($role); |
|
| 189 | 189 | } |
| 190 | 190 | } |
| 191 | 191 | |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | $all = sql_allfetsel( |
| 370 | 370 | "DISTINCT $colone_role", |
| 371 | 371 | $l, |
| 372 | - 'objet=' . sql_quote(($objet_source == $objet_lien) ? $objet : $objet_source) |
|
| 372 | + 'objet='.sql_quote(($objet_source == $objet_lien) ? $objet : $objet_source) |
|
| 373 | 373 | ); |
| 374 | 374 | $done[$hash] = array_map('reset', $all); |
| 375 | 375 | |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $titre = '[' |
| 91 | 91 | . $nom_site_spip |
| 92 | 92 | . ']' |
| 93 | - . ($titre ? ' ' . textebrut(typo($titre)) : ''); |
|
| 93 | + . ($titre ? ' '.textebrut(typo($titre)) : ''); |
|
| 94 | 94 | |
| 95 | 95 | return _DOCTYPE_ECRIRE |
| 96 | 96 | . html_lang_attributes() |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | function init_body($rubrique = 'accueil', $sous_rubrique = 'accueil', $id_rubrique = '', $menu = true) { |
| 134 | 134 | |
| 135 | 135 | $res = pipeline('body_prive', "<body class='" |
| 136 | - . init_body_class() . ' ' . _request('exec') . "'" |
|
| 136 | + . init_body_class().' '._request('exec')."'" |
|
| 137 | 137 | . ($GLOBALS['spip_lang_rtl'] ? " dir='rtl'" : '') |
| 138 | 138 | . '>'); |
| 139 | 139 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | $couleur = isset($prefs['couleur']) ? (int) $prefs['couleur'] : 2; |
| 178 | 178 | |
| 179 | - $classes = $GLOBALS['spip_ecran'] . " spip-theme-colors-$couleur $spip_display_navigation $spip_display_outils " . $display_class[$GLOBALS['spip_display']]; |
|
| 179 | + $classes = $GLOBALS['spip_ecran']." spip-theme-colors-$couleur $spip_display_navigation $spip_display_outils ".$display_class[$GLOBALS['spip_display']]; |
|
| 180 | 180 | return spip_sanitize_classname($classes); |
| 181 | 181 | } |
| 182 | 182 | |
@@ -87,12 +87,12 @@ |
||
| 87 | 87 | } |
| 88 | 88 | // si une seule colonne, en faire le titre |
| 89 | 89 | if (preg_match("/^([^$sep]+)$sep+\$/", $entete, $l)) { |
| 90 | - $caption = "\n||" . $l[1] . '|'; |
|
| 90 | + $caption = "\n||".$l[1].'|'; |
|
| 91 | 91 | list($entete, $corps) = explode("\n", $corps, 2); |
| 92 | 92 | } |
| 93 | 93 | // si premiere colonne vide, le raccourci doit quand meme produire <th... |
| 94 | 94 | if ($entete[0] == $sep) { |
| 95 | - $entete = ' ' . $entete; |
|
| 95 | + $entete = ' '.$entete; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | $lignes = explode("\n", $corps); |
@@ -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 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | // passer en minuscules (cf les balises de formulaires) |
| 80 | 80 | // et inclure le fichier |
| 81 | 81 | if ( |
| 82 | - !$inc = include_spip($dossier . ($d = strtolower($nom))) |
|
| 82 | + !$inc = include_spip($dossier.($d = strtolower($nom))) |
|
| 83 | 83 | // si le fichier truc/machin/nom.php n'existe pas, |
| 84 | 84 | // la fonction peut etre definie dans truc/machin.php qui regroupe plusieurs petites fonctions |
| 85 | 85 | and strlen(dirname($dossier)) and dirname($dossier) != '.' |
@@ -98,14 +98,14 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | // Echec : message d'erreur |
| 101 | - spip_log("fonction $nom ($f ou $g) indisponible" . |
|
| 101 | + spip_log("fonction $nom ($f ou $g) indisponible". |
|
| 102 | 102 | ($inc ? '' : " (fichier $d absent de $dossier)")); |
| 103 | 103 | |
| 104 | 104 | include_spip('inc/minipres'); |
| 105 | 105 | echo minipres( |
| 106 | 106 | _T('forum_titre_erreur'), |
| 107 | - _T('fichier_introuvable', ['fichier' => '<b>' . spip_htmlentities($d) . '</b>']), |
|
| 108 | - ['all_inline' => true,'status' => 404] |
|
| 107 | + _T('fichier_introuvable', ['fichier' => '<b>'.spip_htmlentities($d).'</b>']), |
|
| 108 | + ['all_inline' => true, 'status' => 404] |
|
| 109 | 109 | ); |
| 110 | 110 | exit; |
| 111 | 111 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | * - string : chemin du fichier trouvé |
| 152 | 152 | **/ |
| 153 | 153 | function include_spip($f, $include = true) { |
| 154 | - return find_in_path($f . '.php', '', $include); |
|
| 154 | + return find_in_path($f.'.php', '', $include); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | /** |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | * - string : chemin du fichier trouvé |
| 172 | 172 | **/ |
| 173 | 173 | function require_spip($f) { |
| 174 | - return find_in_path($f . '.php', '', 'required'); |
|
| 174 | + return find_in_path($f.'.php', '', 'required'); |
|
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | // donc il faut l'inclure "en globals" |
| 189 | 189 | if ($f = find_in_path('mes_fonctions.php')) { |
| 190 | 190 | global $dossier_squelettes; |
| 191 | - include_once(_ROOT_CWD . $f); |
|
| 191 | + include_once(_ROOT_CWD.$f); |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | if (@is_readable(_CACHE_PLUGINS_FCT)) { |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | // appliquer notre fonction si elle existe |
| 296 | - $fonc = 'execute_pipeline_' . strtolower($action); |
|
| 296 | + $fonc = 'execute_pipeline_'.strtolower($action); |
|
| 297 | 297 | if (function_exists($fonc)) { |
| 298 | 298 | $val = $fonc($val); |
| 299 | 299 | } // plantage ? |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | function spip_log($message = null, $name = null) { |
| 359 | 359 | static $pre = []; |
| 360 | 360 | static $log; |
| 361 | - preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string)$name, $regs); |
|
| 361 | + preg_match('/^([a-z_]*)\.?(\d)?$/iS', (string) $name, $regs); |
|
| 362 | 362 | if (!isset($regs[1]) or !$logname = $regs[1]) { |
| 363 | 363 | $logname = null; |
| 364 | 364 | } |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | if (!is_string($message)) { |
| 387 | 387 | $message = print_r($message, true); |
| 388 | 388 | } |
| 389 | - $log($pre[$niveau] . ' ' . $message, $logname); |
|
| 389 | + $log($pre[$niveau].' '.$message, $logname); |
|
| 390 | 390 | } |
| 391 | 391 | } |
| 392 | 392 | |
@@ -587,7 +587,7 @@ discard block |
||
| 587 | 587 | $a = './'; |
| 588 | 588 | } |
| 589 | 589 | |
| 590 | - $regexp = ',^(' . str_replace('[]', '\[\]', $c) . '[[]?[]]?)(=.*)?$,'; |
|
| 590 | + $regexp = ',^('.str_replace('[]', '\[\]', $c).'[[]?[]]?)(=.*)?$,'; |
|
| 591 | 591 | $ajouts = array_flip(explode('|', $c)); |
| 592 | 592 | $u = is_array($v) ? $v : rawurlencode($v); |
| 593 | 593 | $testv = (is_array($v) ? count($v) : strlen($v)); |
@@ -614,7 +614,7 @@ discard block |
||
| 614 | 614 | // Ajout. Pour une variable, remplacer au meme endroit, |
| 615 | 615 | // pour un tableau ce sera fait dans la prochaine boucle |
| 616 | 616 | elseif (substr($r[1], -2) != '[]') { |
| 617 | - $url[$n] = $r[1] . '=' . $u; |
|
| 617 | + $url[$n] = $r[1].'='.$u; |
|
| 618 | 618 | unset($ajouts[$r[1]]); |
| 619 | 619 | } |
| 620 | 620 | // Pour les tableaux on laisse tomber les valeurs de |
@@ -635,11 +635,11 @@ discard block |
||
| 635 | 635 | } elseif ($testv) { |
| 636 | 636 | foreach ($ajouts as $k => $n) { |
| 637 | 637 | if (!is_array($v)) { |
| 638 | - $url[] = $k . '=' . $u; |
|
| 638 | + $url[] = $k.'='.$u; |
|
| 639 | 639 | } else { |
| 640 | - $id = (substr($k, -2) == '[]') ? $k : ($k . '[]'); |
|
| 640 | + $id = (substr($k, -2) == '[]') ? $k : ($k.'[]'); |
|
| 641 | 641 | foreach ($v as $w) { |
| 642 | - $url[] = $id . '=' . (is_array($w) ? 'Array' : $w); |
|
| 642 | + $url[] = $id.'='.(is_array($w) ? 'Array' : $w); |
|
| 643 | 643 | } |
| 644 | 644 | } |
| 645 | 645 | } |
@@ -650,10 +650,10 @@ discard block |
||
| 650 | 650 | |
| 651 | 651 | // recomposer l'adresse |
| 652 | 652 | if ($url) { |
| 653 | - $a .= '?' . join($sep, $url); |
|
| 653 | + $a .= '?'.join($sep, $url); |
|
| 654 | 654 | } |
| 655 | 655 | |
| 656 | - return $a . $ancre; |
|
| 656 | + return $a.$ancre; |
|
| 657 | 657 | } |
| 658 | 658 | |
| 659 | 659 | /** |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | translitteration($ancre) |
| 686 | 686 | ); |
| 687 | 687 | } |
| 688 | - return $url . (strlen($ancre) ? '#' . $ancre : ''); |
|
| 688 | + return $url.(strlen($ancre) ? '#'.$ancre : ''); |
|
| 689 | 689 | } |
| 690 | 690 | |
| 691 | 691 | /** |
@@ -801,7 +801,7 @@ discard block |
||
| 801 | 801 | * @return bool |
| 802 | 802 | */ |
| 803 | 803 | function test_plugin_actif($plugin) { |
| 804 | - return ($plugin and defined('_DIR_PLUGIN_' . strtoupper($plugin))) ? true : false; |
|
| 804 | + return ($plugin and defined('_DIR_PLUGIN_'.strtoupper($plugin))) ? true : false; |
|
| 805 | 805 | } |
| 806 | 806 | |
| 807 | 807 | /** |
@@ -871,8 +871,7 @@ discard block |
||
| 871 | 871 | $text = str_replace( |
| 872 | 872 | '_', |
| 873 | 873 | ' ', |
| 874 | - (($n = strpos($text, ':')) === false ? $texte : |
|
| 875 | - substr($texte, $n + 1)) |
|
| 874 | + (($n = strpos($text, ':')) === false ? $texte : substr($texte, $n + 1)) |
|
| 876 | 875 | ); |
| 877 | 876 | } |
| 878 | 877 | $o['class'] = null; |
@@ -934,7 +933,7 @@ discard block |
||
| 934 | 933 | $value = interdire_scripts($value, -1); |
| 935 | 934 | } |
| 936 | 935 | if (!empty($options['class'])) { |
| 937 | - $value = "<span class='" . $options['class'] . "'>$value</span>"; |
|
| 936 | + $value = "<span class='".$options['class']."'>$value</span>"; |
|
| 938 | 937 | } |
| 939 | 938 | $text = str_replace("@$name@", $value, $text); |
| 940 | 939 | unset($args[$name]); |
@@ -943,7 +942,7 @@ discard block |
||
| 943 | 942 | // Si des variables n'ont pas ete inserees, le signaler |
| 944 | 943 | // (chaines de langues pas a jour) |
| 945 | 944 | if ($args) { |
| 946 | - spip_log("$f: variables inutilisees " . join(', ', array_keys($args)), _LOG_DEBUG); |
|
| 945 | + spip_log("$f: variables inutilisees ".join(', ', array_keys($args)), _LOG_DEBUG); |
|
| 947 | 946 | } |
| 948 | 947 | } |
| 949 | 948 | |
@@ -967,7 +966,7 @@ discard block |
||
| 967 | 966 | function joli_repertoire($rep) { |
| 968 | 967 | $a = substr($rep, 0, 1); |
| 969 | 968 | if ($a <> '.' and $a <> '/') { |
| 970 | - $rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS) . $rep; |
|
| 969 | + $rep = (_DIR_RESTREINT ? '' : _DIR_RESTREINT_ABS).$rep; |
|
| 971 | 970 | } |
| 972 | 971 | $rep = preg_replace(',(^\.\.\/),', '', $rep); |
| 973 | 972 | |
@@ -1021,7 +1020,7 @@ discard block |
||
| 1021 | 1020 | $p -= ($x * 1000); |
| 1022 | 1021 | } |
| 1023 | 1022 | |
| 1024 | - return $s . sprintf($s ? '%07.3f ms' : '%.3f ms', $p); |
|
| 1023 | + return $s.sprintf($s ? '%07.3f ms' : '%.3f ms', $p); |
|
| 1025 | 1024 | } |
| 1026 | 1025 | } |
| 1027 | 1026 | |
@@ -1089,7 +1088,7 @@ discard block |
||
| 1089 | 1088 | if ($taches and count($taches) and !spip_connect()) { |
| 1090 | 1089 | return false; |
| 1091 | 1090 | } |
| 1092 | - spip_log('cron !', 'jq' . _LOG_DEBUG); |
|
| 1091 | + spip_log('cron !', 'jq'._LOG_DEBUG); |
|
| 1093 | 1092 | if ($genie = charger_fonction('genie', 'inc', true)) { |
| 1094 | 1093 | return $genie($taches); |
| 1095 | 1094 | } |
@@ -1193,7 +1192,7 @@ discard block |
||
| 1193 | 1192 | |
| 1194 | 1193 | if ($queue_next_job_time == -1) { |
| 1195 | 1194 | if (!defined('_JQ_NEXT_JOB_TIME_FILENAME')) { |
| 1196 | - define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP . 'job_queue_next.txt'); |
|
| 1195 | + define('_JQ_NEXT_JOB_TIME_FILENAME', _DIR_TMP.'job_queue_next.txt'); |
|
| 1197 | 1196 | } |
| 1198 | 1197 | // utiliser un cache memoire si dispo |
| 1199 | 1198 | if (function_exists('cache_get') and defined('_MEMOIZE_MEMORY') and _MEMOIZE_MEMORY) { |
@@ -1262,8 +1261,8 @@ discard block |
||
| 1262 | 1261 | $src = ''; |
| 1263 | 1262 | } |
| 1264 | 1263 | if ($script) { |
| 1265 | - $script = ("/*<![CDATA[*/\n" . |
|
| 1266 | - preg_replace(',</([^>]*)>,', '<\/\1>', $script) . |
|
| 1264 | + $script = ("/*<![CDATA[*/\n". |
|
| 1265 | + preg_replace(',</([^>]*)>,', '<\/\1>', $script). |
|
| 1267 | 1266 | '/*]]>*/'); |
| 1268 | 1267 | } |
| 1269 | 1268 | if ($noscript) { |
@@ -1349,13 +1348,13 @@ discard block |
||
| 1349 | 1348 | if ($path_base == null) { |
| 1350 | 1349 | // Chemin standard depuis l'espace public |
| 1351 | 1350 | $path = defined('_SPIP_PATH') ? _SPIP_PATH : |
| 1352 | - _DIR_RACINE . ':' . |
|
| 1353 | - _DIR_RACINE . 'squelettes-dist/:' . |
|
| 1354 | - _DIR_RACINE . 'prive/:' . |
|
| 1351 | + _DIR_RACINE.':'. |
|
| 1352 | + _DIR_RACINE.'squelettes-dist/:'. |
|
| 1353 | + _DIR_RACINE.'prive/:'. |
|
| 1355 | 1354 | _DIR_RESTREINT; |
| 1356 | 1355 | // Ajouter squelettes/ |
| 1357 | - if (@is_dir(_DIR_RACINE . 'squelettes')) { |
|
| 1358 | - $path = _DIR_RACINE . 'squelettes/:' . $path; |
|
| 1356 | + if (@is_dir(_DIR_RACINE.'squelettes')) { |
|
| 1357 | + $path = _DIR_RACINE.'squelettes/:'.$path; |
|
| 1359 | 1358 | } |
| 1360 | 1359 | foreach (explode(':', $path) as $dir) { |
| 1361 | 1360 | if (strlen($dir) and substr($dir, -1) != '/') { |
@@ -1367,7 +1366,7 @@ discard block |
||
| 1367 | 1366 | // Et le(s) dossier(s) des squelettes nommes |
| 1368 | 1367 | if (strlen($GLOBALS['dossier_squelettes'])) { |
| 1369 | 1368 | foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) { |
| 1370 | - array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE) . $d . '/'); |
|
| 1369 | + array_unshift($path_full, ($d[0] == '/' ? '' : _DIR_RACINE).$d.'/'); |
|
| 1371 | 1370 | } |
| 1372 | 1371 | } |
| 1373 | 1372 | $GLOBALS['path_sig'] = md5(serialize($path_full)); |
@@ -1378,7 +1377,7 @@ discard block |
||
| 1378 | 1377 | |
| 1379 | 1378 | if (is_array($dir_path) or strlen($dir_path)) { |
| 1380 | 1379 | $tete = ''; |
| 1381 | - if (reset($path_base) == _DIR_RACINE . 'squelettes/') { |
|
| 1380 | + if (reset($path_base) == _DIR_RACINE.'squelettes/') { |
|
| 1382 | 1381 | $tete = array_shift($path_base); |
| 1383 | 1382 | } |
| 1384 | 1383 | $dirs = (is_array($dir_path) ? $dir_path : explode(':', $dir_path)); |
@@ -1399,7 +1398,7 @@ discard block |
||
| 1399 | 1398 | // Et le(s) dossier(s) des squelettes nommes |
| 1400 | 1399 | if (strlen($GLOBALS['dossier_squelettes'])) { |
| 1401 | 1400 | foreach (array_reverse(explode(':', $GLOBALS['dossier_squelettes'])) as $d) { |
| 1402 | - array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE) . $d . '/'); |
|
| 1401 | + array_unshift($path_full, ((isset($d[0]) and $d[0] == '/') ? '' : _DIR_RACINE).$d.'/'); |
|
| 1403 | 1402 | } |
| 1404 | 1403 | } |
| 1405 | 1404 | |
@@ -1470,14 +1469,14 @@ discard block |
||
| 1470 | 1469 | // si il y a un .svg a la bonne taille (-16.svg) a cote, on l'utilise en remplacement du -16.png |
| 1471 | 1470 | if ( |
| 1472 | 1471 | preg_match(',-(\d+)[.](png|gif|svg)$,', $file, $m) |
| 1473 | - and $file_svg_generique = substr($file, 0, -strlen($m[0])) . '-xx.svg' |
|
| 1472 | + and $file_svg_generique = substr($file, 0, -strlen($m[0])).'-xx.svg' |
|
| 1474 | 1473 | and $f = find_in_theme("$file_svg_generique") |
| 1475 | 1474 | ) { |
| 1476 | - if ($fsize = substr($f, 0, -6) . $m[1] . '.svg' and file_exists($fsize)) { |
|
| 1475 | + if ($fsize = substr($f, 0, -6).$m[1].'.svg' and file_exists($fsize)) { |
|
| 1477 | 1476 | return $themefiles["$subdir$file"] = $fsize; |
| 1478 | 1477 | } |
| 1479 | 1478 | else { |
| 1480 | - return $themefiles["$subdir$file"] = "$f?" . $m[1] . 'px'; |
|
| 1479 | + return $themefiles["$subdir$file"] = "$f?".$m[1].'px'; |
|
| 1481 | 1480 | } |
| 1482 | 1481 | } |
| 1483 | 1482 | |
@@ -1487,7 +1486,7 @@ discard block |
||
| 1487 | 1486 | return $themefiles["$subdir$file"] = $f; |
| 1488 | 1487 | } |
| 1489 | 1488 | } |
| 1490 | - spip_log("$file introuvable dans le theme prive " . reset($themes), 'theme'); |
|
| 1489 | + spip_log("$file introuvable dans le theme prive ".reset($themes), 'theme'); |
|
| 1491 | 1490 | |
| 1492 | 1491 | return $themefiles["$subdir$file"] = ''; |
| 1493 | 1492 | } |
@@ -1595,8 +1594,8 @@ discard block |
||
| 1595 | 1594 | return false; |
| 1596 | 1595 | } |
| 1597 | 1596 | if ($include and !isset($inc[$dirname][$file])) { |
| 1598 | - include_once _ROOT_CWD . $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
|
| 1599 | - $inc[$dirname][$file] = $inc[''][$dirname . $file] = true; |
|
| 1597 | + include_once _ROOT_CWD.$GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
|
| 1598 | + $inc[$dirname][$file] = $inc[''][$dirname.$file] = true; |
|
| 1600 | 1599 | } |
| 1601 | 1600 | |
| 1602 | 1601 | return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file]; |
@@ -1609,14 +1608,14 @@ discard block |
||
| 1609 | 1608 | } |
| 1610 | 1609 | |
| 1611 | 1610 | foreach (creer_chemin() as $dir) { |
| 1612 | - if (!isset($dirs[$a = $dir . $dirname])) { |
|
| 1613 | - $dirs[$a] = (is_dir(_ROOT_CWD . $a) || !$a); |
|
| 1611 | + if (!isset($dirs[$a = $dir.$dirname])) { |
|
| 1612 | + $dirs[$a] = (is_dir(_ROOT_CWD.$a) || !$a); |
|
| 1614 | 1613 | } |
| 1615 | 1614 | if ($dirs[$a]) { |
| 1616 | - if (file_exists(_ROOT_CWD . ($a .= $file))) { |
|
| 1615 | + if (file_exists(_ROOT_CWD.($a .= $file))) { |
|
| 1617 | 1616 | if ($include and !isset($inc[$dirname][$file])) { |
| 1618 | - include_once _ROOT_CWD . $a; |
|
| 1619 | - $inc[$dirname][$file] = $inc[''][$dirname . $file] = true; |
|
| 1617 | + include_once _ROOT_CWD.$a; |
|
| 1618 | + $inc[$dirname][$file] = $inc[''][$dirname.$file] = true; |
|
| 1620 | 1619 | } |
| 1621 | 1620 | if (!defined('_SAUVER_CHEMIN')) { |
| 1622 | 1621 | // si le chemin n'a pas encore ete charge, ne pas lever le flag, ne pas cacher |
@@ -1626,7 +1625,7 @@ discard block |
||
| 1626 | 1625 | define('_SAUVER_CHEMIN', true); |
| 1627 | 1626 | } |
| 1628 | 1627 | |
| 1629 | - return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = $a; |
|
| 1628 | + return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = $a; |
|
| 1630 | 1629 | } |
| 1631 | 1630 | } |
| 1632 | 1631 | } |
@@ -1652,7 +1651,7 @@ discard block |
||
| 1652 | 1651 | define('_SAUVER_CHEMIN', true); |
| 1653 | 1652 | } |
| 1654 | 1653 | |
| 1655 | - return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname . $file] = false; |
|
| 1654 | + return $GLOBALS['path_files'][$GLOBALS['path_sig']][$dirname][$file] = $GLOBALS['path_files'][$GLOBALS['path_sig']][''][$dirname.$file] = false; |
|
| 1656 | 1655 | } |
| 1657 | 1656 | |
| 1658 | 1657 | function clear_path_cache() { |
@@ -1722,12 +1721,12 @@ discard block |
||
| 1722 | 1721 | // cas borderline si dans mes_options on appelle redirige_par_entete qui utilise _T et charge un fichier de langue |
| 1723 | 1722 | // on a pas encore inclus flock.php |
| 1724 | 1723 | if (!function_exists('preg_files')) { |
| 1725 | - include_once _ROOT_RESTREINT . 'inc/flock.php'; |
|
| 1724 | + include_once _ROOT_RESTREINT.'inc/flock.php'; |
|
| 1726 | 1725 | } |
| 1727 | 1726 | |
| 1728 | 1727 | // Parcourir le chemin |
| 1729 | 1728 | foreach (creer_chemin() as $d) { |
| 1730 | - $f = $d . $dir; |
|
| 1729 | + $f = $d.$dir; |
|
| 1731 | 1730 | if (@is_dir($f)) { |
| 1732 | 1731 | $liste = preg_files($f, $pattern, $maxfiles - count($liste_fichiers), $recurs === true ? [] : $recurs); |
| 1733 | 1732 | foreach ($liste as $chemin) { |
@@ -1838,7 +1837,7 @@ discard block |
||
| 1838 | 1837 | return $res; |
| 1839 | 1838 | } |
| 1840 | 1839 | // Sinon c'est un raccourci ou compat SPIP < 2 |
| 1841 | - if (!function_exists($f = 'generer_url_' . $entite)) { |
|
| 1840 | + if (!function_exists($f = 'generer_url_'.$entite)) { |
|
| 1842 | 1841 | if (!function_exists($f .= '_dist')) { |
| 1843 | 1842 | $f = ''; |
| 1844 | 1843 | } |
@@ -1847,8 +1846,8 @@ discard block |
||
| 1847 | 1846 | $url = $f($id, $args, $ancre); |
| 1848 | 1847 | if (strlen($args)) { |
| 1849 | 1848 | $url .= strstr($url, '?') |
| 1850 | - ? '&' . $args |
|
| 1851 | - : '?' . $args; |
|
| 1849 | + ? '&'.$args |
|
| 1850 | + : '?'.$args; |
|
| 1852 | 1851 | } |
| 1853 | 1852 | |
| 1854 | 1853 | return $url; |
@@ -1879,8 +1878,8 @@ discard block |
||
| 1879 | 1878 | include_spip('base/connect_sql'); |
| 1880 | 1879 | $id_type = id_table_objet($entite, $public); |
| 1881 | 1880 | |
| 1882 | - return _DIR_RACINE . get_spip_script('./') |
|
| 1883 | - . '?' . _SPIP_PAGE . "=$entite&$id_type=$i&connect=$public" |
|
| 1881 | + return _DIR_RACINE.get_spip_script('./') |
|
| 1882 | + . '?'._SPIP_PAGE."=$entite&$id_type=$i&connect=$public" |
|
| 1884 | 1883 | . (!$args ? '' : "&$args") |
| 1885 | 1884 | . (!$ancre ? '' : "#$ancre"); |
| 1886 | 1885 | } |
@@ -2034,7 +2033,7 @@ discard block |
||
| 2034 | 2033 | !empty($_SERVER['QUERY_STRING']) |
| 2035 | 2034 | and !strpos($_SERVER['REQUEST_URI'], '?') |
| 2036 | 2035 | ) { |
| 2037 | - $GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; |
|
| 2036 | + $GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; |
|
| 2038 | 2037 | } |
| 2039 | 2038 | } |
| 2040 | 2039 | } |
@@ -2069,9 +2068,9 @@ discard block |
||
| 2069 | 2068 | array_shift($myself); |
| 2070 | 2069 | $myself = implode('/', $myself); |
| 2071 | 2070 | } |
| 2072 | - $url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)) . '/'; |
|
| 2071 | + $url = join('/', array_slice(explode('/', $myself), 0, -1 - $prof)).'/'; |
|
| 2073 | 2072 | |
| 2074 | - $url = $http . '://' . rtrim($host, '/') . '/' . ltrim($url, '/'); |
|
| 2073 | + $url = $http.'://'.rtrim($host, '/').'/'.ltrim($url, '/'); |
|
| 2075 | 2074 | |
| 2076 | 2075 | return $url; |
| 2077 | 2076 | } |
@@ -2109,17 +2108,17 @@ discard block |
||
| 2109 | 2108 | **/ |
| 2110 | 2109 | function generer_url_ecrire($script = '', $args = '', $no_entities = false, $rel = false) { |
| 2111 | 2110 | if (!$rel) { |
| 2112 | - $rel = url_de_base() . _DIR_RESTREINT_ABS . _SPIP_ECRIRE_SCRIPT; |
|
| 2111 | + $rel = url_de_base()._DIR_RESTREINT_ABS._SPIP_ECRIRE_SCRIPT; |
|
| 2113 | 2112 | } else { |
| 2114 | 2113 | if (!is_string($rel)) { |
| 2115 | 2114 | $rel = _DIR_RESTREINT ? _DIR_RESTREINT : |
| 2116 | - ('./' . _SPIP_ECRIRE_SCRIPT); |
|
| 2115 | + ('./'._SPIP_ECRIRE_SCRIPT); |
|
| 2117 | 2116 | } |
| 2118 | 2117 | } |
| 2119 | 2118 | |
| 2120 | 2119 | list($script, $ancre) = array_pad(explode('#', $script), 2, null); |
| 2121 | 2120 | if ($script and ($script <> 'accueil' or $rel)) { |
| 2122 | - $args = "?exec=$script" . (!$args ? '' : "&$args"); |
|
| 2121 | + $args = "?exec=$script".(!$args ? '' : "&$args"); |
|
| 2123 | 2122 | } elseif ($args) { |
| 2124 | 2123 | $args = "?$args"; |
| 2125 | 2124 | } |
@@ -2127,7 +2126,7 @@ discard block |
||
| 2127 | 2126 | $args .= "#$ancre"; |
| 2128 | 2127 | } |
| 2129 | 2128 | |
| 2130 | - return $rel . ($no_entities ? $args : str_replace('&', '&', $args)); |
|
| 2129 | + return $rel.($no_entities ? $args : str_replace('&', '&', $args)); |
|
| 2131 | 2130 | } |
| 2132 | 2131 | |
| 2133 | 2132 | // |
@@ -2197,25 +2196,25 @@ discard block |
||
| 2197 | 2196 | if (is_array($args)) { |
| 2198 | 2197 | $r = ''; |
| 2199 | 2198 | foreach ($args as $k => $v) { |
| 2200 | - $r .= '&' . $k . '=' . $v; |
|
| 2199 | + $r .= '&'.$k.'='.$v; |
|
| 2201 | 2200 | } |
| 2202 | 2201 | $args = substr($r, 1); |
| 2203 | 2202 | } |
| 2204 | 2203 | $action .= |
| 2205 | - (strpos($action, '?') !== false ? '&' : '?') . $args; |
|
| 2204 | + (strpos($action, '?') !== false ? '&' : '?').$args; |
|
| 2206 | 2205 | } |
| 2207 | 2206 | if (!$no_entities) { |
| 2208 | 2207 | $action = quote_amp($action); |
| 2209 | 2208 | } |
| 2210 | 2209 | |
| 2211 | 2210 | // ne pas generer une url avec /./?page= en cas d'url absolue et de _SPIP_SCRIPT vide |
| 2212 | - return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/') . preg_replace(',^/[.]/,', '/', "/$action")); |
|
| 2211 | + return ($rel ? _DIR_RACINE . $action : rtrim(url_de_base(), '/').preg_replace(',^/[.]/,', '/', "/$action")); |
|
| 2213 | 2212 | } |
| 2214 | 2213 | |
| 2215 | 2214 | // https://code.spip.net/@generer_url_prive |
| 2216 | 2215 | function generer_url_prive($script, $args = '', $no_entities = false) { |
| 2217 | 2216 | |
| 2218 | - return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS . 'prive.php'); |
|
| 2217 | + return generer_url_public($script, $args, $no_entities, false, _DIR_RESTREINT_ABS.'prive.php'); |
|
| 2219 | 2218 | } |
| 2220 | 2219 | |
| 2221 | 2220 | // Pour les formulaires en methode POST, |
@@ -2250,8 +2249,7 @@ discard block |
||
| 2250 | 2249 | . "><div>\n" |
| 2251 | 2250 | . "<input type='hidden' name='exec' value='$script1' />" |
| 2252 | 2251 | . $corps |
| 2253 | - . (!$submit ? '' : |
|
| 2254 | - ("<div style='text-align: " . $GLOBALS['spip_lang_right'] . "'><input class='fondo submit btn' type='submit' value=\"" . entites_html($submit) . '" /></div>')) |
|
| 2252 | + . (!$submit ? '' : ("<div style='text-align: ".$GLOBALS['spip_lang_right']."'><input class='fondo submit btn' type='submit' value=\"".entites_html($submit).'" /></div>')) |
|
| 2255 | 2253 | . "</div></form>\n"; |
| 2256 | 2254 | } |
| 2257 | 2255 | |
@@ -2276,14 +2274,14 @@ discard block |
||
| 2276 | 2274 | ? generer_url_ecrire(_request('exec')) |
| 2277 | 2275 | : generer_url_public(); |
| 2278 | 2276 | |
| 2279 | - return "\n<form action='" . |
|
| 2280 | - $h . |
|
| 2281 | - "'" . |
|
| 2282 | - $atts . |
|
| 2283 | - ">\n" . |
|
| 2284 | - '<div>' . |
|
| 2285 | - "\n<input type='hidden' name='action' value='$script' />" . |
|
| 2286 | - $corps . |
|
| 2277 | + return "\n<form action='". |
|
| 2278 | + $h. |
|
| 2279 | + "'". |
|
| 2280 | + $atts. |
|
| 2281 | + ">\n". |
|
| 2282 | + '<div>'. |
|
| 2283 | + "\n<input type='hidden' name='action' value='$script' />". |
|
| 2284 | + $corps. |
|
| 2287 | 2285 | '</div></form>'; |
| 2288 | 2286 | } |
| 2289 | 2287 | |
@@ -2311,7 +2309,7 @@ discard block |
||
| 2311 | 2309 | : generer_url_public('', '', false, false); |
| 2312 | 2310 | $url = parametre_url($url, 'action', $script); |
| 2313 | 2311 | if ($args) { |
| 2314 | - $url .= quote_amp('&' . $args); |
|
| 2312 | + $url .= quote_amp('&'.$args); |
|
| 2315 | 2313 | } |
| 2316 | 2314 | |
| 2317 | 2315 | if ($no_entities) { |
@@ -2361,17 +2359,17 @@ discard block |
||
| 2361 | 2359 | |
| 2362 | 2360 | // le nom du repertoire plugins/ activables/desactivables |
| 2363 | 2361 | if (!defined('_DIR_PLUGINS')) { |
| 2364 | - define('_DIR_PLUGINS', _DIR_RACINE . 'plugins/'); |
|
| 2362 | + define('_DIR_PLUGINS', _DIR_RACINE.'plugins/'); |
|
| 2365 | 2363 | } |
| 2366 | 2364 | |
| 2367 | 2365 | // le nom du repertoire des extensions/ permanentes du core, toujours actives |
| 2368 | 2366 | if (!defined('_DIR_PLUGINS_DIST')) { |
| 2369 | - define('_DIR_PLUGINS_DIST', _DIR_RACINE . 'plugins-dist/'); |
|
| 2367 | + define('_DIR_PLUGINS_DIST', _DIR_RACINE.'plugins-dist/'); |
|
| 2370 | 2368 | } |
| 2371 | 2369 | |
| 2372 | 2370 | // le nom du repertoire des librairies |
| 2373 | 2371 | if (!defined('_DIR_LIB')) { |
| 2374 | - define('_DIR_LIB', _DIR_RACINE . 'lib/'); |
|
| 2372 | + define('_DIR_LIB', _DIR_RACINE.'lib/'); |
|
| 2375 | 2373 | } |
| 2376 | 2374 | |
| 2377 | 2375 | if (!defined('_DIR_IMG')) { |
@@ -2381,29 +2379,29 @@ discard block |
||
| 2381 | 2379 | define('_DIR_LOGOS', $pa); |
| 2382 | 2380 | } |
| 2383 | 2381 | if (!defined('_DIR_IMG_ICONES')) { |
| 2384 | - define('_DIR_IMG_ICONES', _DIR_LOGOS . 'icones/'); |
|
| 2382 | + define('_DIR_IMG_ICONES', _DIR_LOGOS.'icones/'); |
|
| 2385 | 2383 | } |
| 2386 | 2384 | |
| 2387 | 2385 | if (!defined('_DIR_DUMP')) { |
| 2388 | - define('_DIR_DUMP', $ti . 'dump/'); |
|
| 2386 | + define('_DIR_DUMP', $ti.'dump/'); |
|
| 2389 | 2387 | } |
| 2390 | 2388 | if (!defined('_DIR_SESSIONS')) { |
| 2391 | - define('_DIR_SESSIONS', $ti . 'sessions/'); |
|
| 2389 | + define('_DIR_SESSIONS', $ti.'sessions/'); |
|
| 2392 | 2390 | } |
| 2393 | 2391 | if (!defined('_DIR_TRANSFERT')) { |
| 2394 | - define('_DIR_TRANSFERT', $ti . 'upload/'); |
|
| 2392 | + define('_DIR_TRANSFERT', $ti.'upload/'); |
|
| 2395 | 2393 | } |
| 2396 | 2394 | if (!defined('_DIR_CACHE')) { |
| 2397 | - define('_DIR_CACHE', $ti . 'cache/'); |
|
| 2395 | + define('_DIR_CACHE', $ti.'cache/'); |
|
| 2398 | 2396 | } |
| 2399 | 2397 | if (!defined('_DIR_CACHE_XML')) { |
| 2400 | - define('_DIR_CACHE_XML', _DIR_CACHE . 'xml/'); |
|
| 2398 | + define('_DIR_CACHE_XML', _DIR_CACHE.'xml/'); |
|
| 2401 | 2399 | } |
| 2402 | 2400 | if (!defined('_DIR_SKELS')) { |
| 2403 | - define('_DIR_SKELS', _DIR_CACHE . 'skel/'); |
|
| 2401 | + define('_DIR_SKELS', _DIR_CACHE.'skel/'); |
|
| 2404 | 2402 | } |
| 2405 | 2403 | if (!defined('_DIR_AIDE')) { |
| 2406 | - define('_DIR_AIDE', _DIR_CACHE . 'aide/'); |
|
| 2404 | + define('_DIR_AIDE', _DIR_CACHE.'aide/'); |
|
| 2407 | 2405 | } |
| 2408 | 2406 | if (!defined('_DIR_TMP')) { |
| 2409 | 2407 | define('_DIR_TMP', $ti); |
@@ -2432,27 +2430,27 @@ discard block |
||
| 2432 | 2430 | // Declaration des fichiers |
| 2433 | 2431 | |
| 2434 | 2432 | if (!defined('_CACHE_PLUGINS_PATH')) { |
| 2435 | - define('_CACHE_PLUGINS_PATH', _DIR_CACHE . 'charger_plugins_chemins.php'); |
|
| 2433 | + define('_CACHE_PLUGINS_PATH', _DIR_CACHE.'charger_plugins_chemins.php'); |
|
| 2436 | 2434 | } |
| 2437 | 2435 | if (!defined('_CACHE_PLUGINS_OPT')) { |
| 2438 | - define('_CACHE_PLUGINS_OPT', _DIR_CACHE . 'charger_plugins_options.php'); |
|
| 2436 | + define('_CACHE_PLUGINS_OPT', _DIR_CACHE.'charger_plugins_options.php'); |
|
| 2439 | 2437 | } |
| 2440 | 2438 | if (!defined('_CACHE_PLUGINS_FCT')) { |
| 2441 | - define('_CACHE_PLUGINS_FCT', _DIR_CACHE . 'charger_plugins_fonctions.php'); |
|
| 2439 | + define('_CACHE_PLUGINS_FCT', _DIR_CACHE.'charger_plugins_fonctions.php'); |
|
| 2442 | 2440 | } |
| 2443 | 2441 | if (!defined('_CACHE_PIPELINES')) { |
| 2444 | - define('_CACHE_PIPELINES', _DIR_CACHE . 'charger_pipelines.php'); |
|
| 2442 | + define('_CACHE_PIPELINES', _DIR_CACHE.'charger_pipelines.php'); |
|
| 2445 | 2443 | } |
| 2446 | 2444 | if (!defined('_CACHE_CHEMIN')) { |
| 2447 | - define('_CACHE_CHEMIN', _DIR_CACHE . 'chemin.txt'); |
|
| 2445 | + define('_CACHE_CHEMIN', _DIR_CACHE.'chemin.txt'); |
|
| 2448 | 2446 | } |
| 2449 | 2447 | |
| 2450 | 2448 | # attention .php obligatoire pour ecrire_fichier_securise |
| 2451 | 2449 | if (!defined('_FILE_META')) { |
| 2452 | - define('_FILE_META', $ti . 'meta_cache.php'); |
|
| 2450 | + define('_FILE_META', $ti.'meta_cache.php'); |
|
| 2453 | 2451 | } |
| 2454 | 2452 | if (!defined('_DIR_LOG')) { |
| 2455 | - define('_DIR_LOG', _DIR_TMP . 'log/'); |
|
| 2453 | + define('_DIR_LOG', _DIR_TMP.'log/'); |
|
| 2456 | 2454 | } |
| 2457 | 2455 | if (!defined('_FILE_LOG')) { |
| 2458 | 2456 | define('_FILE_LOG', 'spip'); |
@@ -2469,8 +2467,8 @@ discard block |
||
| 2469 | 2467 | if (!defined('_FILE_CONNECT')) { |
| 2470 | 2468 | define( |
| 2471 | 2469 | '_FILE_CONNECT', |
| 2472 | - (@is_readable($f = _DIR_CONNECT . _FILE_CONNECT_INS . '.php') ? $f |
|
| 2473 | - : (@is_readable($f = _DIR_RESTREINT . 'inc_connect.php') ? $f |
|
| 2470 | + (@is_readable($f = _DIR_CONNECT._FILE_CONNECT_INS.'.php') ? $f |
|
| 2471 | + : (@is_readable($f = _DIR_RESTREINT.'inc_connect.php') ? $f |
|
| 2474 | 2472 | : false)) |
| 2475 | 2473 | ); |
| 2476 | 2474 | } |
@@ -2482,7 +2480,7 @@ discard block |
||
| 2482 | 2480 | if (!defined('_FILE_CHMOD')) { |
| 2483 | 2481 | define( |
| 2484 | 2482 | '_FILE_CHMOD', |
| 2485 | - (@is_readable($f = _DIR_CHMOD . _FILE_CHMOD_INS . '.php') ? $f |
|
| 2483 | + (@is_readable($f = _DIR_CHMOD._FILE_CHMOD_INS.'.php') ? $f |
|
| 2486 | 2484 | : false) |
| 2487 | 2485 | ); |
| 2488 | 2486 | } |
@@ -2495,10 +2493,10 @@ discard block |
||
| 2495 | 2493 | define('_FILE_TMP_SUFFIX', '.tmp.php'); |
| 2496 | 2494 | } |
| 2497 | 2495 | if (!defined('_FILE_CONNECT_TMP')) { |
| 2498 | - define('_FILE_CONNECT_TMP', _DIR_CONNECT . _FILE_CONNECT_INS . _FILE_TMP_SUFFIX); |
|
| 2496 | + define('_FILE_CONNECT_TMP', _DIR_CONNECT._FILE_CONNECT_INS._FILE_TMP_SUFFIX); |
|
| 2499 | 2497 | } |
| 2500 | 2498 | if (!defined('_FILE_CHMOD_TMP')) { |
| 2501 | - define('_FILE_CHMOD_TMP', _DIR_CHMOD . _FILE_CHMOD_INS . _FILE_TMP_SUFFIX); |
|
| 2499 | + define('_FILE_CHMOD_TMP', _DIR_CHMOD._FILE_CHMOD_INS._FILE_TMP_SUFFIX); |
|
| 2502 | 2500 | } |
| 2503 | 2501 | |
| 2504 | 2502 | // Definition des droits d'acces en ecriture |
@@ -2516,13 +2514,13 @@ discard block |
||
| 2516 | 2514 | define('_DEFAULT_CHARSET', 'utf-8'); |
| 2517 | 2515 | } |
| 2518 | 2516 | if (!defined('_ROOT_PLUGINS')) { |
| 2519 | - define('_ROOT_PLUGINS', _ROOT_RACINE . 'plugins/'); |
|
| 2517 | + define('_ROOT_PLUGINS', _ROOT_RACINE.'plugins/'); |
|
| 2520 | 2518 | } |
| 2521 | 2519 | if (!defined('_ROOT_PLUGINS_DIST')) { |
| 2522 | - define('_ROOT_PLUGINS_DIST', _ROOT_RACINE . 'plugins-dist/'); |
|
| 2520 | + define('_ROOT_PLUGINS_DIST', _ROOT_RACINE.'plugins-dist/'); |
|
| 2523 | 2521 | } |
| 2524 | 2522 | if (!defined('_ROOT_PLUGINS_SUPPL') && defined('_DIR_PLUGINS_SUPPL') && _DIR_PLUGINS_SUPPL) { |
| 2525 | - define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE . str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL)); |
|
| 2523 | + define('_ROOT_PLUGINS_SUPPL', _ROOT_RACINE.str_replace(_DIR_RACINE, '', _DIR_PLUGINS_SUPPL)); |
|
| 2526 | 2524 | } |
| 2527 | 2525 | |
| 2528 | 2526 | // La taille des Log |
@@ -2559,7 +2557,7 @@ discard block |
||
| 2559 | 2557 | // (non surchargeable en l'etat ; attention si on utilise include_spip() |
| 2560 | 2558 | // pour le rendre surchargeable, on va provoquer un reecriture |
| 2561 | 2559 | // systematique du noyau ou une baisse de perfs => a etudier) |
| 2562 | - include_once _ROOT_RESTREINT . 'inc/flock.php'; |
|
| 2560 | + include_once _ROOT_RESTREINT.'inc/flock.php'; |
|
| 2563 | 2561 | |
| 2564 | 2562 | // charger tout de suite le path et son cache |
| 2565 | 2563 | load_path_cache(); |
@@ -2607,7 +2605,7 @@ discard block |
||
| 2607 | 2605 | !empty($_SERVER['QUERY_STRING']) |
| 2608 | 2606 | and !strpos($_SERVER['REQUEST_URI'], '?') |
| 2609 | 2607 | ) { |
| 2610 | - $GLOBALS['REQUEST_URI'] .= '?' . $_SERVER['QUERY_STRING']; |
|
| 2608 | + $GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING']; |
|
| 2611 | 2609 | } |
| 2612 | 2610 | } |
| 2613 | 2611 | |
@@ -2643,7 +2641,7 @@ discard block |
||
| 2643 | 2641 | ) { |
| 2644 | 2642 | if (isset($GLOBALS['meta']['adresse_site'])) { |
| 2645 | 2643 | $uri_ref = parse_url($GLOBALS['meta']['adresse_site']); |
| 2646 | - $uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '') . '/'; |
|
| 2644 | + $uri_ref = (isset($uri_ref['path']) ? $uri_ref['path'] : '').'/'; |
|
| 2647 | 2645 | } else { |
| 2648 | 2646 | $uri_ref = ''; |
| 2649 | 2647 | } |
@@ -2733,7 +2731,7 @@ discard block |
||
| 2733 | 2731 | } |
| 2734 | 2732 | if (!defined('_CACHE_RUBRIQUES')) { |
| 2735 | 2733 | /** Fichier cache pour le navigateur de rubrique du bandeau */ |
| 2736 | - define('_CACHE_RUBRIQUES', _DIR_TMP . 'menu-rubriques-cache.txt'); |
|
| 2734 | + define('_CACHE_RUBRIQUES', _DIR_TMP.'menu-rubriques-cache.txt'); |
|
| 2737 | 2735 | } |
| 2738 | 2736 | if (!defined('_CACHE_RUBRIQUES_MAX')) { |
| 2739 | 2737 | /** Nombre maxi de rubriques enfants affichées pour chaque rubrique du navigateur de rubrique du bandeau */ |
@@ -2837,7 +2835,7 @@ discard block |
||
| 2837 | 2835 | $memory *= 1024; |
| 2838 | 2836 | } |
| 2839 | 2837 | if ($memory < _MEMORY_LIMIT_MIN * 1024 * 1024) { |
| 2840 | - @ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN . 'M'); |
|
| 2838 | + @ini_set('memory_limit', $m = _MEMORY_LIMIT_MIN.'M'); |
|
| 2841 | 2839 | if (trim(ini_get('memory_limit')) != $m) { |
| 2842 | 2840 | if (!defined('_INTERDIRE_COMPACTE_HEAD_ECRIRE')) { |
| 2843 | 2841 | define('_INTERDIRE_COMPACTE_HEAD_ECRIRE', true); |
@@ -2988,7 +2986,7 @@ discard block |
||
| 2988 | 2986 | } |
| 2989 | 2987 | if (isset($GLOBALS['visiteur_session']['nom'])) { |
| 2990 | 2988 | spip_log($GLOBALS['visiteur_session']['nom'] |
| 2991 | - . ' ' . _VAR_MODE); |
|
| 2989 | + . ' '._VAR_MODE); |
|
| 2992 | 2990 | } |
| 2993 | 2991 | } // pas autorise ? |
| 2994 | 2992 | else { |
@@ -3003,7 +3001,7 @@ discard block |
||
| 3003 | 3001 | if (strpos($self, 'page=login') === false) { |
| 3004 | 3002 | include_spip('inc/headers'); |
| 3005 | 3003 | $redirect = parametre_url(self('&', true), 'var_mode', $_GET['var_mode'], '&'); |
| 3006 | - redirige_par_entete(generer_url_public('login', 'url=' . rawurlencode($redirect), true)); |
|
| 3004 | + redirige_par_entete(generer_url_public('login', 'url='.rawurlencode($redirect), true)); |
|
| 3007 | 3005 | } |
| 3008 | 3006 | } |
| 3009 | 3007 | // sinon tant pis |
@@ -3047,10 +3045,10 @@ discard block |
||
| 3047 | 3045 | // mais on risque de perturber des plugins en initialisant trop tot |
| 3048 | 3046 | // certaines constantes |
| 3049 | 3047 | @spip_initialisation_core( |
| 3050 | - (_DIR_RACINE . _NOM_PERMANENTS_INACCESSIBLES), |
|
| 3051 | - (_DIR_RACINE . _NOM_PERMANENTS_ACCESSIBLES), |
|
| 3052 | - (_DIR_RACINE . _NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 3053 | - (_DIR_RACINE . _NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 3048 | + (_DIR_RACINE._NOM_PERMANENTS_INACCESSIBLES), |
|
| 3049 | + (_DIR_RACINE._NOM_PERMANENTS_ACCESSIBLES), |
|
| 3050 | + (_DIR_RACINE._NOM_TEMPORAIRES_INACCESSIBLES), |
|
| 3051 | + (_DIR_RACINE._NOM_TEMPORAIRES_ACCESSIBLES) |
|
| 3054 | 3052 | ); |
| 3055 | 3053 | |
| 3056 | 3054 | // Demarrer une session NON AUTHENTIFIEE si on donne son nom |
@@ -3083,7 +3081,7 @@ discard block |
||
| 3083 | 3081 | } |
| 3084 | 3082 | |
| 3085 | 3083 | $h = (isset($_SERVER['PHP_AUTH_USER']) and !$GLOBALS['ignore_auth_http']); |
| 3086 | - if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'] . '_session'])) { |
|
| 3084 | + if ($h or isset($_COOKIE['spip_session']) or isset($_COOKIE[$GLOBALS['cookie_prefix'].'_session'])) { |
|
| 3087 | 3085 | $session = charger_fonction('session', 'inc'); |
| 3088 | 3086 | if ($session()) { |
| 3089 | 3087 | return $GLOBALS['visiteur_session']['statut']; |
@@ -3163,7 +3161,7 @@ discard block |
||
| 3163 | 3161 | 'definir_session', |
| 3164 | 3162 | $GLOBALS['visiteur_session'] |
| 3165 | 3163 | ? serialize($GLOBALS['visiteur_session']) |
| 3166 | - . '_' . @$_COOKIE['spip_session'] |
|
| 3164 | + . '_'.@$_COOKIE['spip_session'] |
|
| 3167 | 3165 | : '' |
| 3168 | 3166 | ); |
| 3169 | 3167 | $session = $s ? substr(md5($s), 0, 8) : ''; |
@@ -3319,11 +3317,11 @@ discard block |
||
| 3319 | 3317 | $GLOBALS['_INC_PUBLIC']++; |
| 3320 | 3318 | |
| 3321 | 3319 | // fix #4235 |
| 3322 | - $cache_utilise_session_appelant = (isset($GLOBALS['cache_utilise_session']) ? $GLOBALS['cache_utilise_session'] : null); |
|
| 3320 | + $cache_utilise_session_appelant = (isset($GLOBALS['cache_utilise_session']) ? $GLOBALS['cache_utilise_session'] : null); |
|
| 3323 | 3321 | |
| 3324 | 3322 | |
| 3325 | 3323 | foreach (is_array($fond) ? $fond : [$fond] as $f) { |
| 3326 | - unset($GLOBALS['cache_utilise_session']); // fix #4235 |
|
| 3324 | + unset($GLOBALS['cache_utilise_session']); // fix #4235 |
|
| 3327 | 3325 | |
| 3328 | 3326 | $page = evaluer_fond($f, $contexte, $connect); |
| 3329 | 3327 | if ($page === '') { |
@@ -3408,7 +3406,7 @@ discard block |
||
| 3408 | 3406 | * @return array|string |
| 3409 | 3407 | */ |
| 3410 | 3408 | function trouver_fond($nom, $dir = '', $pathinfo = false) { |
| 3411 | - $f = find_in_path($nom . '.' . _EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/') . '/' : ''); |
|
| 3409 | + $f = find_in_path($nom.'.'._EXTENSION_SQUELETTES, $dir ? rtrim($dir, '/').'/' : ''); |
|
| 3412 | 3410 | if (!$pathinfo) { |
| 3413 | 3411 | return $f; |
| 3414 | 3412 | } |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | if (!$max_age) { |
| 107 | 107 | $max_age = _DEFAULT_LOCKTIME; |
| 108 | 108 | } |
| 109 | - $lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8); |
|
| 109 | + $lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8); |
|
| 110 | 110 | |
| 111 | 111 | |
| 112 | 112 | /* |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | |
| 117 | 117 | $id = creer_uniqid(); |
| 118 | - $tpath = _DIR_TMP . "slock.$id"; |
|
| 118 | + $tpath = _DIR_TMP."slock.$id"; |
|
| 119 | 119 | $tmpfd = @fopen($tpath, 'w'); // hum, le 'x' necessite php4,3,2 ... |
| 120 | 120 | if (!$tmpfd) { /* open failed */ |
| 121 | 121 | @fclose($tmpfd); |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | * thinks the current time is (our_tmp.st_ctime).. |
| 242 | 242 | */ |
| 243 | 243 | |
| 244 | - $tpath = _DIR_TMP . "stime.$id"; |
|
| 244 | + $tpath = _DIR_TMP."stime.$id"; |
|
| 245 | 245 | $tmpfd = @fopen($tpath, 'w'); |
| 246 | 246 | if ( |
| 247 | 247 | (!$tmpfd) |
@@ -255,14 +255,14 @@ discard block |
||
| 255 | 255 | return false; //(NFSL_SYSF); |
| 256 | 256 | } |
| 257 | 257 | |
| 258 | - @fclose($tmpfd); /* We don't need this once we have our_tmp.st_ctime. */ |
|
| 258 | + @fclose($tmpfd); /* We don't need this once we have our_tmp.st_ctime. */ |
|
| 259 | 259 | spip_unlink($tpath); |
| 260 | 260 | |
| 261 | 261 | /* |
| 262 | 262 | * 2. make fullpath, a buffer for the full pathname of the lock file |
| 263 | 263 | */ |
| 264 | 264 | |
| 265 | - $lock_file = _DIR_TMP . _NAME_LOCK . '-' . substr(md5($fichier), 0, 8); |
|
| 265 | + $lock_file = _DIR_TMP._NAME_LOCK.'-'.substr(md5($fichier), 0, 8); |
|
| 266 | 266 | |
| 267 | 267 | /* |
| 268 | 268 | * 3. If the ctime hasn't been modified, unlink the file and return. If the |
@@ -282,10 +282,10 @@ discard block |
||
| 282 | 282 | if (!$test) { |
| 283 | 283 | return false; |
| 284 | 284 | } //(NFSL_LOST); |
| 285 | - sleep(1 + (random(0, 4))); /* so sleep a bit */ |
|
| 285 | + sleep(1 + (random(0, 4))); /* so sleep a bit */ |
|
| 286 | 286 | } |
| 287 | 287 | |
| 288 | - return true;//(NFSL_OK); /* success */ |
|
| 288 | + return true; //(NFSL_OK); /* success */ |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | /* |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | if (isset($data[$root])) { # pas de racine sauf pour les rubriques |
| 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 | } |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | // et voila le travail |
| 177 | - return $r . $sous; |
|
| 177 | + return $r.$sous; |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
@@ -221,12 +221,12 @@ discard block |
||
| 221 | 221 | while ($r = sql_fetch($q)) { |
| 222 | 222 | if (autoriser('voir', 'rubrique', $r['id_rubrique'])) { |
| 223 | 223 | // titre largeur maxi a 50 |
| 224 | - $titre = couper(supprimer_tags(typo($r['titre'])) . ' ', 50); |
|
| 224 | + $titre = couper(supprimer_tags(typo($r['titre'])).' ', 50); |
|
| 225 | 225 | if ( |
| 226 | 226 | $GLOBALS['meta']['multi_rubriques'] == 'oui' |
| 227 | 227 | and ($r['langue_choisie'] == 'oui' or $r['id_parent'] == 0) |
| 228 | 228 | ) { |
| 229 | - $titre .= ' [' . traduire_nom_langue($r['lang']) . ']'; |
|
| 229 | + $titre .= ' ['.traduire_nom_langue($r['lang']).']'; |
|
| 230 | 230 | } |
| 231 | 231 | $data[$r['id_rubrique']] = $titre; |
| 232 | 232 | $enfants[$r['id_parent']][] = $r['id_rubrique']; |
@@ -253,9 +253,9 @@ discard block |
||
| 253 | 253 | $att = " id='id_parent' name='id_parent'\nclass='selecteur_parent verdana1'"; |
| 254 | 254 | |
| 255 | 255 | if (preg_match(',^<option[^<>]*value=.(\d*).[^<>]*>([^<]*)</option>$,', $opt, $r)) { |
| 256 | - $r = "<input$att type='hidden' value='" . $r[1] . "' />" . $r[2]; |
|
| 256 | + $r = "<input$att type='hidden' value='".$r[1]."' />".$r[2]; |
|
| 257 | 257 | } else { |
| 258 | - $r = '<select' . $att . " size='1'>\n$opt</select>\n"; |
|
| 258 | + $r = '<select'.$att." size='1'>\n$opt</select>\n"; |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | # message pour neuneus (a supprimer ?) |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | function selecteur_rubrique_ajax($id_rubrique, $type, $restreint, $idem = 0, $do = 'aff') { |
| 298 | 298 | |
| 299 | 299 | if ($id_rubrique) { |
| 300 | - $titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 300 | + $titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique)); |
|
| 301 | 301 | } else { |
| 302 | 302 | if ($type == 'auteur') { |
| 303 | 303 | $titre = ' '; |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | $titre = str_replace('&', '&', entites_html(textebrut(typo($titre)))); |
| 310 | - $init = " disabled='disabled' type='text' value=\"" . $titre . "\"\nstyle='width:300px;'"; |
|
| 310 | + $init = " disabled='disabled' type='text' value=\"".$titre."\"\nstyle='width:300px;'"; |
|
| 311 | 311 | |
| 312 | 312 | $url = generer_url_ecrire('selectionner', "id=$id_rubrique&type=$type&do=$do" |
| 313 | 313 | . (!$idem ? '' : "&exclus=$idem") |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | . " jQuery(this).toggleClass('toggled'); " |
| 357 | 357 | . "return charger_node_url_si_vide('" |
| 358 | 358 | . $url |
| 359 | - . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='" . attribut_html(_T('titre_image_selecteur')) . "'>" |
|
| 359 | + . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='".attribut_html(_T('titre_image_selecteur'))."'>" |
|
| 360 | 360 | . $img_icone |
| 361 | 361 | . "</a><img src='" |
| 362 | 362 | . chemin_image('loader.svg') |