@@ -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 | ]); |
@@ -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 | } |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | $titre = "<h3>$titre</h3>"; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - return '<div class="' . $class . ($id ? "\" id=\"$id" : '') . '">' |
|
| 138 | + return '<div class="'.$class.($id ? "\" id=\"$id" : '').'">' |
|
| 139 | 139 | . ($titre ? "<div class=\"$head_class\">$titre<!--/hd--></div>" : '') |
| 140 | 140 | . '<div class="box__body clearfix">'; |
| 141 | 141 | } |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | // Espacements pour le rythme vertical et les gouttières |
| 51 | 51 | // Basés sur la hauteur d'une ligne de texte à la racine du document |
| 52 | - $vars->add('--spip-spacing-y', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4) . 'rem'); |
|
| 53 | - $vars->add('--spip-spacing-x', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4) . 'rem'); |
|
| 52 | + $vars->add('--spip-spacing-y', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4).'rem'); |
|
| 53 | + $vars->add('--spip-spacing-x', round(strmult($Pile[0]['font-size'], $Pile[0]['line-height']), 4).'rem'); |
|
| 54 | 54 | $vars->add('--spip-margin-bottom', $Pile[0]['margin-bottom']); // À déprécier |
| 55 | 55 | |
| 56 | 56 | // Bordures |
@@ -60,20 +60,20 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | // Ombres portées |
| 62 | 62 | $shadow_mini = |
| 63 | - '0 0.05em 0.1em hsla(0, 0%, 0%, 0.33),' . |
|
| 64 | - '0 0.1em 0.15em hsla(0, 0%, 0%, 0.05),' . |
|
| 63 | + '0 0.05em 0.1em hsla(0, 0%, 0%, 0.33),'. |
|
| 64 | + '0 0.1em 0.15em hsla(0, 0%, 0%, 0.05),'. |
|
| 65 | 65 | '0 0.1em 0.25em hsla(0, 0%, 0%, 0.05)'; |
| 66 | 66 | $shadow = |
| 67 | - '0 0.05em 0.15em hsla(0, 0%, 0%, 0.33),' . |
|
| 68 | - '0 0.1em 0.25em hsla(0, 0%, 0%, 0.05),' . |
|
| 67 | + '0 0.05em 0.15em hsla(0, 0%, 0%, 0.33),'. |
|
| 68 | + '0 0.1em 0.25em hsla(0, 0%, 0%, 0.05),'. |
|
| 69 | 69 | '0 0.1em 0.5em hsla(0, 0%, 0%, 0.05)'; |
| 70 | 70 | $shadow_large = |
| 71 | - '0 0.05em 0.15em hsla(0, 0%, 0%, 0.1),' . |
|
| 72 | - '0 0.2em 0.5em hsla(0, 0%, 0%, 0.1),' . |
|
| 71 | + '0 0.05em 0.15em hsla(0, 0%, 0%, 0.1),'. |
|
| 72 | + '0 0.2em 0.5em hsla(0, 0%, 0%, 0.1),'. |
|
| 73 | 73 | '0 0.2em 1em hsla(0, 0%, 0%, 0.075)'; |
| 74 | 74 | $shadow_huge = |
| 75 | - '0 0.1em 0.25em hsla(0, 0%, 0%, 0.1),' . |
|
| 76 | - '0 0.25em 1em hsla(0, 0%, 0%, 0.1),' . |
|
| 75 | + '0 0.1em 0.25em hsla(0, 0%, 0%, 0.1),'. |
|
| 76 | + '0 0.25em 1em hsla(0, 0%, 0%, 0.1),'. |
|
| 77 | 77 | '0 0.5em 2em hsla(0, 0%, 0%, 0.075)'; |
| 78 | 78 | $vars->add('--spip-box-shadow-mini', $shadow_mini); |
| 79 | 79 | $vars->add('--spip-box-shadow-mini-hover', $shadow); |
@@ -19,12 +19,12 @@ |
||
| 19 | 19 | $primary = id_table_objet($objet); |
| 20 | 20 | |
| 21 | 21 | $select = "$primary as id,lang"; |
| 22 | - $where = 'id_trad=' . intval($id_trad); |
|
| 22 | + $where = 'id_trad='.intval($id_trad); |
|
| 23 | 23 | $trouver_table = charger_fonction('trouver_table', 'base'); |
| 24 | 24 | $desc = $trouver_table($table_objet_sql); |
| 25 | 25 | if (isset($desc['field']['statut'])) { |
| 26 | 26 | $select .= ',statut'; |
| 27 | - $where .= ' AND statut!=' . sql_quote('poubelle'); |
|
| 27 | + $where .= ' AND statut!='.sql_quote('poubelle'); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | $rows = sql_allfetsel($select, $table_objet_sql, $where); |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | function formulaires_configurer_ecran_connexion_data(): array { |
| 4 | 4 | return [ |
| 5 | 5 | 'couleur_defaut' => '#db1762', |
| 6 | - 'img_fond' => _DIR_IMG . 'spip_fond_login.jpg', |
|
| 6 | + 'img_fond' => _DIR_IMG.'spip_fond_login.jpg', |
|
| 7 | 7 | ]; |
| 8 | 8 | } |
| 9 | 9 | |