@@ -39,12 +39,12 @@ discard block |
||
| 39 | 39 | // on renvoi un 401 qui fait echouer la requete ajax silencieusement |
| 40 | 40 | if (!autoriser('ecrire')) { |
| 41 | 41 | $retour = |
| 42 | - '<ul class="deroulant__sous-menu" data-profondeur="1">' . |
|
| 43 | - '<li class="deroulant__item deroulant__item_plan plan_site" data-profondeur="1">' . |
|
| 44 | - '<a class="deroulant__lien" href="' . generer_url_ecrire('accueil') . '" data-profondeur="1">' . |
|
| 45 | - '<span class="libelle">' . _T('public:lien_connecter') . '</span>' . |
|
| 46 | - '</a>' . |
|
| 47 | - '</li>' . |
|
| 42 | + '<ul class="deroulant__sous-menu" data-profondeur="1">'. |
|
| 43 | + '<li class="deroulant__item deroulant__item_plan plan_site" data-profondeur="1">'. |
|
| 44 | + '<a class="deroulant__lien" href="'.generer_url_ecrire('accueil').'" data-profondeur="1">'. |
|
| 45 | + '<span class="libelle">'._T('public:lien_connecter').'</span>'. |
|
| 46 | + '</a>'. |
|
| 47 | + '</li>'. |
|
| 48 | 48 | '</ul>'; |
| 49 | 49 | include_spip('inc/actions'); |
| 50 | 50 | ajax_retour($retour); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | if ($date = intval(_request('date'))) { |
| 55 | - header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $date) . ' GMT'); |
|
| 55 | + header('Last-Modified: '.gmdate('D, d M Y H:i:s', $date).' GMT'); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | $r = gen_liste_rubriques(); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | and !strstr($_SERVER['SERVER_SOFTWARE'], 'IIS/') |
| 63 | 63 | ) { |
| 64 | 64 | include_spip('inc/headers'); |
| 65 | - header('Content-Type: text/html; charset=' . $GLOBALS['meta']['charset']); |
|
| 65 | + header('Content-Type: text/html; charset='.$GLOBALS['meta']['charset']); |
|
| 66 | 66 | http_response_code(304); |
| 67 | 67 | exit; |
| 68 | 68 | } else { |
@@ -85,8 +85,8 @@ discard block |
||
| 85 | 85 | **/ |
| 86 | 86 | function menu_rubriques($complet = true) { |
| 87 | 87 | $ret = '<li class="deroulant__item deroulant__item_tout toutsite" data-profondeur="1">' |
| 88 | - . '<a class="deroulant__lien" href="' . generer_url_ecrire('plan') . '" data-profondeur="1">' |
|
| 89 | - . '<span class="libelle">' . _T('info_tout_site') . '</span>' |
|
| 88 | + . '<a class="deroulant__lien" href="'.generer_url_ecrire('plan').'" data-profondeur="1">' |
|
| 89 | + . '<span class="libelle">'._T('info_tout_site').'</span>' |
|
| 90 | 90 | . '</a>' |
| 91 | 91 | . '</li>'; |
| 92 | 92 | |
@@ -145,8 +145,8 @@ discard block |
||
| 145 | 145 | static $zmax = 6; |
| 146 | 146 | $profondeur_next = $profondeur + 1; |
| 147 | 147 | |
| 148 | - $nav = '<a class="deroulant__lien" href="' . generer_url_entite($id_rubrique, 'rubrique', '', '', false) . "\" data-profondeur=\"$profondeur\">" |
|
| 149 | - . '<span class="libelle">' . supprimer_tags(preg_replace(',[\x00-\x1f]+,', ' ', $titre_rubrique)) . '</span>' |
|
| 148 | + $nav = '<a class="deroulant__lien" href="'.generer_url_entite($id_rubrique, 'rubrique', '', '', false)."\" data-profondeur=\"$profondeur\">" |
|
| 149 | + . '<span class="libelle">'.supprimer_tags(preg_replace(',[\x00-\x1f]+,', ' ', $titre_rubrique)).'</span>' |
|
| 150 | 150 | . "</a>\n"; |
| 151 | 151 | |
| 152 | 152 | // Limiter volontairement le nombre de sous-menus |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | if ($change_session == 'oui') { |
| 60 | 60 | $session = charger_fonction('session', 'inc'); |
| 61 | 61 | $session(true); |
| 62 | - spip_log('statut 204 pour ' . $_SERVER['REQUEST_URI']); |
|
| 62 | + spip_log('statut 204 pour '.$_SERVER['REQUEST_URI']); |
|
| 63 | 63 | http_response_code(204); // No Content |
| 64 | 64 | return; |
| 65 | 65 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | _T('info_connexion_refusee'), |
| 80 | 80 | _T('login_login_pass_incorrect'), |
| 81 | 81 | _T('login_retour_site'), |
| 82 | - 'url=' . rawurlencode($redirect), |
|
| 82 | + 'url='.rawurlencode($redirect), |
|
| 83 | 83 | _T('login_nouvelle_tentative'), |
| 84 | 84 | (strpos($url, _DIR_RESTREINT_ABS) !== false) |
| 85 | 85 | ); |
@@ -79,20 +79,20 @@ discard block |
||
| 79 | 79 | (!$equiv and !spip_cookie_envoye()) or ( |
| 80 | 80 | (!empty($_SERVER['SERVER_SOFTWARE']) |
| 81 | 81 | and _SERVEUR_SOFTWARE_ACCEPTE_LOCATION_APRES_COOKIE |
| 82 | - and preg_match('/' . _SERVEUR_SOFTWARE_ACCEPTE_LOCATION_APRES_COOKIE . '/i', $_SERVER['SERVER_SOFTWARE'])) |
|
| 82 | + and preg_match('/'._SERVEUR_SOFTWARE_ACCEPTE_LOCATION_APRES_COOKIE.'/i', $_SERVER['SERVER_SOFTWARE'])) |
|
| 83 | 83 | or (!empty($_SERVER['SERVER_SIGNATURE']) |
| 84 | 84 | and _SERVEUR_SIGNATURE_ACCEPTE_LOCATION_APRES_COOKIE |
| 85 | - and preg_match('/' . _SERVEUR_SIGNATURE_ACCEPTE_LOCATION_APRES_COOKIE . '/i', $_SERVER['SERVER_SIGNATURE'])) |
|
| 85 | + and preg_match('/'._SERVEUR_SIGNATURE_ACCEPTE_LOCATION_APRES_COOKIE.'/i', $_SERVER['SERVER_SIGNATURE'])) |
|
| 86 | 86 | or function_exists('apache_getenv') |
| 87 | 87 | or defined('_SERVER_APACHE') |
| 88 | 88 | ) |
| 89 | 89 | ) { |
| 90 | - @header('Location: ' . $url); |
|
| 90 | + @header('Location: '.$url); |
|
| 91 | 91 | $equiv = ''; |
| 92 | 92 | } else { |
| 93 | - @header('Refresh: 0; url=' . $url); |
|
| 93 | + @header('Refresh: 0; url='.$url); |
|
| 94 | 94 | if (isset($GLOBALS['meta']['charset'])) { |
| 95 | - @header('Content-Type: text/html; charset=' . $GLOBALS['meta']['charset']); |
|
| 95 | + @header('Content-Type: text/html; charset='.$GLOBALS['meta']['charset']); |
|
| 96 | 96 | } |
| 97 | 97 | $equiv = "<meta http-equiv='Refresh' content='0; url=$url'>"; |
| 98 | 98 | } |
@@ -104,11 +104,11 @@ discard block |
||
| 104 | 104 | html_lang_attributes(), ' |
| 105 | 105 | <head>', |
| 106 | 106 | $equiv, ' |
| 107 | -<title>HTTP ' . $status . '</title> |
|
| 108 | -' . ((isset($GLOBALS['meta']['charset'])) ? '<meta http-equiv="Content-Type" content="text/html;charset=' . $GLOBALS['meta']['charset'] . '">' : '') . ' |
|
| 107 | +<title>HTTP ' . $status.'</title> |
|
| 108 | +' . ((isset($GLOBALS['meta']['charset'])) ? '<meta http-equiv="Content-Type" content="text/html;charset='.$GLOBALS['meta']['charset'].'">' : '').' |
|
| 109 | 109 | </head> |
| 110 | 110 | <body> |
| 111 | -<h1>HTTP ' . $status . '</h1> |
|
| 111 | +<h1>HTTP ' . $status.'</h1> |
|
| 112 | 112 | <a href="', |
| 113 | 113 | quote_amp($url), |
| 114 | 114 | '">', |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | # en theorie on devrait faire ca tout le temps, mais quand la chaine |
| 145 | 145 | # commence par ? c'est imperatif, sinon l'url finale n'est pas la bonne |
| 146 | 146 | if ($url[0] == '?') { |
| 147 | - $url = url_de_base() . $url; |
|
| 147 | + $url = url_de_base().$url; |
|
| 148 | 148 | } |
| 149 | 149 | $url = str_replace('&', '&', $url); |
| 150 | 150 | spip_log("redirige formulaire ajax: $url"); |
@@ -152,9 +152,9 @@ discard block |
||
| 152 | 152 | if ($format == 'ajaxform') { |
| 153 | 153 | return [ |
| 154 | 154 | // on renvoie un lien masque qui sera traite par ajaxCallback.js |
| 155 | - '<a href="' . quote_amp($url) . '" name="ajax_redirect" style="display:none;">' . _T('navigateur_pas_redirige') . '</a>', |
|
| 155 | + '<a href="'.quote_amp($url).'" name="ajax_redirect" style="display:none;">'._T('navigateur_pas_redirige').'</a>', |
|
| 156 | 156 | // et un message au cas ou |
| 157 | - '<br /><a href="' . quote_amp($url) . '">' . _T('navigateur_pas_redirige') . '</a>' |
|
| 157 | + '<br /><a href="'.quote_amp($url).'">'._T('navigateur_pas_redirige').'</a>' |
|
| 158 | 158 | ]; |
| 159 | 159 | } else // format message texte, tout en js inline |
| 160 | 160 | { |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | "<script type='text/javascript'>if (parent.window){parent.window.document.location.replace(\"$url\");} else {document.location.replace(\"$url\");}</script>" |
| 164 | 164 | . http_img_pack('loader.svg', '', " class='loader'") |
| 165 | 165 | . '<br />' |
| 166 | - . '<a href="' . quote_amp($url) . '">' . _T('navigateur_pas_redirige') . '</a>'; |
|
| 166 | + . '<a href="'.quote_amp($url).'">'._T('navigateur_pas_redirige').'</a>'; |
|
| 167 | 167 | } |
| 168 | 168 | } |
| 169 | 169 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | |
| 223 | 223 | header("Content-Type: text/html; charset=$charset"); |
| 224 | 224 | header('Expires: 0'); |
| 225 | - header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |
|
| 225 | + header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
|
| 226 | 226 | header('Cache-Control: no-cache, must-revalidate'); |
| 227 | 227 | header('Pragma: no-cache'); |
| 228 | 228 | } |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | * @return string |
| 334 | 334 | */ |
| 335 | 335 | function _sqlite_func_preg_replace($quoi, $cherche, $remplace) { |
| 336 | - $return = preg_replace('%' . $cherche . '%', $remplace, $quoi); |
|
| 336 | + $return = preg_replace('%'.$cherche.'%', $remplace, $quoi); |
|
| 337 | 337 | |
| 338 | 338 | #spip_log("preg_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); |
| 339 | 339 | return $return; |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | // il faut enlever un niveau d'echappement pour être homogène à mysql |
| 410 | 410 | $cherche = str_replace('\\\\', '\\', $cherche); |
| 411 | 411 | $u = isset($GLOBALS['meta']['pcre_u']) ? $GLOBALS['meta']['pcre_u'] : 'u'; |
| 412 | - $return = preg_match('%' . $cherche . '%imsS' . $u, $quoi); |
|
| 412 | + $return = preg_match('%'.$cherche.'%imsS'.$u, $quoi); |
|
| 413 | 413 | |
| 414 | 414 | #spip_log("regexp_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); |
| 415 | 415 | return $return; |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | $count = 0; |
| 462 | 462 | str_replace($mysql_to_strftime_not_ok, '', $conv, $count); |
| 463 | 463 | if ($count > 0) { |
| 464 | - spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.' . _LOG_ERREUR); |
|
| 464 | + spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.'._LOG_ERREUR); |
|
| 465 | 465 | } |
| 466 | 466 | $to_strftime[$conv] = str_replace(array_keys($mysql_to_strftime), $mysql_to_strftime, $conv); |
| 467 | 467 | } |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | */ |
| 481 | 481 | function _sqlite_func_to_days($d) { |
| 482 | 482 | static $offset = 719528; // nb de jour entre 0000-00-00 et timestamp 0=1970-01-01 |
| 483 | - $result = $offset + (int)ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600)); |
|
| 483 | + $result = $offset + (int) ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600)); |
|
| 484 | 484 | |
| 485 | 485 | #spip_log("Passage avec TO_DAYS : $d, $result",'sqlite.'._LOG_DEBUG); |
| 486 | 486 | return $result; |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | function generer_nom_fichier_cache($contexte, $page) { |
| 30 | 30 | $u = md5(var_export([$contexte, $page], true)); |
| 31 | 31 | |
| 32 | - return $u . '.cache'; |
|
| 32 | + return $u.'.cache'; |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -61,10 +61,10 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | else { |
| 63 | 63 | // en lecture on essaye pas de creer les repertoires, on va au plus vite |
| 64 | - $rep = _DIR_CACHE . "calcul/$d/"; |
|
| 64 | + $rep = _DIR_CACHE."calcul/$d/"; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - return $rep . $u . '.cache'; |
|
| 67 | + return $rep.$u.'.cache'; |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | /** |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | ); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - return crc32($GLOBALS['meta']['cache_signature'] . $page['texte']); |
|
| 118 | + return crc32($GLOBALS['meta']['cache_signature'].$page['texte']); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | // "cache sessionne" ; sa date indique la date de validite |
| 272 | 272 | // des caches sessionnes |
| 273 | 273 | if (!$tmp = lire_cache($chemin_cache)) { |
| 274 | - spip_log('Creation cache sessionne ' . $chemin_cache); |
|
| 274 | + spip_log('Creation cache sessionne '.$chemin_cache); |
|
| 275 | 275 | $tmp = [ |
| 276 | 276 | 'invalideurs' => ['session' => ''], |
| 277 | 277 | 'lastmodified' => $_SERVER['REQUEST_TIME'] |
@@ -297,8 +297,8 @@ discard block |
||
| 297 | 297 | // l'enregistrer, compresse ou non... |
| 298 | 298 | $ok = ecrire_cache($chemin_cache, $pagez); |
| 299 | 299 | |
| 300 | - spip_log((_IS_BOT ? 'Bot:' : '') . "Creation du cache $chemin_cache pour " |
|
| 301 | - . $page['entetes']['X-Spip-Cache'] . ' secondes' . ($ok ? '' : ' (erreur!)'), _LOG_INFO); |
|
| 300 | + spip_log((_IS_BOT ? 'Bot:' : '')."Creation du cache $chemin_cache pour " |
|
| 301 | + . $page['entetes']['X-Spip-Cache'].' secondes'.($ok ? '' : ' (erreur!)'), _LOG_INFO); |
|
| 302 | 302 | |
| 303 | 303 | // Inserer ses invalideurs |
| 304 | 304 | include_spip('inc/invalideur'); |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | function nettoyer_petit_cache($prefix, $duree = 300) { |
| 320 | 320 | // determiner le repertoire a purger : 'tmp/CACHE/rech/' |
| 321 | 321 | $dircache = sous_repertoire(_DIR_CACHE, $prefix); |
| 322 | - if (spip_touch($dircache . 'purger_' . $prefix, $duree, true)) { |
|
| 322 | + if (spip_touch($dircache.'purger_'.$prefix, $duree, true)) { |
|
| 323 | 323 | foreach (preg_files($dircache, '[.]txt$') as $f) { |
| 324 | 324 | if ($_SERVER['REQUEST_TIME'] - (@file_exists($f) ? @filemtime($f) : 0) > $duree) { |
| 325 | 325 | spip_unlink($f); |
@@ -414,9 +414,9 @@ discard block |
||
| 414 | 414 | if (spip_connect()) { |
| 415 | 415 | include_spip('inc/invalideur'); |
| 416 | 416 | retire_caches($chemin_cache); # API invalideur inutile |
| 417 | - supprimer_fichier(_DIR_CACHE . $chemin_cache); |
|
| 417 | + supprimer_fichier(_DIR_CACHE.$chemin_cache); |
|
| 418 | 418 | if (isset($chemin_cache_session) and $chemin_cache_session) { |
| 419 | - supprimer_fichier(_DIR_CACHE . $chemin_cache_session); |
|
| 419 | + supprimer_fichier(_DIR_CACHE.$chemin_cache_session); |
|
| 420 | 420 | } |
| 421 | 421 | } |
| 422 | 422 | } |
@@ -433,9 +433,9 @@ discard block |
||
| 433 | 433 | $page = ['contexte_implicite' => $contexte_implicite]; // ignorer le cache deja lu |
| 434 | 434 | include_spip('inc/invalideur'); |
| 435 | 435 | retire_caches($chemin_cache); # API invalideur inutile |
| 436 | - supprimer_fichier(_DIR_CACHE . $chemin_cache); |
|
| 436 | + supprimer_fichier(_DIR_CACHE.$chemin_cache); |
|
| 437 | 437 | if (isset($chemin_cache_session) and $chemin_cache_session) { |
| 438 | - supprimer_fichier(_DIR_CACHE . $chemin_cache_session); |
|
| 438 | + supprimer_fichier(_DIR_CACHE.$chemin_cache_session); |
|
| 439 | 439 | } |
| 440 | 440 | } |
| 441 | 441 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | ) { |
| 29 | 29 | // si l'url est une url du site, on la laisse passer sans rien faire |
| 30 | 30 | // c'est encore le plus simple |
| 31 | - $base = $GLOBALS['meta']['adresse_site'] . '/'; |
|
| 31 | + $base = $GLOBALS['meta']['adresse_site'].'/'; |
|
| 32 | 32 | if (strlen($base) and strncmp($redirect, $base, strlen($base)) == 0) { |
| 33 | 33 | return $redirect; |
| 34 | 34 | } |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | if ($ancre = _request('var_ajax_ancre')) { |
| 157 | 157 | // pas n'importe quoi quand meme dans la variable ! |
| 158 | 158 | $ancre = str_replace(['<', '"', "'"], ['<', '"', ''], $ancre); |
| 159 | - $texte = "<a href='#$ancre' name='ajax_ancre' style='display:none;'>anchor</a>" . $texte; |
|
| 159 | + $texte = "<a href='#$ancre' name='ajax_ancre' style='display:none;'>anchor</a>".$texte; |
|
| 160 | 160 | } |
| 161 | 161 | } else { |
| 162 | 162 | include_spip('inc/headers'); |
@@ -199,26 +199,26 @@ discard block |
||
| 199 | 199 | $sign = _request('formulaire_action_sign'); |
| 200 | 200 | if (!empty($GLOBALS['visiteur_session']['id_auteur'])) { |
| 201 | 201 | if (empty($sign)) { |
| 202 | - spip_log("signature ajax form incorrecte : $form (formulaire non signe mais on a une session)", 'formulaires' . _LOG_ERREUR); |
|
| 202 | + spip_log("signature ajax form incorrecte : $form (formulaire non signe mais on a une session)", 'formulaires'._LOG_ERREUR); |
|
| 203 | 203 | return false; |
| 204 | 204 | } |
| 205 | 205 | $securiser_action = charger_fonction('securiser_action', 'inc'); |
| 206 | 206 | $secu = $securiser_action($form, $args, '', -1); |
| 207 | 207 | if ($sign !== $secu['hash']) { |
| 208 | - spip_log("signature ajax form incorrecte : $form (formulaire signe mais ne correspond pas a la session)", 'formulaires' . _LOG_ERREUR); |
|
| 208 | + spip_log("signature ajax form incorrecte : $form (formulaire signe mais ne correspond pas a la session)", 'formulaires'._LOG_ERREUR); |
|
| 209 | 209 | return false; |
| 210 | 210 | } |
| 211 | 211 | } |
| 212 | 212 | else { |
| 213 | 213 | if (!empty($sign)) { |
| 214 | - spip_log("signature ajax form incorrecte : $form (formulaire signe mais pas de session)", 'formulaires' . _LOG_ERREUR); |
|
| 214 | + spip_log("signature ajax form incorrecte : $form (formulaire signe mais pas de session)", 'formulaires'._LOG_ERREUR); |
|
| 215 | 215 | return false; |
| 216 | 216 | } |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | include_spip('inc/filtres'); |
| 220 | 220 | if (($args = decoder_contexte_ajax($args, $form)) === false) { |
| 221 | - spip_log("signature ajax form incorrecte : $form (encodage corrompu)", 'formulaires' . _LOG_ERREUR); |
|
| 221 | + spip_log("signature ajax form incorrecte : $form (encodage corrompu)", 'formulaires'._LOG_ERREUR); |
|
| 222 | 222 | |
| 223 | 223 | return false; // continuons le hit comme si de rien etait |
| 224 | 224 | } else { |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | // on ajoute un br en display none en tete du retour ajax pour regler un bug dans IE6/7 |
| 336 | 336 | // sans cela le formulaire n'est pas actif apres le hit ajax |
| 337 | 337 | // la classe ajax-form-is-ok sert a s'assurer que le retour ajax s'est bien passe |
| 338 | - $retour = "<br class='bugajaxie ajax-form-is-ok' style='display:none;'/>" . $retour; |
|
| 338 | + $retour = "<br class='bugajaxie ajax-form-is-ok' style='display:none;'/>".$retour; |
|
| 339 | 339 | ajax_retour($retour, false); |
| 340 | 340 | |
| 341 | 341 | return true; // on a fini le hit |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | function surligner_mots($page, $surcharge_surligne = '') { |
| 38 | 38 | $surlignejs_engines = [ |
| 39 | 39 | [ |
| 40 | - ',' . str_replace(['/', '.'], ['\/', '\.'], $GLOBALS['meta']['adresse_site']) . ',i', |
|
| 40 | + ','.str_replace(['/', '.'], ['\/', '\.'], $GLOBALS['meta']['adresse_site']).',i', |
|
| 41 | 41 | ',recherche=([^&]+),i' |
| 42 | 42 | ], //SPIP |
| 43 | 43 | [',^http://(www\.)?google\.,i', ',q=([^&]+),i'], // Google |
@@ -72,19 +72,19 @@ discard block |
||
| 72 | 72 | //good referrer found or var_recherche is not null |
| 73 | 73 | include_spip('inc/filtres'); |
| 74 | 74 | $script = " |
| 75 | - <script type='text/javascript' src='" . url_absolue(find_in_path('javascript/SearchHighlight.js')) . "'></script> |
|
| 75 | + <script type='text/javascript' src='" . url_absolue(find_in_path('javascript/SearchHighlight.js'))."'></script> |
|
| 76 | 76 | <script type='text/javascript'> |
| 77 | 77 | var highlighter = function() { |
| 78 | 78 | jQuery(this).SearchHighlight({ |
| 79 | - tag_name:'" . (html5_permis() ? 'mark' : 'span') . "', |
|
| 79 | + tag_name:'" . (html5_permis() ? 'mark' : 'span')."', |
|
| 80 | 80 | style_name:'spip_surligne', |
| 81 | 81 | exact:'whole', |
| 82 | 82 | style_name_suffix:false, |
| 83 | - engines:[/^" . str_replace(['/', '.'], ['\/', '\.'], $GLOBALS['meta']['adresse_site']) . "/i,/recherche=([^&]+)/i], |
|
| 83 | + engines:[/^" . str_replace(['/', '.'], ['\/', '\.'], $GLOBALS['meta']['adresse_site'])."/i,/recherche=([^&]+)/i], |
|
| 84 | 84 | highlight:'.surlignable', |
| 85 | 85 | nohighlight:'.pas_surlignable'" . |
| 86 | 86 | ($surcharge_surligne ? ", |
| 87 | - keys:'$surcharge_surligne'" : '') . ', |
|
| 87 | + keys:'$surcharge_surligne'" : '').', |
|
| 88 | 88 | min_length: 3 |
| 89 | 89 | }); |
| 90 | 90 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | // Appels incomplets (sans $c) |
| 115 | 115 | if (!is_array($c)) { |
| 116 | - spip_log('erreur appel objet_modifier_champs(' . $objet . '), manque $c'); |
|
| 116 | + spip_log('erreur appel objet_modifier_champs('.$objet.'), manque $c'); |
|
| 117 | 117 | |
| 118 | 118 | return _T('erreur_technique_enregistrement_impossible'); |
| 119 | 119 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $champs = array_map('corriger_caracteres', $champs); |
| 147 | 147 | |
| 148 | 148 | // On récupère l'état avant toute modification |
| 149 | - $row = sql_fetsel('*', $spip_table_objet, $id_table_objet . '=' . $id_objet); |
|
| 149 | + $row = sql_fetsel('*', $spip_table_objet, $id_table_objet.'='.$id_objet); |
|
| 150 | 150 | |
| 151 | 151 | // Envoyer aux plugins |
| 152 | 152 | $champs = pipeline( |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | $id_rubrique = 0; |
| 201 | 201 | if (isset($desc['field']['id_rubrique'])) { |
| 202 | 202 | $parent = ($objet == 'rubrique') ? 'id_parent' : 'id_rubrique'; |
| 203 | - $id_rubrique = sql_getfetsel($parent, $spip_table_objet, "$id_table_objet=" . intval($id_objet)); |
|
| 203 | + $id_rubrique = sql_getfetsel($parent, $spip_table_objet, "$id_table_objet=".intval($id_objet)); |
|
| 204 | 204 | } |
| 205 | 205 | $instituer_langue_objet = charger_fonction('instituer_langue_objet', 'action'); |
| 206 | 206 | $champs['lang'] = $instituer_langue_objet($objet, $id_objet, $id_rubrique, $changer_lang, $serveur); |
@@ -222,13 +222,13 @@ discard block |
||
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | // allez on commit la modif |
| 225 | - sql_updateq($spip_table_objet, $champs, "$id_table_objet=" . intval($id_objet), $serveur); |
|
| 225 | + sql_updateq($spip_table_objet, $champs, "$id_table_objet=".intval($id_objet), $serveur); |
|
| 226 | 226 | |
| 227 | 227 | // on verifie si elle est bien passee |
| 228 | 228 | $moof = sql_fetsel( |
| 229 | 229 | array_keys($champs), |
| 230 | 230 | $spip_table_objet, |
| 231 | - "$id_table_objet=" . intval($id_objet), |
|
| 231 | + "$id_table_objet=".intval($id_objet), |
|
| 232 | 232 | [], |
| 233 | 233 | [], |
| 234 | 234 | '', |
@@ -264,13 +264,13 @@ discard block |
||
| 264 | 264 | // c'est un cas exceptionnel |
| 265 | 265 | if (count($liste)) { |
| 266 | 266 | spip_log( |
| 267 | - "Erreur enregistrement en base $objet/$id_objet champs :" . var_export($conflits, true), |
|
| 268 | - 'modifier.' . _LOG_CRITIQUE |
|
| 267 | + "Erreur enregistrement en base $objet/$id_objet champs :".var_export($conflits, true), |
|
| 268 | + 'modifier.'._LOG_CRITIQUE |
|
| 269 | 269 | ); |
| 270 | 270 | |
| 271 | 271 | return _T( |
| 272 | 272 | 'erreur_technique_enregistrement_champs', |
| 273 | - ['champs' => "<i>'" . implode("'</i>,<i>'", $liste) . "'</i>"] |
|
| 273 | + ['champs' => "<i>'".implode("'</i>,<i>'", $liste)."'</i>"] |
|
| 274 | 274 | ); |
| 275 | 275 | } |
| 276 | 276 | } |
@@ -312,18 +312,18 @@ discard block |
||
| 312 | 312 | include_spip('inc/filtres_mini'); |
| 313 | 313 | $qui = ''; |
| 314 | 314 | if (!empty($GLOBALS['visiteur_session']['id_auteur'])) { |
| 315 | - $qui .= ' #id_auteur:' . $GLOBALS['visiteur_session']['id_auteur'] . '#'; |
|
| 315 | + $qui .= ' #id_auteur:'.$GLOBALS['visiteur_session']['id_auteur'].'#'; |
|
| 316 | 316 | } |
| 317 | 317 | if (!empty($GLOBALS['visiteur_session']['nom'])) { |
| 318 | - $qui .= ' #nom:' . $GLOBALS['visiteur_session']['nom'] . '#'; |
|
| 318 | + $qui .= ' #nom:'.$GLOBALS['visiteur_session']['nom'].'#'; |
|
| 319 | 319 | } |
| 320 | 320 | if ($qui == '') { |
| 321 | - $qui = '#ip:' . $GLOBALS['ip'] . '#'; |
|
| 321 | + $qui = '#ip:'.$GLOBALS['ip'].'#'; |
|
| 322 | 322 | } |
| 323 | - journal(_L($qui . ' a édité ' . $objet . ' ' . $id_objet . ' (' . join( |
|
| 323 | + journal(_L($qui.' a édité '.$objet.' '.$id_objet.' ('.join( |
|
| 324 | 324 | '+', |
| 325 | 325 | array_diff(array_keys($champs), ['date_modif']) |
| 326 | - ) . ')'), [ |
|
| 326 | + ).')'), [ |
|
| 327 | 327 | 'faire' => 'modifier', |
| 328 | 328 | 'quoi' => $objet, |
| 329 | 329 | 'id' => $id_objet |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $select = true |
| 125 | 125 | ) { |
| 126 | 126 | if (!is_string($defaut)) { |
| 127 | - $defaut = '($Pile[0][\'' . strtolower($nom_champ) . '\'] ?? null)'; |
|
| 127 | + $defaut = '($Pile[0][\''.strtolower($nom_champ).'\'] ?? null)'; |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | $idb_origine = $idb; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | } |
| 158 | 158 | // renseigner la boucle source de ce champ pour les traitements |
| 159 | 159 | $boucles[$idb_origine]->index_champ[$nom_champ_origine] = $idb; |
| 160 | - $champ = '$Pile[$SP' . ($i ? "-$i" : '') . '][\'' . $c . '\']'; |
|
| 160 | + $champ = '$Pile[$SP'.($i ? "-$i" : '').'][\''.$c.'\']'; |
|
| 161 | 161 | if (!$joker) { |
| 162 | 162 | return index_compose($conditionnel, $champ); |
| 163 | 163 | } |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | function index_compose($conditionnel, $defaut) { |
| 199 | 199 | while ($c = array_pop($conditionnel)) { |
| 200 | 200 | // si on passe defaut = '', ne pas générer d'erreur de compilation. |
| 201 | - $defaut = "($c:(" . ($defaut ? $defaut : "''") . '))'; |
|
| 201 | + $defaut = "($c:(".($defaut ? $defaut : "''").'))'; |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | return $defaut; |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | if (!$r) { |
| 246 | 246 | $joker = false; // indiquer a l'appelant |
| 247 | 247 | # continuer pour chercher l'erreur suivante |
| 248 | - return ["'#" . $r . ':' . $nom_champ . "'", '']; |
|
| 248 | + return ["'#".$r.':'.$nom_champ."'", '']; |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | $desc = $boucles[$idb]->show; |
@@ -348,8 +348,8 @@ discard block |
||
| 348 | 348 | $t = $index_exception_derogatoire($boucle, $desc, $nom_champ, $excep); |
| 349 | 349 | } |
| 350 | 350 | if ($t == null) { |
| 351 | - list($e, $x) = $excep; #PHP4 affecte de gauche a droite |
|
| 352 | - $excep = $x; #PHP5 de droite a gauche ! |
|
| 351 | + list($e, $x) = $excep; #PHP4 affecte de gauche a droite |
|
| 352 | + $excep = $x; #PHP5 de droite a gauche ! |
|
| 353 | 353 | $j = $trouver_table($e, $boucle->sql_serveur); |
| 354 | 354 | if (!$j) { |
| 355 | 355 | return ['', '']; |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | $l = (preg_split('/\s*,\s*/', $k)); |
| 362 | 362 | $k = $desc['key']['PRIMARY KEY']; |
| 363 | 363 | if (!in_array($k, $l)) { |
| 364 | - spip_log("jointure impossible $e " . join(',', $l)); |
|
| 364 | + spip_log("jointure impossible $e ".join(',', $l)); |
|
| 365 | 365 | |
| 366 | 366 | return ['', '']; |
| 367 | 367 | } |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | // demander a SQL de gerer le synonyme |
| 378 | 378 | // ca permet que excep soit dynamique (Cedric, 2/3/06) |
| 379 | 379 | if ($excep != $nom_champ) { |
| 380 | - $excep .= ' AS ' . $nom_champ; |
|
| 380 | + $excep .= ' AS '.$nom_champ; |
|
| 381 | 381 | } |
| 382 | 382 | |
| 383 | 383 | return ["$t.$excep", $nom_champ]; |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | join(',', $collecte), |
| 612 | 612 | ($collecte ? $param : substr($param, 1)), # virer la virgule |
| 613 | 613 | memoriser_contexte_compil($p), |
| 614 | - (!$supp ? '' : (', ' . join(',', $supp))) |
|
| 614 | + (!$supp ? '' : (', '.join(',', $supp))) |
|
| 615 | 615 | ); |
| 616 | 616 | |
| 617 | 617 | $p->interdire_scripts = false; |
@@ -709,7 +709,7 @@ discard block |
||
| 709 | 709 | $nom = $p->id_boucle; |
| 710 | 710 | |
| 711 | 711 | if ($nom and trouver_nom_serveur_distant($p)) { |
| 712 | - spip_log($nom . ':' . $p->nom_champ . ' ' . _T('zbug_distant_interdit')); |
|
| 712 | + spip_log($nom.':'.$p->nom_champ.' '._T('zbug_distant_interdit')); |
|
| 713 | 713 | |
| 714 | 714 | return false; |
| 715 | 715 | } |
@@ -795,7 +795,7 @@ discard block |
||
| 795 | 795 | (strpos($ps, 'typo') !== false) |
| 796 | 796 | ) |
| 797 | 797 | ) { |
| 798 | - $ps = 'traiter_doublons_documents($doublons, ' . $ps . ')'; |
|
| 798 | + $ps = 'traiter_doublons_documents($doublons, '.$ps.')'; |
|
| 799 | 799 | } |
| 800 | 800 | |
| 801 | 801 | // La protection des champs par |safehtml est assuree par les extensions |
@@ -916,7 +916,7 @@ discard block |
||
| 916 | 916 | function compose_filtres_args($p, $args, $sep) { |
| 917 | 917 | $arglist = ''; |
| 918 | 918 | foreach ($args as $arg) { |
| 919 | - $arglist .= $sep . |
|
| 919 | + $arglist .= $sep. |
|
| 920 | 920 | calculer_liste($arg, $p->descr, $p->boucles, $p->id_boucle); |
| 921 | 921 | } |
| 922 | 922 | |
@@ -967,7 +967,7 @@ discard block |
||
| 967 | 967 | while ($b != '') { |
| 968 | 968 | foreach ($p->boucles[$b]->criteres as $critere) { |
| 969 | 969 | if ($critere->op == $motif) { |
| 970 | - $p->code = '$Pile[$SP' . (($n == 0) ? '' : "-$n") . |
|
| 970 | + $p->code = '$Pile[$SP'.(($n == 0) ? '' : "-$n"). |
|
| 971 | 971 | "]['$champ']"; |
| 972 | 972 | $b = ''; |
| 973 | 973 | break 2; |
@@ -995,6 +995,6 @@ discard block |
||
| 995 | 995 | */ |
| 996 | 996 | function zbug_presenter_champ($p, $champ = '') { |
| 997 | 997 | $balise = $champ ? $champ : $p->nom_champ; |
| 998 | - $explicite = $p->nom_boucle ? $p->nom_boucle . ':' : ''; |
|
| 998 | + $explicite = $p->nom_boucle ? $p->nom_boucle.':' : ''; |
|
| 999 | 999 | return "#{$explicite}{$balise}"; |
| 1000 | 1000 | } |