@@ -28,7 +28,7 @@ |
||
| 28 | 28 | return; |
| 29 | 29 | } |
| 30 | 30 | if ($opt) { |
| 31 | - $phrase .= ' :: ' . str_replace("\n", ' ', join(', ', $opt)); |
|
| 31 | + $phrase .= ' :: '.str_replace("\n", ' ', join(', ', $opt)); |
|
| 32 | 32 | } |
| 33 | 33 | spip_log($phrase, 'journal'); |
| 34 | 34 | } |
@@ -31,11 +31,11 @@ discard block |
||
| 31 | 31 | case is_null($var): |
| 32 | 32 | return 'null'; |
| 33 | 33 | case is_string($var): |
| 34 | - return '"' . addcslashes($var, "\"\\\n\r/") . '"'; |
|
| 34 | + return '"'.addcslashes($var, "\"\\\n\r/").'"'; |
|
| 35 | 35 | case is_bool($var): |
| 36 | 36 | return $var ? 'true' : 'false'; |
| 37 | 37 | case is_scalar($var): |
| 38 | - return (string)$var; |
|
| 38 | + return (string) $var; |
|
| 39 | 39 | case is_object($var):// blam |
| 40 | 40 | $var = get_object_vars($var); |
| 41 | 41 | $asso = true; |
@@ -50,19 +50,19 @@ discard block |
||
| 50 | 50 | if ($asso) { |
| 51 | 51 | $ret = '{'; |
| 52 | 52 | foreach ($var as $key => $elt) { |
| 53 | - $ret .= $sep . '"' . $key . '":' . var2js($elt); |
|
| 53 | + $ret .= $sep.'"'.$key.'":'.var2js($elt); |
|
| 54 | 54 | $sep = ','; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - return $ret . '}'; |
|
| 57 | + return $ret.'}'; |
|
| 58 | 58 | } else { |
| 59 | 59 | $ret = '['; |
| 60 | 60 | foreach ($var as $elt) { |
| 61 | - $ret .= $sep . var2js($elt); |
|
| 61 | + $ret .= $sep.var2js($elt); |
|
| 62 | 62 | $sep = ','; |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - return $ret . ']'; |
|
| 65 | + return $ret.']'; |
|
| 66 | 66 | } |
| 67 | 67 | } |
| 68 | 68 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | // flag indiquant qu'on est en iframe et qu'il faut proteger nos |
| 83 | 83 | // donnees dans un <textarea> ; attention $_FILES a ete vide par array_pop |
| 84 | 84 | if (defined('FILE_UPLOAD')) { |
| 85 | - return '<textarea>' . spip_htmlspecialchars($var) . '</textarea>'; |
|
| 85 | + return '<textarea>'.spip_htmlspecialchars($var).'</textarea>'; |
|
| 86 | 86 | } else { |
| 87 | 87 | return $var; |
| 88 | 88 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | $coupe_url = defined('_MAX_COUPE_URL') ? _MAX_COUPE_URL : 35; |
| 27 | 27 | |
| 28 | 28 | if (strlen($url) > $long_url) { |
| 29 | - $url = substr($url, 0, $coupe_url) . '...'; |
|
| 29 | + $url = substr($url, 0, $coupe_url).'...'; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | return $url; |
@@ -57,8 +57,8 @@ discard block |
||
| 57 | 57 | $namespace[null] = null; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | - $name = strtolower((string)$obj->getName()); |
|
| 61 | - $text = trim((string)$obj); |
|
| 60 | + $name = strtolower((string) $obj->getName()); |
|
| 61 | + $text = trim((string) $obj); |
|
| 62 | 62 | if (strlen($text) <= 0) { |
| 63 | 63 | $text = null; |
| 64 | 64 | } |
@@ -71,10 +71,10 @@ discard block |
||
| 71 | 71 | // attributes |
| 72 | 72 | $objAttributes = $obj->attributes($ns, true); |
| 73 | 73 | foreach ($objAttributes as $attributeName => $attributeValue) { |
| 74 | - $attribName = strtolower(trim((string)$attributeName)); |
|
| 75 | - $attribVal = trim((string)$attributeValue); |
|
| 74 | + $attribName = strtolower(trim((string) $attributeName)); |
|
| 75 | + $attribVal = trim((string) $attributeValue); |
|
| 76 | 76 | if (!empty($ns)) { |
| 77 | - $attribName = $ns . ':' . $attribName; |
|
| 77 | + $attribName = $ns.':'.$attribName; |
|
| 78 | 78 | } |
| 79 | 79 | $attributes[$attribName] = $attribVal; |
| 80 | 80 | } |
@@ -82,9 +82,9 @@ discard block |
||
| 82 | 82 | // children |
| 83 | 83 | $objChildren = $obj->children($ns, true); |
| 84 | 84 | foreach ($objChildren as $childName => $child) { |
| 85 | - $childName = strtolower((string)$childName); |
|
| 85 | + $childName = strtolower((string) $childName); |
|
| 86 | 86 | if (!empty($ns)) { |
| 87 | - $childName = $ns . ':' . $childName; |
|
| 87 | + $childName = $ns.':'.$childName; |
|
| 88 | 88 | } |
| 89 | 89 | $children[$childName][] = xmlObjToArr($child, $namespace); |
| 90 | 90 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * Code HTML du formulaire |
| 79 | 79 | */ |
| 80 | 80 | function redirige_action_auteur($action, $arg, $ret, $gra = '', $mode = false, $atts = '', $public = false) { |
| 81 | - $r = ($public ? _DIR_RESTREINT_ABS : _DIR_RESTREINT) . generer_url_ecrire($ret, $gra, true, true); |
|
| 81 | + $r = ($public ? _DIR_RESTREINT_ABS : _DIR_RESTREINT).generer_url_ecrire($ret, $gra, true, true); |
|
| 82 | 82 | |
| 83 | 83 | return generer_action_auteur($action, $arg, $r, $mode, $atts, $public); |
| 84 | 84 | } |
@@ -105,9 +105,9 @@ discard block |
||
| 105 | 105 | * URL, code HTML du formulaire ou tableau (action, arg, hash) |
| 106 | 106 | */ |
| 107 | 107 | function redirige_action_post($action, $arg, $ret, $gra, $corps, $att = '') { |
| 108 | - $r = _DIR_RESTREINT . generer_url_ecrire($ret, $gra, false, true); |
|
| 108 | + $r = _DIR_RESTREINT.generer_url_ecrire($ret, $gra, false, true); |
|
| 109 | 109 | |
| 110 | - return generer_action_auteur($action, $arg, $r, $corps, $att . " method='post'"); |
|
| 110 | + return generer_action_auteur($action, $arg, $r, $corps, $att." method='post'"); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | |
@@ -138,8 +138,8 @@ discard block |
||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | $c = $GLOBALS['meta']['charset']; |
| 141 | - header('Content-Type: ' . $content_type . '; charset=' . $c); |
|
| 142 | - $debut = (($xml and strlen(trim($corps))) ? '<' . "?xml version='1.0' encoding='" . $c . "'?" . ">\n" : ''); |
|
| 141 | + header('Content-Type: '.$content_type.'; charset='.$c); |
|
| 142 | + $debut = (($xml and strlen(trim($corps))) ? '<'."?xml version='1.0' encoding='".$c."'?".">\n" : ''); |
|
| 143 | 143 | $fin = ''; |
| 144 | 144 | |
| 145 | 145 | echo $debut, $corps, $fin, $e; |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | // On reexecute pour deboucher sur le include public. |
| 27 | 27 | // autrement on insiste |
| 28 | 28 | if (is_array($var_auth)) { |
| 29 | - $var_auth = '../?' . $_SERVER['QUERY_STRING']; |
|
| 29 | + $var_auth = '../?'.$_SERVER['QUERY_STRING']; |
|
| 30 | 30 | spip_setcookie('spip_session', $_COOKIE['spip_session'], [ |
| 31 | 31 | 'expires' => time() + 3600 * 24 * 14 |
| 32 | 32 | ]); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - $name = preg_replace('/^spip_/', $GLOBALS['cookie_prefix'] . '_', $name); |
|
| 77 | + $name = preg_replace('/^spip_/', $GLOBALS['cookie_prefix'].'_', $name); |
|
| 78 | 78 | |
| 79 | 79 | // expires |
| 80 | 80 | if (!isset($options['expires'])) { |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | } |
| 158 | 158 | foreach ($_COOKIE as $name => $value) { |
| 159 | 159 | if (substr($name, 0, $prefix_long) == $cookie_prefix) { |
| 160 | - $spipname = preg_replace('/^' . $cookie_prefix . '_/', 'spip_', $name); |
|
| 160 | + $spipname = preg_replace('/^'.$cookie_prefix.'_/', 'spip_', $name); |
|
| 161 | 161 | $_COOKIE[$spipname] = $value; |
| 162 | 162 | $GLOBALS[$spipname] = $value; |
| 163 | 163 | } |
@@ -15,10 +15,10 @@ discard block |
||
| 15 | 15 | * Test utilisateur |
| 16 | 16 | */ |
| 17 | 17 | if (isset($_GET['test_ecran_securite'])) { |
| 18 | - $ecran_securite_raison = 'test ' . _ECRAN_SECURITE; |
|
| 18 | + $ecran_securite_raison = 'test '._ECRAN_SECURITE; |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | -if (file_exists($f = __DIR__ . DIRECTORY_SEPARATOR . 'ecran_securite_options.php')) { |
|
| 21 | +if (file_exists($f = __DIR__.DIRECTORY_SEPARATOR.'ecran_securite_options.php')) { |
|
| 22 | 22 | include ($f); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -226,8 +226,8 @@ discard block |
||
| 226 | 226 | 'yats', |
| 227 | 227 | 'yeti', |
| 228 | 228 | 'zeerch' |
| 229 | - )) . ',i', |
|
| 230 | - (string)$_SERVER['HTTP_USER_AGENT'] |
|
| 229 | + )).',i', |
|
| 230 | + (string) $_SERVER['HTTP_USER_AGENT'] |
|
| 231 | 231 | ) |
| 232 | 232 | ); |
| 233 | 233 | } |
@@ -236,13 +236,13 @@ discard block |
||
| 236 | 236 | '_IS_BOT_FRIEND', |
| 237 | 237 | isset($_SERVER['HTTP_USER_AGENT']) |
| 238 | 238 | and preg_match( |
| 239 | - ',' . implode('|', array( |
|
| 239 | + ','.implode('|', array( |
|
| 240 | 240 | 'facebookexternalhit', |
| 241 | 241 | 'twitterbot', |
| 242 | 242 | 'flipboardproxy', |
| 243 | 243 | 'wordpress' |
| 244 | - )) . ',i', |
|
| 245 | - (string)$_SERVER['HTTP_USER_AGENT'] |
|
| 244 | + )).',i', |
|
| 245 | + (string) $_SERVER['HTTP_USER_AGENT'] |
|
| 246 | 246 | ) |
| 247 | 247 | ); |
| 248 | 248 | } |
@@ -291,10 +291,10 @@ discard block |
||
| 291 | 291 | */ |
| 292 | 292 | foreach (array('lang', 'var_recherche', 'aide', 'var_lang_r', 'lang_r', 'var_ajax_ancre', 'nom_fichier') as $var) { |
| 293 | 293 | if (isset($_GET[$var])) { |
| 294 | - $_REQUEST[$var] = $GLOBALS[$var] = $_GET[$var] = preg_replace(',[^\w\,/#&;-]+,', ' ', (string)$_GET[$var]); |
|
| 294 | + $_REQUEST[$var] = $GLOBALS[$var] = $_GET[$var] = preg_replace(',[^\w\,/#&;-]+,', ' ', (string) $_GET[$var]); |
|
| 295 | 295 | } |
| 296 | 296 | if (isset($_POST[$var])) { |
| 297 | - $_REQUEST[$var] = $GLOBALS[$var] = $_POST[$var] = preg_replace(',[^\w\,/#&;-]+,', ' ', (string)$_POST[$var]); |
|
| 297 | + $_REQUEST[$var] = $GLOBALS[$var] = $_POST[$var] = preg_replace(',[^\w\,/#&;-]+,', ' ', (string) $_POST[$var]); |
|
| 298 | 298 | } |
| 299 | 299 | } |
| 300 | 300 | |
@@ -302,8 +302,8 @@ discard block |
||
| 302 | 302 | * Filtre l'accès à spip_acces_doc (injection SQL en 1.8.2x) |
| 303 | 303 | */ |
| 304 | 304 | if (isset($_SERVER['REQUEST_URI'])) { |
| 305 | - if (preg_match(',^(.*/)?spip_acces_doc\.,', (string)$_SERVER['REQUEST_URI'])) { |
|
| 306 | - $file = addslashes((string)$_GET['file']); |
|
| 305 | + if (preg_match(',^(.*/)?spip_acces_doc\.,', (string) $_SERVER['REQUEST_URI'])) { |
|
| 306 | + $file = addslashes((string) $_GET['file']); |
|
| 307 | 307 | } |
| 308 | 308 | } |
| 309 | 309 | |
@@ -323,13 +323,13 @@ discard block |
||
| 323 | 323 | */ |
| 324 | 324 | if ( |
| 325 | 325 | isset($_REQUEST['partie_cal']) |
| 326 | - and $_REQUEST['partie_cal'] !== htmlentities((string)$_REQUEST['partie_cal']) |
|
| 326 | + and $_REQUEST['partie_cal'] !== htmlentities((string) $_REQUEST['partie_cal']) |
|
| 327 | 327 | ) { |
| 328 | 328 | $ecran_securite_raison = "partie_cal"; |
| 329 | 329 | } |
| 330 | 330 | if ( |
| 331 | 331 | isset($_REQUEST['echelle']) |
| 332 | - and $_REQUEST['echelle'] !== htmlentities((string)$_REQUEST['echelle']) |
|
| 332 | + and $_REQUEST['echelle'] !== htmlentities((string) $_REQUEST['echelle']) |
|
| 333 | 333 | ) { |
| 334 | 334 | $ecran_securite_raison = "echelle"; |
| 335 | 335 | } |
@@ -339,13 +339,13 @@ discard block |
||
| 339 | 339 | */ |
| 340 | 340 | if ( |
| 341 | 341 | isset($_REQUEST['exec']) |
| 342 | - and !preg_match(',^[\w-]+$,', (string)$_REQUEST['exec']) |
|
| 342 | + and !preg_match(',^[\w-]+$,', (string) $_REQUEST['exec']) |
|
| 343 | 343 | ) { |
| 344 | 344 | $ecran_securite_raison = "exec"; |
| 345 | 345 | } |
| 346 | 346 | if ( |
| 347 | 347 | isset($_REQUEST['cherche_auteur']) |
| 348 | - and preg_match(',[<],', (string)$_REQUEST['cherche_auteur']) |
|
| 348 | + and preg_match(',[<],', (string) $_REQUEST['cherche_auteur']) |
|
| 349 | 349 | ) { |
| 350 | 350 | $ecran_securite_raison = "cherche_auteur"; |
| 351 | 351 | } |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | isset($_REQUEST['exec']) |
| 354 | 354 | and $_REQUEST['exec'] == 'auteurs' |
| 355 | 355 | and isset($_REQUEST['recherche']) |
| 356 | - and preg_match(',[<],', (string)$_REQUEST['recherche']) |
|
| 356 | + and preg_match(',[<],', (string) $_REQUEST['recherche']) |
|
| 357 | 357 | ) { |
| 358 | 358 | $ecran_securite_raison = "recherche"; |
| 359 | 359 | } |
@@ -361,7 +361,7 @@ discard block |
||
| 361 | 361 | isset($_REQUEST['exec']) |
| 362 | 362 | and $_REQUEST['exec'] == 'info_plugin' |
| 363 | 363 | and isset($_REQUEST['plugin']) |
| 364 | - and preg_match(',[<],', (string)$_REQUEST['plugin']) |
|
| 364 | + and preg_match(',[<],', (string) $_REQUEST['plugin']) |
|
| 365 | 365 | ) { |
| 366 | 366 | $ecran_securite_raison = "plugin"; |
| 367 | 367 | } |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | echo minipres(_T('info_acces_interdit')); |
| 389 | 389 | exit; |
| 390 | 390 | } |
| 391 | - require _DIR_RESTREINT . 'action/configurer.php'; |
|
| 391 | + require _DIR_RESTREINT.'action/configurer.php'; |
|
| 392 | 392 | action_configurer_dist(); |
| 393 | 393 | } |
| 394 | 394 | } |
@@ -440,9 +440,9 @@ discard block |
||
| 440 | 440 | if (_IS_BOT) { |
| 441 | 441 | if ( |
| 442 | 442 | (isset($_REQUEST['echelle']) and isset($_REQUEST['partie_cal']) and isset($_REQUEST['type'])) |
| 443 | - or (strpos((string)$_SERVER['REQUEST_URI'], 'debut_') and preg_match(',[?&]debut_.*&debut_,', (string)$_SERVER['REQUEST_URI'])) |
|
| 444 | - or (isset($_REQUEST['calendrier_annee']) and strpos((string)$_SERVER['REQUEST_URI'], 'debut_')) |
|
| 445 | - or (isset($_REQUEST['calendrier_annee']) and preg_match(',[?&]calendrier_annee=.*&calendrier_annee=,', (string)$_SERVER['REQUEST_URI'])) |
|
| 443 | + or (strpos((string) $_SERVER['REQUEST_URI'], 'debut_') and preg_match(',[?&]debut_.*&debut_,', (string) $_SERVER['REQUEST_URI'])) |
|
| 444 | + or (isset($_REQUEST['calendrier_annee']) and strpos((string) $_SERVER['REQUEST_URI'], 'debut_')) |
|
| 445 | + or (isset($_REQUEST['calendrier_annee']) and preg_match(',[?&]calendrier_annee=.*&calendrier_annee=,', (string) $_SERVER['REQUEST_URI'])) |
|
| 446 | 446 | ) { |
| 447 | 447 | $ecran_securite_raison = "robot agenda/double pagination"; |
| 448 | 448 | } |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | if ($_REQUEST['page'] == 'test_cfg') { |
| 457 | 457 | $ecran_securite_raison = "test_cfg"; |
| 458 | 458 | } |
| 459 | - if ($_REQUEST['page'] !== htmlspecialchars((string)$_REQUEST['page'])) { |
|
| 459 | + if ($_REQUEST['page'] !== htmlspecialchars((string) $_REQUEST['page'])) { |
|
| 460 | 460 | $ecran_securite_raison = "xsspage"; |
| 461 | 461 | } |
| 462 | 462 | if ( |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | */ |
| 473 | 473 | foreach (array('var_login') as $var) { |
| 474 | 474 | if (isset($_REQUEST[$var]) and is_array($_REQUEST[$var])) { |
| 475 | - $ecran_securite_raison = "xss " . $var; |
|
| 475 | + $ecran_securite_raison = "xss ".$var; |
|
| 476 | 476 | } |
| 477 | 477 | } |
| 478 | 478 | |
@@ -520,13 +520,13 @@ discard block |
||
| 520 | 520 | */ |
| 521 | 521 | if ( |
| 522 | 522 | isset($_REQUEST['nom_sauvegarde']) |
| 523 | - and strstr((string)$_REQUEST['nom_sauvegarde'], '/') |
|
| 523 | + and strstr((string) $_REQUEST['nom_sauvegarde'], '/') |
|
| 524 | 524 | ) { |
| 525 | 525 | $ecran_securite_raison = 'nom_sauvegarde manipulee'; |
| 526 | 526 | } |
| 527 | 527 | if ( |
| 528 | 528 | isset($_REQUEST['znom_sauvegarde']) |
| 529 | - and strstr((string)$_REQUEST['znom_sauvegarde'], '/') |
|
| 529 | + and strstr((string) $_REQUEST['znom_sauvegarde'], '/') |
|
| 530 | 530 | ) { |
| 531 | 531 | $ecran_securite_raison = 'znom_sauvegarde manipulee'; |
| 532 | 532 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $les_couleurs = $couleurs(); |
| 46 | 46 | foreach ($les_couleurs as $k => $c) { |
| 47 | 47 | $valeurs['_couleurs_url'][$k] = generer_url_public('style_prive.css', 'ltr=' |
| 48 | - . $GLOBALS['spip_lang_left'] . '&' |
|
| 48 | + . $GLOBALS['spip_lang_left'].'&' |
|
| 49 | 49 | . $couleurs($k)); |
| 50 | 50 | $valeurs['couleurs'][$k] = $c; |
| 51 | 51 | } |