@@ -26,7 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | $fond = _request('exec'); |
| 29 | -$GLOBALS['delais'] = 0;// pas de cache ! |
|
| 29 | +$GLOBALS['delais'] = 0; // pas de cache ! |
|
| 30 | 30 | // Securite |
| 31 | 31 | if (strstr($fond, '/')) { |
| 32 | 32 | if (!include_spip('inc/autoriser') |
@@ -139,11 +139,11 @@ discard block |
||
| 139 | 139 | if ($quoi !== 'actifs') { |
| 140 | 140 | $lpf = liste_plugin_files(); |
| 141 | 141 | if ($lpf) { |
| 142 | - echo "<p>" . _T('texte_presente_plugin') . "</p>"; |
|
| 142 | + echo "<p>"._T('texte_presente_plugin')."</p>"; |
|
| 143 | 143 | } else { |
| 144 | 144 | if (!@is_dir(_DIR_PLUGINS)) { |
| 145 | - echo "<p>" . _T('plugin_info_automatique_ftp', array('rep' => joli_repertoire(_DIR_PLUGINS))) |
|
| 146 | - . " — " . _T('plugin_info_automatique_creer') . "</p>"; |
|
| 145 | + echo "<p>"._T('plugin_info_automatique_ftp', array('rep' => joli_repertoire(_DIR_PLUGINS))) |
|
| 146 | + . " — "._T('plugin_info_automatique_creer')."</p>"; |
|
| 147 | 147 | } |
| 148 | 148 | } |
| 149 | 149 | $lcpaffiche = $lpf; |
@@ -164,8 +164,8 @@ discard block |
||
| 164 | 164 | if (defined('_DIR_PLUGINS_SUPPL')) { |
| 165 | 165 | $nb += count($lcpas); |
| 166 | 166 | } |
| 167 | - echo "<h3>" . sinon(singulier_ou_pluriel($nb, 'plugins_actif_un', 'plugins_actifs', 'count'), |
|
| 168 | - _T('plugins_actif_aucun')) . "</h3>"; |
|
| 167 | + echo "<h3>".sinon(singulier_ou_pluriel($nb, 'plugins_actif_un', 'plugins_actifs', 'count'), |
|
| 168 | + _T('plugins_actif_aucun'))."</h3>"; |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | if (empty($format)) { |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | if ($corps) { |
| 184 | 184 | $corps .= "\n<div class='boutons' style='display:none;'>" |
| 185 | - . "<input type='submit' class='submit save' value='" . _T('bouton_enregistrer') |
|
| 185 | + . "<input type='submit' class='submit save' value='"._T('bouton_enregistrer') |
|
| 186 | 186 | . "' />" |
| 187 | 187 | . "</div>"; |
| 188 | 188 | } |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | . debut_cadre_trait_couleur('', true, '', _T('plugins_liste_dist'), 'liste_plugins_dist') |
| 256 | 256 | . "<p>" |
| 257 | 257 | . _T('plugin_info_plugins_dist_1', array('plugins_dist' => joli_repertoire(_DIR_PLUGINS_DIST))) |
| 258 | - . '<br />' . _T('plugin_info_plugins_dist_2') |
|
| 258 | + . '<br />'._T('plugin_info_plugins_dist_2') |
|
| 259 | 259 | . "</p>" |
| 260 | 260 | . $liste |
| 261 | 261 | . fin_cadre_trait_couleur(true) |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | $res = debut_cadre_enfonce('', true, '', _T('plugin_librairies_installees')); |
| 279 | 279 | $res .= '<dl>'; |
| 280 | 280 | foreach ($libs as $lib => $rep) { |
| 281 | - $res .= "<dt>$lib</dt><dd>" . joli_repertoire($rep) . "</dd>\n"; |
|
| 281 | + $res .= "<dt>$lib</dt><dd>".joli_repertoire($rep)."</dd>\n"; |
|
| 282 | 282 | } |
| 283 | 283 | $res .= '</dl>'; |
| 284 | 284 | $res .= fin_cadre_enfonce(true); |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | function liste_librairies() { |
| 297 | 297 | $libs = array(); |
| 298 | 298 | foreach (array_reverse(creer_chemin()) as $d) { |
| 299 | - if (is_dir($dir = $d . 'lib/') |
|
| 299 | + if (is_dir($dir = $d.'lib/') |
|
| 300 | 300 | and $t = opendir($dir) |
| 301 | 301 | ) { |
| 302 | 302 | while (($f = readdir($t)) !== false) { |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | if ($mode === -1) { |
| 103 | 103 | return array('action' => $action, 'arg' => $arg, 'hash' => $hash); |
| 104 | 104 | } else { |
| 105 | - return generer_url_action($action, "arg=" . rawurlencode($arg) . "&hash=$hash" . (!$r ? '' : "&redirect=$r"), |
|
| 105 | + return generer_url_action($action, "arg=".rawurlencode($arg)."&hash=$hash".(!$r ? '' : "&redirect=$r"), |
|
| 106 | 106 | $mode, $public); |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -111,9 +111,9 @@ discard block |
||
| 111 | 111 | $hash = calculer_action_auteur("$action-$arg"); |
| 112 | 112 | $att .= " style='margin: 0px; border: 0px'"; |
| 113 | 113 | if ($redirect) { |
| 114 | - $redirect = "\n\t\t<input name='redirect' type='hidden' value='" . str_replace("'", ''', $redirect) . "' />"; |
|
| 114 | + $redirect = "\n\t\t<input name='redirect' type='hidden' value='".str_replace("'", ''', $redirect)."' />"; |
|
| 115 | 115 | } |
| 116 | - $mode .= $redirect . " |
|
| 116 | + $mode .= $redirect." |
|
| 117 | 117 | <input name='hash' type='hidden' value='$hash' /> |
| 118 | 118 | <input name='arg' type='hidden' value='$arg' />"; |
| 119 | 119 | |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | */ |
| 184 | 184 | function _action_auteur($action, $id_auteur, $pass, $alea) { |
| 185 | 185 | static $sha = array(); |
| 186 | - if (!isset($sha[$id_auteur . $pass . $alea])) { |
|
| 186 | + if (!isset($sha[$id_auteur.$pass.$alea])) { |
|
| 187 | 187 | if (!isset($GLOBALS['meta'][$alea]) and _request('exec') !== 'install') { |
| 188 | 188 | include_spip('inc/acces'); |
| 189 | 189 | charger_aleas(); |
@@ -195,12 +195,12 @@ discard block |
||
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | include_spip('auth/sha256.inc'); |
| 198 | - $sha[$id_auteur . $pass . $alea] = _nano_sha256($id_auteur . $pass . @$GLOBALS['meta'][$alea]); |
|
| 198 | + $sha[$id_auteur.$pass.$alea] = _nano_sha256($id_auteur.$pass.@$GLOBALS['meta'][$alea]); |
|
| 199 | 199 | } |
| 200 | 200 | if (function_exists('sha1')) { |
| 201 | - return sha1($action . $sha[$id_auteur . $pass . $alea]); |
|
| 201 | + return sha1($action.$sha[$id_auteur.$pass.$alea]); |
|
| 202 | 202 | } else { |
| 203 | - return md5($action . $sha[$id_auteur . $pass . $alea]); |
|
| 203 | + return md5($action.$sha[$id_auteur.$pass.$alea]); |
|
| 204 | 204 | } |
| 205 | 205 | } |
| 206 | 206 | |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | include_spip('inc/acces'); |
| 262 | 262 | include_spip('auth/sha256.inc'); |
| 263 | 263 | ecrire_meta('secret_du_site', |
| 264 | - _nano_sha256($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SERVER_SIGNATURE"] . creer_uniqid()), 'non'); |
|
| 264 | + _nano_sha256($_SERVER["DOCUMENT_ROOT"].$_SERVER["SERVER_SIGNATURE"].creer_uniqid()), 'non'); |
|
| 265 | 265 | lire_metas(); // au cas ou ecrire_meta() ne fonctionne pas |
| 266 | 266 | } |
| 267 | 267 | |
@@ -276,9 +276,9 @@ discard block |
||
| 276 | 276 | */ |
| 277 | 277 | function calculer_cle_action($action) { |
| 278 | 278 | if (function_exists('sha1')) { |
| 279 | - return sha1($action . secret_du_site()); |
|
| 279 | + return sha1($action.secret_du_site()); |
|
| 280 | 280 | } else { |
| 281 | - return md5($action . secret_du_site()); |
|
| 281 | + return md5($action.secret_du_site()); |
|
| 282 | 282 | } |
| 283 | 283 | } |
| 284 | 284 | |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | // On nettoie l’URL de tous les var_. |
| 319 | 319 | $url = nettoyer_uri_var($url); |
| 320 | 320 | |
| 321 | - $token = _action_auteur('previsualiser-' . $url, $id_auteur, null, $alea); |
|
| 321 | + $token = _action_auteur('previsualiser-'.$url, $id_auteur, null, $alea); |
|
| 322 | 322 | return "$id_auteur-$token"; |
| 323 | 323 | } |
| 324 | 324 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $texte = $x . $texte; |
|
| 67 | + $texte = $x.$texte; |
|
| 68 | 68 | |
| 69 | 69 | return $texte; |
| 70 | 70 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | if (isset($_SERVER['HTTP_REFERER'])) { |
| 102 | 102 | $_SERVER['HTTP_REFERER'] = preg_replace(',[^\w\,/#&;-]+,', ' ', $_SERVER['HTTP_REFERER']); |
| 103 | 103 | } |
| 104 | - if ($rech){ |
|
| 104 | + if ($rech) { |
|
| 105 | 105 | $rech = preg_replace(',[^\w\,/#&;-]+,', ' ', $rech); |
| 106 | 106 | } |
| 107 | 107 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | || ($pos = 0); |
| 177 | 177 | |
| 178 | 178 | if (false === strpos(substr($texte, 0, $pos), '<!-- insert_head -->')) { |
| 179 | - $insert = "\n" . pipeline('insert_head', '<!-- f_insert_head -->') . "\n"; |
|
| 179 | + $insert = "\n".pipeline('insert_head', '<!-- f_insert_head -->')."\n"; |
|
| 180 | 180 | $texte = substr_replace($texte, $insert, $pos, 0); |
| 181 | 181 | } |
| 182 | 182 | |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | // inserer avant le </body> fermant si on peut, a la fin de la page sinon |
| 274 | 274 | if (($p = strpos($texte, '</body>')) !== false) { |
| 275 | - $texte = substr($texte, 0, $p) . $code . substr($texte, $p); |
|
| 275 | + $texte = substr($texte, 0, $p).$code.substr($texte, $p); |
|
| 276 | 276 | } else { |
| 277 | 277 | $texte .= $code; |
| 278 | 278 | } |
@@ -298,9 +298,9 @@ |
||
| 298 | 298 | and ($e = $flux['args']['contexte']['_etape']) > 1 |
| 299 | 299 | and $ext = $flux['args']['ext'] |
| 300 | 300 | and $f = $flux['data'] |
| 301 | - and file_exists($f . "_$e.$ext") |
|
| 301 | + and file_exists($f."_$e.$ext") |
|
| 302 | 302 | ) { |
| 303 | - $flux['data'] = $f . "_$e"; |
|
| 303 | + $flux['data'] = $f."_$e"; |
|
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | return $flux; |
@@ -420,7 +420,7 @@ |
||
| 420 | 420 | $h = "selec_statut('$id', '$type', $n, jQuery('img',this).attr('src'), '$h');return false;"; |
| 421 | 421 | $t = supprimer_tags($titre); |
| 422 | 422 | |
| 423 | - return "<a href=\"#\" onclick=\"$h\" title=\"$t\"$act>" . http_img_pack($img, $t) . "</a>"; |
|
| 423 | + return "<a href=\"#\" onclick=\"$h\" title=\"$t\"$act>".http_img_pack($img, $t)."</a>"; |
|
| 424 | 424 | } |
| 425 | 425 | |
| 426 | 426 | // compat |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | // ceci est la RegExp NO_REAL_NAME faisant hurler SpamAssassin |
| 136 | 136 | if (preg_match('/^["\s]*\<?\S+\@\S+\>?\s*$/', $from)) { |
| 137 | - $from .= ' (' . str_replace(')', '', translitteration(str_replace('@', ' at ', $from))) . ')'; |
|
| 137 | + $from .= ' ('.str_replace(')', '', translitteration(str_replace('@', ' at ', $from))).')'; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | // nettoyer les é ’, &emdash; etc... |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | if (!_TEST_EMAIL_DEST) { |
| 172 | 172 | return false; |
| 173 | 173 | } else { |
| 174 | - $texte = "Dest : $destinataire\r\n" . $texte; |
|
| 174 | + $texte = "Dest : $destinataire\r\n".$texte; |
|
| 175 | 175 | $destinataire = _TEST_EMAIL_DEST; |
| 176 | 176 | } |
| 177 | 177 | } |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | // Ajouter le Content-Type et consort s'il n'y est pas deja |
| 196 | 196 | if (strpos($headers, 'Content-Type: ') === false) { |
| 197 | 197 | $type = |
| 198 | - "Content-Type: text/plain;charset=\"$charset\";\n" . |
|
| 198 | + "Content-Type: text/plain;charset=\"$charset\";\n". |
|
| 199 | 199 | "Content-Transfer-Encoding: 8bit\n"; |
| 200 | 200 | } else { |
| 201 | 201 | $type = ''; |
@@ -203,15 +203,15 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | // calculer un identifiant unique |
| 205 | 205 | preg_match('/@\S+/', $from, $domain); |
| 206 | - $uniq = rand() . '_' . md5($to . $texte) . $domain[0]; |
|
| 206 | + $uniq = rand().'_'.md5($to.$texte).$domain[0]; |
|
| 207 | 207 | |
| 208 | 208 | // Si multi-part, s'en servir comme borne ... |
| 209 | 209 | if ($parts) { |
| 210 | - $texte = "--$uniq\n$type\n" . $texte . "\n"; |
|
| 210 | + $texte = "--$uniq\n$type\n".$texte."\n"; |
|
| 211 | 211 | foreach ($parts as $part) { |
| 212 | - $n = strlen($part[1]) . ($part[0] ? "\n" : ''); |
|
| 212 | + $n = strlen($part[1]).($part[0] ? "\n" : ''); |
|
| 213 | 213 | $e = join("\n", $part[0]); |
| 214 | - $texte .= "\n--$uniq\nContent-Length: $n$e\n\n" . $part[1]; |
|
| 214 | + $texte .= "\n--$uniq\nContent-Length: $n$e\n\n".$part[1]; |
|
| 215 | 215 | } |
| 216 | 216 | $texte .= "\n\n--$uniq--\n"; |
| 217 | 217 | // Si boundary n'est pas entre guillemets, |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | // .. et s'en servir pour plaire a SpamAssassin |
| 223 | 223 | |
| 224 | - $mid = 'Message-Id: <' . $uniq . '>'; |
|
| 224 | + $mid = 'Message-Id: <'.$uniq.'>'; |
|
| 225 | 225 | |
| 226 | 226 | // indispensable pour les sites qui collent d'office From: serveur-http |
| 227 | 227 | // sauf si deja mis par l'envoyeur |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | while ( |
| 136 | 136 | $p !== false |
| 137 | 137 | and ($morceau = substr($txt, $d, $p - $d)) |
| 138 | - and (($nopen += preg_match_all("{<" . preg_quote($closing_tag) . "(\s*>|\s[^>]*[^/>]>)}is", $morceau, |
|
| 138 | + and (($nopen += preg_match_all("{<".preg_quote($closing_tag)."(\s*>|\s[^>]*[^/>]>)}is", $morceau, |
|
| 139 | 139 | $matches, PREG_SET_ORDER)) > $nclose) |
| 140 | 140 | ) { |
| 141 | 141 | $nclose++; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $_id = $e['id_table_objet']; |
| 51 | 51 | if (isset($contexte[$_id]) and $id = intval($contexte[$_id])) { |
| 52 | 52 | $table = $e['table_objet_sql']; |
| 53 | - $row = sql_fetsel('*', $table, "$_id=" . intval($id)); |
|
| 53 | + $row = sql_fetsel('*', $table, "$_id=".intval($id)); |
|
| 54 | 54 | if (isset($row['id_rubrique'])) { |
| 55 | 55 | $contexte['id_rubrique'] = $row['id_rubrique']; |
| 56 | 56 | if (isset($row['id_secteur'])) { |
@@ -111,8 +111,8 @@ discard block |
||
| 111 | 111 | $boutons_admin[$parent]->sousmenu = array_slice($boutons_admin[$parent]->sousmenu, 0, $position) |
| 112 | 112 | + array( |
| 113 | 113 | $id => new Bouton( |
| 114 | - ($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '', // icone |
|
| 115 | - $infos['titre'], // titre |
|
| 114 | + ($icones and !empty($infos['icone'])) ? find_in_theme($infos['icone']) : '', // icone |
|
| 115 | + $infos['titre'], // titre |
|
| 116 | 116 | (isset($infos['action']) and $infos['action']) ? $infos['action'] : null, |
| 117 | 117 | (isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null |
| 118 | 118 | ) |
@@ -128,8 +128,8 @@ discard block |
||
| 128 | 128 | $boutons_admin = array_slice($boutons_admin, 0, $position) |
| 129 | 129 | + array( |
| 130 | 130 | $id => new Bouton( |
| 131 | - ($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '', // icone |
|
| 132 | - $infos['titre'], // titre |
|
| 131 | + ($icones and isset($infos['icone']) and $infos['icone']) ? find_in_theme($infos['icone']) : '', // icone |
|
| 132 | + $infos['titre'], // titre |
|
| 133 | 133 | (isset($infos['action']) and $infos['action']) ? $infos['action'] : null, |
| 134 | 134 | (isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : null |
| 135 | 135 | ) |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $libelles = $isfavoris = $favoris = array(); |
| 171 | 171 | foreach ($menu->sousmenu as $key => $item) { |
| 172 | 172 | $libelles[$key] = strtolower(translitteration(_T($item->libelle))); |
| 173 | - $isfavoris[$key] = (bool)$item->favori; |
|
| 173 | + $isfavoris[$key] = (bool) $item->favori; |
|
| 174 | 174 | $favoris[$key] = $item->favori; |
| 175 | 175 | } |
| 176 | 176 | if ($avec_favoris) { |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $url = str_replace('&', '&', $url); |
| 213 | 213 | while (preg_match(',[&?]([a-z_]+)=@([a-z_]+)@,i', $url, $matches)) { |
| 214 | 214 | if ($matches[2] == 'id_secteur' and !isset($contexte['id_secteur']) and isset($contexte['id_rubrique'])) { |
| 215 | - $contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($contexte['id_rubrique'])); |
|
| 215 | + $contexte['id_secteur'] = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.intval($contexte['id_rubrique'])); |
|
| 216 | 216 | } |
| 217 | 217 | $val = _request($matches[2], $contexte); |
| 218 | 218 | $url = parametre_url($url, $matches[1], $val ? $val : '', '&'); |