@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $checked = ($l == $selected) ? ' checked=\'checked\'' : ''; |
| 52 | 52 | $ret .= "<div class='choix'>" |
| 53 | 53 | . "<input type='radio' name='$name' id='{$id}_$l' value='$l'$checked />" |
| 54 | - . "<label for='{$id}_$l'>" . traduire_nom_langue($l) . '</label>' |
|
| 54 | + . "<label for='{$id}_$l'>".traduire_nom_langue($l).'</label>' |
|
| 55 | 55 | . '</div>'; |
| 56 | 56 | } |
| 57 | 57 | |
@@ -23,23 +23,23 @@ |
||
| 23 | 23 | |
| 24 | 24 | define('_SUB_REGEXP_SYMBOL', '[\w_:.-]'); |
| 25 | 25 | |
| 26 | -define('_REGEXP_NMTOKEN', '/^' . _SUB_REGEXP_SYMBOL . '+$/'); |
|
| 26 | +define('_REGEXP_NMTOKEN', '/^'._SUB_REGEXP_SYMBOL.'+$/'); |
|
| 27 | 27 | |
| 28 | -define('_REGEXP_NMTOKENS', '/^(' . _SUB_REGEXP_SYMBOL . '+\s*)*$/'); |
|
| 28 | +define('_REGEXP_NMTOKENS', '/^('._SUB_REGEXP_SYMBOL.'+\s*)*$/'); |
|
| 29 | 29 | |
| 30 | -define('_REGEXP_ID', '/^[A-Za-z_:]' . _SUB_REGEXP_SYMBOL . '*$/'); |
|
| 30 | +define('_REGEXP_ID', '/^[A-Za-z_:]'._SUB_REGEXP_SYMBOL.'*$/'); |
|
| 31 | 31 | |
| 32 | -define('_REGEXP_ENTITY_USE', '/%(' . _SUB_REGEXP_SYMBOL . '+);/'); |
|
| 33 | -define('_REGEXP_ENTITY_DEF', '/^%(' . _SUB_REGEXP_SYMBOL . '+);/'); |
|
| 32 | +define('_REGEXP_ENTITY_USE', '/%('._SUB_REGEXP_SYMBOL.'+);/'); |
|
| 33 | +define('_REGEXP_ENTITY_DEF', '/^%('._SUB_REGEXP_SYMBOL.'+);/'); |
|
| 34 | 34 | define('_REGEXP_TYPE_XML', 'PUBLIC|SYSTEM|INCLUDE|IGNORE|CDATA'); |
| 35 | -define('_REGEXP_ENTITY_DECL', '/^<!ENTITY\s+(%?)\s*(' . |
|
| 36 | - _SUB_REGEXP_SYMBOL . |
|
| 37 | - '+;?)\s+(' . |
|
| 38 | - _REGEXP_TYPE_XML . |
|
| 39 | - ')?\s*(' . |
|
| 40 | - "('([^']*)')" . |
|
| 41 | - '|("([^"]*)")' . |
|
| 42 | - '|\s*(%' . _SUB_REGEXP_SYMBOL . '+;)\s*' . |
|
| 35 | +define('_REGEXP_ENTITY_DECL', '/^<!ENTITY\s+(%?)\s*('. |
|
| 36 | + _SUB_REGEXP_SYMBOL. |
|
| 37 | + '+;?)\s+('. |
|
| 38 | + _REGEXP_TYPE_XML. |
|
| 39 | + ')?\s*('. |
|
| 40 | + "('([^']*)')". |
|
| 41 | + '|("([^"]*)")'. |
|
| 42 | + '|\s*(%'._SUB_REGEXP_SYMBOL.'+;)\s*'. |
|
| 43 | 43 | ')\s*(--.*?--)?("([^"]*)")?\s*>\s*(.*)$/s'); |
| 44 | 44 | |
| 45 | 45 | define('_REGEXP_INCLUDE_USE', '/^<!\[\s*%\s*([^;]*);\s*\[\s*(.*)$/s'); |
@@ -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 | } |
@@ -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 | } |
@@ -157,8 +157,7 @@ |
||
| 157 | 157 | if (count($autre_langue) == 1) { |
| 158 | 158 | $row['lang'] = reset($autre_langue); |
| 159 | 159 | } |
| 160 | - } |
|
| 161 | - else { |
|
| 160 | + } else { |
|
| 162 | 161 | $row['lang'] = 'en'; |
| 163 | 162 | } |
| 164 | 163 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | // si l'objet existe deja, on retourne simplement ses valeurs |
| 52 | 52 | if (is_numeric($id_objet)) { |
| 53 | - return sql_fetsel('*', $table, "$_id_objet=" . (int) $id_objet); |
|
| 53 | + return sql_fetsel('*', $table, "$_id_objet=".(int) $id_objet); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | // ici, on demande une creation. |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | // si demande de traduction |
| 65 | 65 | // on recupere les valeurs de la traduction |
| 66 | 66 | if ($lier_trad) { |
| 67 | - if ($select = charger_fonction('precharger_traduction_' . $type, 'inc', true)) { |
|
| 67 | + if ($select = charger_fonction('precharger_traduction_'.$type, 'inc', true)) { |
|
| 68 | 68 | $row = $select($id_objet, $id_rubrique, $lier_trad); |
| 69 | 69 | } else { |
| 70 | 70 | $row = precharger_traduction_objet($type, $id_objet, $id_rubrique, $lier_trad, $champ_titre); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | // recuperer le secteur, pour affecter les bons champs extras |
| 101 | 101 | if ($id_rubrique && $is_secteur && !$row['id_secteur']) { |
| 102 | - $row_rub = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . sql_quote($id_rubrique)); |
|
| 102 | + $row_rub = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.sql_quote($id_rubrique)); |
|
| 103 | 103 | $row['id_secteur'] = $row_rub; |
| 104 | 104 | } |
| 105 | 105 | |
@@ -129,10 +129,10 @@ discard block |
||
| 129 | 129 | $_id_objet = id_table_objet($table); |
| 130 | 130 | |
| 131 | 131 | // Recuperer les donnees de l'objet original |
| 132 | - $row = sql_fetsel('*', $table, "$_id_objet=" . (int) $lier_trad); |
|
| 132 | + $row = sql_fetsel('*', $table, "$_id_objet=".(int) $lier_trad); |
|
| 133 | 133 | if ($row) { |
| 134 | 134 | include_spip('inc/filtres'); |
| 135 | - $row[$champ_titre] = filtrer_entites(objet_T($type, 'info_nouvelle_traduction')) . ' ' . $row[$champ_titre]; |
|
| 135 | + $row[$champ_titre] = filtrer_entites(objet_T($type, 'info_nouvelle_traduction')).' '.$row[$champ_titre]; |
|
| 136 | 136 | } else { |
| 137 | 137 | $row = []; |
| 138 | 138 | } |
@@ -182,14 +182,14 @@ discard block |
||
| 182 | 182 | $id_parent = 0; |
| 183 | 183 | } else { |
| 184 | 184 | // on cherche une rubrique soeur dans la bonne langue |
| 185 | - $row_rub = sql_fetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . (int) $id_rubrique); |
|
| 185 | + $row_rub = sql_fetsel('id_parent', 'spip_rubriques', 'id_rubrique='.(int) $id_rubrique); |
|
| 186 | 186 | $id_parent = $row_rub['id_parent']; |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | $row_rub = sql_fetsel( |
| 190 | 190 | 'id_rubrique', |
| 191 | 191 | 'spip_rubriques', |
| 192 | - "lang='" . $GLOBALS['spip_lang'] . "' AND id_parent=" . (int) $id_parent |
|
| 192 | + "lang='".$GLOBALS['spip_lang']."' AND id_parent=".(int) $id_parent |
|
| 193 | 193 | ); |
| 194 | 194 | if ($row_rub) { |
| 195 | 195 | $row['id_rubrique'] = $row_rub['id_rubrique']; |
@@ -85,8 +85,7 @@ |
||
| 85 | 85 | $url_action = self(); |
| 86 | 86 | $action = _request('action'); |
| 87 | 87 | $url_action = parametre_url($url_action, 'action', $action, '&'); |
| 88 | - } |
|
| 89 | - else { |
|
| 88 | + } else { |
|
| 90 | 89 | $action = parametre_url($url_action, 'action'); |
| 91 | 90 | } |
| 92 | 91 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | $arg = parametre_url($url_action, 'arg'); |
| 95 | - $confirm = md5("$action:$arg:" . realpath(__FILE__)); |
|
| 95 | + $confirm = md5("$action:$arg:".realpath(__FILE__)); |
|
| 96 | 96 | if (_request('confirm_action') === $confirm) { |
| 97 | 97 | return true; |
| 98 | 98 | } |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } else { |
| 146 | 146 | return generer_url_action( |
| 147 | 147 | $action, |
| 148 | - 'arg=' . rawurlencode($arg) . "&hash=$hash" . ($r ? "&redirect=$r" : ''), |
|
| 148 | + 'arg='.rawurlencode($arg)."&hash=$hash".($r ? "&redirect=$r" : ''), |
|
| 149 | 149 | $mode, |
| 150 | 150 | $public |
| 151 | 151 | ); |
@@ -156,9 +156,9 @@ discard block |
||
| 156 | 156 | $hash = calculer_action_auteur("$action-$arg"); |
| 157 | 157 | $att .= " style='margin: 0px; border: 0px'"; |
| 158 | 158 | if ($redirect) { |
| 159 | - $redirect = "\n\t\t<input name='redirect' type='hidden' value='" . str_replace("'", ''', $redirect) . "' />"; |
|
| 159 | + $redirect = "\n\t\t<input name='redirect' type='hidden' value='".str_replace("'", ''', $redirect)."' />"; |
|
| 160 | 160 | } |
| 161 | - $mode .= $redirect . " |
|
| 161 | + $mode .= $redirect." |
|
| 162 | 162 | <input name='hash' type='hidden' value='$hash' /> |
| 163 | 163 | <input name='arg' type='hidden' value='$arg' />"; |
| 164 | 164 | |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | $pass ??= ''; |
| 227 | 227 | $entry = "$action:$id_auteur:$pass:$alea"; |
| 228 | 228 | if (!isset($sha[$entry])) { |
| 229 | - $sha[$entry] = hash_hmac('sha256', "$action::$id_auteur", "$pass::" . _action_get_alea($alea)); |
|
| 229 | + $sha[$entry] = hash_hmac('sha256', "$action::$id_auteur", "$pass::"._action_get_alea($alea)); |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | return $sha[$entry]; |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | // On nettoie l’URL de tous les var_. |
| 337 | 337 | $url = nettoyer_uri_var($url); |
| 338 | 338 | |
| 339 | - $token = _action_auteur('previsualiser-' . $url, $id_auteur, secret_du_site(), $alea); |
|
| 339 | + $token = _action_auteur('previsualiser-'.$url, $id_auteur, secret_du_site(), $alea); |
|
| 340 | 340 | return "$id_auteur-$token"; |
| 341 | 341 | } |
| 342 | 342 | |
@@ -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); |