@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | $titre = "[" |
| 91 | 91 | . $nom_site_spip |
| 92 | 92 | . "]" |
| 93 | - . ($titre ? " " . textebrut(typo($titre)) : ""); |
|
| 93 | + . ($titre ? " ".textebrut(typo($titre)) : ""); |
|
| 94 | 94 | |
| 95 | 95 | return _DOCTYPE_ECRIRE |
| 96 | 96 | . html_lang_attributes() |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | function init_body($rubrique = 'accueil', $sous_rubrique = 'accueil', $id_rubrique = '', $menu = true) { |
| 134 | 134 | |
| 135 | 135 | $res = pipeline('body_prive', "<body class='" |
| 136 | - . init_body_class() . " " . _request('exec') . "'" |
|
| 136 | + . init_body_class()." "._request('exec')."'" |
|
| 137 | 137 | . ($GLOBALS['spip_lang_rtl'] ? " dir='rtl'" : "") |
| 138 | 138 | . '>'); |
| 139 | 139 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | $couleur = isset($prefs['couleur']) ? (int) $prefs['couleur'] : 9; |
| 178 | 178 | |
| 179 | - $classes = $GLOBALS['spip_ecran'] . " spip-theme-colors-$couleur $spip_display_navigation $spip_display_outils " . $display_class[$GLOBALS['spip_display']]; |
|
| 179 | + $classes = $GLOBALS['spip_ecran']." spip-theme-colors-$couleur $spip_display_navigation $spip_display_outils ".$display_class[$GLOBALS['spip_display']]; |
|
| 180 | 180 | return spip_sanitize_classname($classes); |
| 181 | 181 | } |
| 182 | 182 | |
@@ -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 = ''; |
@@ -209,15 +209,15 @@ discard block |
||
| 209 | 209 | else { |
| 210 | 210 | $domain = "@unknown-".md5($from).'.org'; |
| 211 | 211 | } |
| 212 | - $uniq = rand() . '_' . md5($to . $texte) . $domain; |
|
| 212 | + $uniq = rand().'_'.md5($to.$texte).$domain; |
|
| 213 | 213 | |
| 214 | 214 | // Si multi-part, s'en servir comme borne ... |
| 215 | 215 | if ($parts) { |
| 216 | - $texte = "--$uniq\n$type\n" . $texte . "\n"; |
|
| 216 | + $texte = "--$uniq\n$type\n".$texte."\n"; |
|
| 217 | 217 | foreach ($parts as $part) { |
| 218 | - $n = strlen($part[1]) . ($part[0] ? "\n" : ''); |
|
| 218 | + $n = strlen($part[1]).($part[0] ? "\n" : ''); |
|
| 219 | 219 | $e = join("\n", $part[0]); |
| 220 | - $texte .= "\n--$uniq\nContent-Length: $n$e\n\n" . $part[1]; |
|
| 220 | + $texte .= "\n--$uniq\nContent-Length: $n$e\n\n".$part[1]; |
|
| 221 | 221 | } |
| 222 | 222 | $texte .= "\n\n--$uniq--\n"; |
| 223 | 223 | // Si boundary n'est pas entre guillemets, |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | |
| 228 | 228 | // .. et s'en servir pour plaire a SpamAssassin |
| 229 | 229 | |
| 230 | - $mid = 'Message-Id: <' . $uniq . '>'; |
|
| 230 | + $mid = 'Message-Id: <'.$uniq.'>'; |
|
| 231 | 231 | |
| 232 | 232 | // indispensable pour les sites qui collent d'office From: serveur-http |
| 233 | 233 | // sauf si deja mis par l'envoyeur |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | |
| 253 | 253 | // https://code.spip.net/@_sqlite_func_preg_replace |
| 254 | 254 | function _sqlite_func_preg_replace($quoi, $cherche, $remplace) { |
| 255 | - $return = preg_replace('%' . $cherche . '%', $remplace, $quoi); |
|
| 255 | + $return = preg_replace('%'.$cherche.'%', $remplace, $quoi); |
|
| 256 | 256 | |
| 257 | 257 | #spip_log("preg_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); |
| 258 | 258 | return $return; |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | return false; |
| 309 | 309 | } |
| 310 | 310 | $u = isset($GLOBALS['meta']['pcre_u']) ? $GLOBALS['meta']['pcre_u'] : 'u'; |
| 311 | - $return = preg_match('%' . $cherche . '%imsS' . $u, $quoi); |
|
| 311 | + $return = preg_match('%'.$cherche.'%imsS'.$u, $quoi); |
|
| 312 | 312 | |
| 313 | 313 | #spip_log("regexp_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); |
| 314 | 314 | return $return; |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | $count = 0; |
| 358 | 358 | str_replace($mysql_to_strftime_not_ok, '', $conv, $count); |
| 359 | 359 | if ($count > 0) { |
| 360 | - spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.' . _LOG_ERREUR); |
|
| 360 | + spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.'._LOG_ERREUR); |
|
| 361 | 361 | } |
| 362 | 362 | $to_strftime[$conv] = str_replace(array_keys($mysql_to_strftime), $mysql_to_strftime, $conv); |
| 363 | 363 | } |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | */ |
| 375 | 375 | function _sqlite_func_to_days($d) { |
| 376 | 376 | static $offset = 719528; // nb de jour entre 0000-00-00 et timestamp 0=1970-01-01 |
| 377 | - $result = $offset + (int)ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600)); |
|
| 377 | + $result = $offset + (int) ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600)); |
|
| 378 | 378 | |
| 379 | 379 | #spip_log("Passage avec TO_DAYS : $d, $result",'sqlite.'._LOG_DEBUG); |
| 380 | 380 | return $result; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | if ($res) { |
| 55 | 55 | return $res; |
| 56 | 56 | } |
| 57 | - spip_log("meta: $script " . print_r($_POST, true)); |
|
| 57 | + spip_log("meta: $script ".print_r($_POST, true)); |
|
| 58 | 58 | ecrire_meta($script, serialize($_POST)); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | // on pourrait statuer automatiquement les webmestres a l'init d'une action auth par ftp ... ? |
| 124 | 124 | |
| 125 | - spip_log("admin $pref" . ($valeur ? ' (reprise)' : ' (init)'), $journal); |
|
| 125 | + spip_log("admin $pref".($valeur ? ' (reprise)' : ' (init)'), $journal); |
|
| 126 | 126 | |
| 127 | 127 | return ''; |
| 128 | 128 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | if (autoriser('configurer')) { |
| 141 | 141 | return _DIR_TMP; |
| 142 | 142 | } else { |
| 143 | - return _DIR_TRANSFERT . $GLOBALS['visiteur_session']['login'] . '/'; |
|
| 143 | + return _DIR_TRANSFERT.$GLOBALS['visiteur_session']['login'].'/'; |
|
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | |
@@ -158,8 +158,8 @@ discard block |
||
| 158 | 158 | * Nom du fichier |
| 159 | 159 | **/ |
| 160 | 160 | function fichier_admin($action, $pref = 'admin_') { |
| 161 | - return $pref . |
|
| 162 | - substr(md5($action . (time() & ~2047) . $GLOBALS['visiteur_session']['login']), 0, 10); |
|
| 161 | + return $pref. |
|
| 162 | + substr(md5($action.(time() & ~2047).$GLOBALS['visiteur_session']['login']), 0, 10); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | } else { |
| 193 | 193 | $dir = dir_admin(); |
| 194 | 194 | $signal = fichier_admin($script); |
| 195 | - if (@file_exists($dir . $signal)) { |
|
| 195 | + if (@file_exists($dir.$signal)) { |
|
| 196 | 196 | spip_log("Action admin: $action"); |
| 197 | 197 | |
| 198 | 198 | return ''; |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | return ''; |
| 211 | 211 | } |
| 212 | - $corps .= '<input type="hidden" name="validation_admin" value="' . $signal . '" />'; |
|
| 212 | + $corps .= '<input type="hidden" name="validation_admin" value="'.$signal.'" />'; |
|
| 213 | 213 | $suivant = _T('bouton_valider'); |
| 214 | 214 | $js = ''; |
| 215 | 215 | } else { |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | . "</legend>\n<label for='fichier'>" |
| 225 | 225 | . _T('info_creer_repertoire') |
| 226 | 226 | . "</label>\n" |
| 227 | - . "<span id='signal' class='formo'>" . $signal . '</span>' |
|
| 227 | + . "<span id='signal' class='formo'>".$signal.'</span>' |
|
| 228 | 228 | . "<input type='hidden' id='fichier' name='fichier' value='" |
| 229 | 229 | . $signal |
| 230 | 230 | . "' />" |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | * Nom de l'action (en base) qui a été exécutée |
| 262 | 262 | **/ |
| 263 | 263 | function fin_admin($action) { |
| 264 | - $signal = dir_admin() . fichier_admin($action); |
|
| 264 | + $signal = dir_admin().fichier_admin($action); |
|
| 265 | 265 | spip_unlink($signal); |
| 266 | 266 | if ($action != 'delete_all') { |
| 267 | 267 | effacer_meta($action); |
@@ -289,8 +289,8 @@ discard block |
||
| 289 | 289 | include_spip('inc/filtres'); |
| 290 | 290 | foreach (array_merge($_POST, $_GET) as $n => $c) { |
| 291 | 291 | if (!in_array($n, array('fichier', 'exec', 'validation_admin')) and !is_array($c)) { |
| 292 | - $suite .= "\n<input type='hidden' name='" . spip_htmlspecialchars($n) . "' value='" . |
|
| 293 | - entites_html($c) . |
|
| 292 | + $suite .= "\n<input type='hidden' name='".spip_htmlspecialchars($n)."' value='". |
|
| 293 | + entites_html($c). |
|
| 294 | 294 | "' />"; |
| 295 | 295 | } |
| 296 | 296 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $res['message_ok'] = _T('info_modification_enregistree'); |
| 101 | 101 | if ($retour) { |
| 102 | 102 | if (strncmp($retour, 'javascript:', 11) == 0) { |
| 103 | - $res['message_ok'] .= '<script type="text/javascript">/*<![CDATA[*/' . substr($retour, 11) . '/*]]>*/</script>'; |
|
| 103 | + $res['message_ok'] .= '<script type="text/javascript">/*<![CDATA[*/'.substr($retour, 11).'/*]]>*/</script>'; |
|
| 104 | 104 | $res['editable'] = true; |
| 105 | 105 | } else { |
| 106 | 106 | $res['redirect'] = parametre_url($retour, $id_table_objet, $id); |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | if (!isset($erreurs[$champ])) { |
| 141 | 141 | $erreurs[$champ] = ''; |
| 142 | 142 | } |
| 143 | - $erreurs[$champ] .= _T('alerte_modif_info_concourante') . "<br /><textarea readonly='readonly' class='forml'>" . entites_html($conflit['base']) . '</textarea>'; |
|
| 143 | + $erreurs[$champ] .= _T('alerte_modif_info_concourante')."<br /><textarea readonly='readonly' class='forml'>".entites_html($conflit['base']).'</textarea>'; |
|
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | } |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | // on accepte pas une fonction de config inconnue si elle vient d'un modele |
| 216 | 216 | if ($config_fonc |
| 217 | 217 | and !in_array($config_fonc, ['articles_edit_config', 'rubriques_edit_config', 'auteurs_edit_config']) |
| 218 | - and $config_fonc !== $table_objet . '_edit_config') { |
|
| 218 | + and $config_fonc !== $table_objet.'_edit_config') { |
|
| 219 | 219 | if ($args = test_formulaire_inclus_par_modele() |
| 220 | 220 | and in_array($config_fonc, $args)) { |
| 221 | 221 | $config_fonc = ''; |
@@ -227,12 +227,12 @@ discard block |
||
| 227 | 227 | // Appel direct dans un squelette |
| 228 | 228 | if (!$row) { |
| 229 | 229 | if (!$new or $lier_trad) { |
| 230 | - if ($select = charger_fonction('precharger_' . $type, 'inc', true)) { |
|
| 230 | + if ($select = charger_fonction('precharger_'.$type, 'inc', true)) { |
|
| 231 | 231 | $row = $select($id, $id_parent, $lier_trad); |
| 232 | 232 | // si on a une fonction precharger, elle pu faire un reglage de langue |
| 233 | 233 | $lang_default = (!empty($row['lang']) ? $row['lang'] : null); |
| 234 | 234 | } else { |
| 235 | - $row = sql_fetsel('*', $table_objet_sql, $id_table_objet . '=' . intval($id)); |
|
| 235 | + $row = sql_fetsel('*', $table_objet_sql, $id_table_objet.'='.intval($id)); |
|
| 236 | 236 | } |
| 237 | 237 | if (!$new) { |
| 238 | 238 | $md5 = controles_md5($row); |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | if ($config_fonc) { |
| 282 | 282 | $contexte['config'] = $config = $config_fonc($contexte); |
| 283 | 283 | if (!$lang_default) { |
| 284 | - $lang_default = $config['langue'] ?? session_get('lang') ; |
|
| 284 | + $lang_default = $config['langue'] ?? session_get('lang'); |
|
| 285 | 285 | } |
| 286 | 286 | } |
| 287 | 287 | $config = $config + array( |
@@ -305,13 +305,12 @@ discard block |
||
| 305 | 305 | unset($contexte['lang']); |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | - $contexte['_hidden'] = "<input type='hidden' name='editer_$type' value='oui' />\n" . |
|
| 309 | - (!$lier_trad ? '' : |
|
| 310 | - ("\n<input type='hidden' name='lier_trad' value='" . |
|
| 311 | - $lier_trad . |
|
| 312 | - "' />" . |
|
| 313 | - "\n<input type='hidden' name='changer_lang' value='" . |
|
| 314 | - $lang_default . |
|
| 308 | + $contexte['_hidden'] = "<input type='hidden' name='editer_$type' value='oui' />\n". |
|
| 309 | + (!$lier_trad ? '' : ("\n<input type='hidden' name='lier_trad' value='". |
|
| 310 | + $lier_trad. |
|
| 311 | + "' />". |
|
| 312 | + "\n<input type='hidden' name='changer_lang' value='". |
|
| 313 | + $lang_default. |
|
| 315 | 314 | "' />")) |
| 316 | 315 | . $hidden |
| 317 | 316 | . (isset($md5) ? $md5 : ''); |
@@ -325,8 +324,8 @@ discard block |
||
| 325 | 324 | $contexte['_action'] = array("editer_$type", $id); |
| 326 | 325 | |
| 327 | 326 | // et in fine placer l'autorisation |
| 328 | - if (intval($id)){ |
|
| 329 | - if (!autoriser('modifier', $type, intval($id))){ |
|
| 327 | + if (intval($id)) { |
|
| 328 | + if (!autoriser('modifier', $type, intval($id))) { |
|
| 330 | 329 | $valeurs['editable'] = ''; |
| 331 | 330 | } |
| 332 | 331 | } |
@@ -350,14 +349,14 @@ discard block |
||
| 350 | 349 | $aider = charger_fonction('aider', 'inc'); |
| 351 | 350 | if (strlen($texte) > 28 * 1024) { |
| 352 | 351 | $texte = str_replace("\r\n", "\n", $texte); |
| 353 | - $pos = strpos($texte, "\n\n", 28 * 1024); // coupe para > 28 ko |
|
| 352 | + $pos = strpos($texte, "\n\n", 28 * 1024); // coupe para > 28 ko |
|
| 354 | 353 | if ($pos > 0 and $pos < 32 * 1024) { |
| 355 | - $debut = substr($texte, 0, $pos) . "\n\n<!--SPIP-->\n"; |
|
| 354 | + $debut = substr($texte, 0, $pos)."\n\n<!--SPIP-->\n"; |
|
| 356 | 355 | $suite = substr($texte, $pos + 2); |
| 357 | 356 | } else { |
| 358 | - $pos = strpos($texte, ' ', 28 * 1024); // sinon coupe espace |
|
| 357 | + $pos = strpos($texte, ' ', 28 * 1024); // sinon coupe espace |
|
| 359 | 358 | if (!($pos > 0 and $pos < 32 * 1024)) { |
| 360 | - $pos = 28 * 1024; // au pire (pas d'espace trouv'e) |
|
| 359 | + $pos = 28 * 1024; // au pire (pas d'espace trouv'e) |
|
| 361 | 360 | $decalage = 0; // si y'a pas d'espace, il ne faut pas perdre le caract`ere |
| 362 | 361 | } else { |
| 363 | 362 | $decalage = 1; |
@@ -387,13 +386,13 @@ discard block |
||
| 387 | 386 | } |
| 388 | 387 | |
| 389 | 388 | include_spip('inc/barre'); |
| 390 | - $textes_supplement = "<br /><span style='color: red'>" . _T('info_texte_long') . "</span>\n"; |
|
| 389 | + $textes_supplement = "<br /><span style='color: red'>"._T('info_texte_long')."</span>\n"; |
|
| 391 | 390 | $nombre = 0; |
| 392 | 391 | |
| 393 | 392 | while (strlen($texte) > 29 * 1024) { |
| 394 | 393 | $nombre++; |
| 395 | 394 | list($texte1, $texte) = coupe_trop_long($texte); |
| 396 | - $textes_supplement .= '<br />' . |
|
| 395 | + $textes_supplement .= '<br />'. |
|
| 397 | 396 | "<textarea id='texte$nombre' name='texte_plus[$nombre]'$att_text>$texte1</textarea>\n"; |
| 398 | 397 | } |
| 399 | 398 | |
@@ -481,7 +480,7 @@ discard block |
||
| 481 | 480 | $ctr = array(); |
| 482 | 481 | foreach ($data as $key => $val) { |
| 483 | 482 | $m = md5($val); |
| 484 | - $k = $prefixe . $key; |
|
| 483 | + $k = $prefixe.$key; |
|
| 485 | 484 | |
| 486 | 485 | switch ($format) { |
| 487 | 486 | case 'html': |
@@ -494,7 +493,7 @@ discard block |
||
| 494 | 493 | } |
| 495 | 494 | |
| 496 | 495 | if ($format == 'html') { |
| 497 | - return "\n\n<!-- controles md5 -->\n" . join("\n", $ctr) . "\n\n"; |
|
| 496 | + return "\n\n<!-- controles md5 -->\n".join("\n", $ctr)."\n\n"; |
|
| 498 | 497 | } else { |
| 499 | 498 | return $ctr; |
| 500 | 499 | } |
@@ -645,7 +644,7 @@ discard block |
||
| 645 | 644 | // On elimine les donnees non modifiees par le formulaire (mais |
| 646 | 645 | // potentiellement modifiees entre temps par un autre utilisateur) |
| 647 | 646 | foreach ($champs as $key => $val) { |
| 648 | - if (isset($ctr[$prefix . $key]) and $m = $ctr[$prefix . $key]) { |
|
| 647 | + if (isset($ctr[$prefix.$key]) and $m = $ctr[$prefix.$key]) { |
|
| 649 | 648 | if (is_scalar($val) and $m == md5($val)) { |
| 650 | 649 | unset($champs[$key]); |
| 651 | 650 | } |
@@ -674,7 +673,7 @@ discard block |
||
| 674 | 673 | // de conflit. |
| 675 | 674 | $ctrh = $ctrq = $conflits = array(); |
| 676 | 675 | foreach (array_keys($champs) as $key) { |
| 677 | - if (isset($ctr[$prefix . $key]) and $m = $ctr[$prefix . $key]) { |
|
| 676 | + if (isset($ctr[$prefix.$key]) and $m = $ctr[$prefix.$key]) { |
|
| 678 | 677 | $ctrh[$key] = $m; |
| 679 | 678 | $ctrq[] = $key; |
| 680 | 679 | } |
@@ -707,9 +706,9 @@ discard block |
||
| 707 | 706 | */ |
| 708 | 707 | function display_conflit_champ($x) { |
| 709 | 708 | if (strstr($x, "\n") or strlen($x) > 80) { |
| 710 | - return "<textarea style='width:99%; height:10em;'>" . entites_html($x) . "</textarea>\n"; |
|
| 709 | + return "<textarea style='width:99%; height:10em;'>".entites_html($x)."</textarea>\n"; |
|
| 711 | 710 | } else { |
| 712 | - return "<input type='text' size='40' style='width:99%' value=\"" . entites_html($x) . "\" />\n"; |
|
| 711 | + return "<input type='text' size='40' style='width:99%' value=\"".entites_html($x)."\" />\n"; |
|
| 713 | 712 | } |
| 714 | 713 | } |
| 715 | 714 | |
@@ -749,11 +748,11 @@ discard block |
||
| 749 | 748 | ) : $champ; |
| 750 | 749 | |
| 751 | 750 | $diffs[] = "<h2>$titre</h2>\n" |
| 752 | - . '<h3>' . _T('info_conflit_edition_differences') . "</h3>\n" |
|
| 753 | - . "<div style='max-height:8em; overflow: auto; width:99%;'>" . $d . "</div>\n" |
|
| 754 | - . '<h4>' . _T('info_conflit_edition_votre_version') . '</h4>' |
|
| 751 | + . '<h3>'._T('info_conflit_edition_differences')."</h3>\n" |
|
| 752 | + . "<div style='max-height:8em; overflow: auto; width:99%;'>".$d."</div>\n" |
|
| 753 | + . '<h4>'._T('info_conflit_edition_votre_version').'</h4>' |
|
| 755 | 754 | . display_conflit_champ($a['post']) |
| 756 | - . '<h4>' . _T('info_conflit_edition_version_enregistree') . '</h4>' |
|
| 755 | + . '<h4>'._T('info_conflit_edition_version_enregistree').'</h4>' |
|
| 757 | 756 | . display_conflit_champ($base); |
| 758 | 757 | } |
| 759 | 758 | |
@@ -761,16 +760,16 @@ discard block |
||
| 761 | 760 | $id = uniqid(rand()); |
| 762 | 761 | $redirect = "<form action='$redirect' method='get' |
| 763 | 762 | id='$id' |
| 764 | - style='float:" . $GLOBALS['spip_lang_right'] . "; margin-top:2em;'>\n" |
|
| 763 | + style='float:".$GLOBALS['spip_lang_right']."; margin-top:2em;'>\n" |
|
| 765 | 764 | . form_hidden($redirect) |
| 766 | - . "<input type='submit' value='" . _T('icone_retour') . "' /> |
|
| 765 | + . "<input type='submit' value='"._T('icone_retour')."' /> |
|
| 767 | 766 | </form>\n"; |
| 768 | 767 | |
| 769 | 768 | // pour les documents, on est probablement en ajax : il faut ajaxer |
| 770 | 769 | if (_AJAX) { |
| 771 | 770 | $redirect .= '<script type="text/javascript">' |
| 772 | - . 'setTimeout(function(){$("#' . $id . '") |
|
| 773 | - .ajaxForm({target:$("#' . $id . '").parent()}); |
|
| 771 | + . 'setTimeout(function(){$("#'.$id.'") |
|
| 772 | + .ajaxForm({target:$("#' . $id.'").parent()}); |
|
| 774 | 773 | }, 200);' |
| 775 | 774 | . "</script>\n"; |
| 776 | 775 | } |
@@ -789,9 +788,9 @@ discard block |
||
| 789 | 788 | .diff-para-deplace .diff-supprime { background: #ffb8b8; border: 1px solid #808080; } |
| 790 | 789 | .diff-para-deplace .diff-deplace { background: #b8b8ff; border: 1px solid #808080; } |
| 791 | 790 | </style>' |
| 792 | - . '<p>' . _T('info_conflit_edition_avis_non_sauvegarde') . '</p>' |
|
| 793 | - . '<p>' . _T('texte_conflit_edition_correction') . '</p>' |
|
| 794 | - . "<div style='text-align:" . $GLOBALS['spip_lang_left'] . ";'>" |
|
| 791 | + . '<p>'._T('info_conflit_edition_avis_non_sauvegarde').'</p>' |
|
| 792 | + . '<p>'._T('texte_conflit_edition_correction').'</p>' |
|
| 793 | + . "<div style='text-align:".$GLOBALS['spip_lang_left'].";'>" |
|
| 795 | 794 | . join("\n", $diffs) |
| 796 | 795 | . "</div>\n" |
| 797 | 796 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | $erreurs_etapes = array(); |
| 230 | 230 | $derniere_etape_ok = 0; |
| 231 | 231 | $e = 0; |
| 232 | - while ($e < max($etape, $etape_demandee -1) and $e < $etapes) { |
|
| 232 | + while ($e < max($etape, $etape_demandee - 1) and $e < $etapes) { |
|
| 233 | 233 | $e++; |
| 234 | 234 | $erreurs_etapes[$e] = array(); |
| 235 | 235 | if ($verifier = charger_fonction("verifier_$e", "formulaires/$form/", true)) { |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | // si la derniere etape OK etait la derniere |
| 268 | 268 | // on renvoie le flux inchange et ca declenche traiter |
| 269 | 269 | if ($derniere_etape_ok == $etapes |
| 270 | - and (!$etape_demandee or $etape_demandee>=$etapes)) { |
|
| 270 | + and (!$etape_demandee or $etape_demandee >= $etapes)) { |
|
| 271 | 271 | return $erreurs; |
| 272 | 272 | } else { |
| 273 | 273 | $etape = $derniere_etape_ok + 1; |
@@ -309,9 +309,9 @@ discard block |
||
| 309 | 309 | and ($e = $flux['args']['contexte']['_etape']) > 1 |
| 310 | 310 | and $ext = $flux['args']['ext'] |
| 311 | 311 | and $f = $flux['data'] |
| 312 | - and file_exists($f . "_$e.$ext") |
|
| 312 | + and file_exists($f."_$e.$ext") |
|
| 313 | 313 | ) { |
| 314 | - $flux['data'] = $f . "_$e"; |
|
| 314 | + $flux['data'] = $f."_$e"; |
|
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | return $flux; |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | if (strlen($intro)) { |
| 84 | 84 | $texte = $intro; |
| 85 | 85 | } else { |
| 86 | - if (strpos("\n" . $texte, "\n|") === false |
|
| 86 | + if (strpos("\n".$texte, "\n|") === false |
|
| 87 | 87 | and strlen($texte) > 2.5 * $longueur |
| 88 | 88 | ) { |
| 89 | 89 | if (strpos($texte, "<multi") !== false) { |
@@ -168,12 +168,12 @@ discard block |
||
| 168 | 168 | if ($pas < 1) { |
| 169 | 169 | return ''; |
| 170 | 170 | } |
| 171 | - $ancre = 'pagination' . $nom; // #pagination_articles |
|
| 172 | - $debut = 'debut' . $nom; // 'debut_articles' |
|
| 171 | + $ancre = 'pagination'.$nom; // #pagination_articles |
|
| 172 | + $debut = 'debut'.$nom; // 'debut_articles' |
|
| 173 | 173 | |
| 174 | 174 | // n'afficher l'ancre qu'une fois |
| 175 | 175 | if (!isset($ancres[$ancre])) { |
| 176 | - $bloc_ancre = $ancres[$ancre] = "<a id='" . $ancre . "' class='pagination_ancre'></a>"; |
|
| 176 | + $bloc_ancre = $ancres[$ancre] = "<a id='".$ancre."' class='pagination_ancre'></a>"; |
|
| 177 | 177 | } else { |
| 178 | 178 | $bloc_ancre = ''; |
| 179 | 179 | } |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | if ($modele) { |
| 207 | 207 | $pagination['type_pagination'] = $modele; |
| 208 | 208 | if (trouver_fond('pagination_'.$modele, 'modeles')) { |
| 209 | - $modele = '_' . $modele; |
|
| 209 | + $modele = '_'.$modele; |
|
| 210 | 210 | } |
| 211 | 211 | else { |
| 212 | 212 | $modele = ''; |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | * @param $objet_lien |
| 338 | 338 | * @return string |
| 339 | 339 | */ |
| 340 | -function retrouver_rang_lien($objet_source, $ids, $objet_lie, $idl, $objet_lien){ |
|
| 340 | +function retrouver_rang_lien($objet_source, $ids, $objet_lie, $idl, $objet_lien) { |
|
| 341 | 341 | $res = lister_objets_liens($objet_source, $objet_lie, $idl, $objet_lien); |
| 342 | 342 | $res = array_column($res, 'rang_lien', $objet_source); |
| 343 | 343 | |
@@ -492,12 +492,12 @@ discard block |
||
| 492 | 492 | * @param string $serveur |
| 493 | 493 | * @return string |
| 494 | 494 | */ |
| 495 | -function formate_liste_critere_par_ordre_liste($valeurs, $serveur = ''){ |
|
| 496 | - if (!is_array($valeurs)){ |
|
| 495 | +function formate_liste_critere_par_ordre_liste($valeurs, $serveur = '') { |
|
| 496 | + if (!is_array($valeurs)) { |
|
| 497 | 497 | return ''; |
| 498 | 498 | } |
| 499 | 499 | $f = sql_serveur('quote', $serveur, true); |
| 500 | - if (!is_string($f) or !$f){ |
|
| 500 | + if (!is_string($f) or !$f) { |
|
| 501 | 501 | return ''; |
| 502 | 502 | } |
| 503 | 503 | $valeurs = implode(',', array_map($f, array_unique($valeurs))); |
@@ -176,14 +176,14 @@ discard block |
||
| 176 | 176 | // sache qu'il peut enlever ce where si il enleve la jointure |
| 177 | 177 | $boucle->where["JOIN-L$n"] = |
| 178 | 178 | $echap ? |
| 179 | - array("'='","'$obj'","sql_quote('$type')") |
|
| 179 | + array("'='", "'$obj'", "sql_quote('$type')") |
|
| 180 | 180 | : |
| 181 | - array("=","$obj",sql_quote($type)); |
|
| 181 | + array("=", "$obj", sql_quote($type)); |
|
| 182 | 182 | $boucle->join["L$n"] = |
| 183 | 183 | $echap ? |
| 184 | 184 | array("'$id_table'", "'$j2'", "'$j1'", "'$obj='.sql_quote('$type')") |
| 185 | 185 | : |
| 186 | - array($id_table, $j2, $j1, "$obj=" . sql_quote($type)); |
|
| 186 | + array($id_table, $j2, $j1, "$obj=".sql_quote($type)); |
|
| 187 | 187 | } else { |
| 188 | 188 | $boucle->join["L$n"] = $echap ? array("'$id_table'", "'$j'") : array($id_table, $j); |
| 189 | 189 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $groups = liste_champs_jointures($nom, $desc, true); |
| 217 | 217 | if (!$pk) { |
| 218 | 218 | foreach ($groups as $id_prim) { |
| 219 | - $id_field = $nom . '.' . $id_prim; |
|
| 219 | + $id_field = $nom.'.'.$id_prim; |
|
| 220 | 220 | if (!in_array($id_field, $boucle->group)) { |
| 221 | 221 | $boucle->group[] = $id_field; |
| 222 | 222 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | } else { |
| 82 | 82 | // Preparer l'appel de la fonction principale du squelette |
| 83 | 83 | |
| 84 | - spip_timer($a = 'calcul page ' . rand(0, 1000)); |
|
| 84 | + spip_timer($a = 'calcul page '.rand(0, 1000)); |
|
| 85 | 85 | |
| 86 | 86 | // On cree un marqueur de notes unique lie a cette composition |
| 87 | 87 | // et on enregistre l'etat courant des globales de notes... |
@@ -113,8 +113,8 @@ discard block |
||
| 113 | 113 | try { |
| 114 | 114 | $page = $fonc(array('cache' => $cache), array($contexte)); |
| 115 | 115 | } catch (Throwable $e) { |
| 116 | - $msg = _T('zbug_erreur_execution_page') . " $sourcefile"; |
|
| 117 | - $full_msg = $msg . ' | File ' . $e->getFile() . ' Line ' . $e->getLine() . ' : ' . $e->getMessage(); |
|
| 116 | + $msg = _T('zbug_erreur_execution_page')." $sourcefile"; |
|
| 117 | + $full_msg = $msg.' | File '.$e->getFile().' Line '.$e->getLine().' : '.$e->getMessage(); |
|
| 118 | 118 | $full_msg = str_replace(_ROOT_RACINE, '[…]/', $full_msg); |
| 119 | 119 | $corps = "<pre>$msg</pre>"; |
| 120 | 120 | $page = analyse_resultat_skel($fond, array('cache' => $cache), $corps, $sourcefile); |
@@ -145,17 +145,17 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $profile = spip_timer($a); |
| 147 | 147 | spip_log("calcul ($profile) [$skel] $infos" |
| 148 | - . ' (' . strlen($page['texte']) . ' octets)'); |
|
| 148 | + . ' ('.strlen($page['texte']).' octets)'); |
|
| 149 | 149 | |
| 150 | - if (defined('_CALCUL_PROFILER') AND intval($profile)>_CALCUL_PROFILER){ |
|
| 150 | + if (defined('_CALCUL_PROFILER') AND intval($profile) > _CALCUL_PROFILER) { |
|
| 151 | 151 | spip_log("calcul ($profile) [$skel] $infos" |
| 152 | - .' ('.strlen($page['texte']).' octets) | '.$_SERVER['REQUEST_URI'],"profiler"._LOG_AVERTISSEMENT); |
|
| 152 | + .' ('.strlen($page['texte']).' octets) | '.$_SERVER['REQUEST_URI'], "profiler"._LOG_AVERTISSEMENT); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | if ($debug) { |
| 156 | 156 | // si c'est ce que demande le debusqueur, lui passer la main |
| 157 | 157 | $t = strlen($page['texte']) ? $page['texte'] : " "; |
| 158 | - $GLOBALS['debug_objets']['resultat'][$fonc . 'tout'] = $t; |
|
| 158 | + $GLOBALS['debug_objets']['resultat'][$fonc.'tout'] = $t; |
|
| 159 | 159 | $GLOBALS['debug_objets']['courant'] = $courant; |
| 160 | 160 | $GLOBALS['debug_objets']['profile'][$sourcefile] = $profile; |
| 161 | 161 | if ($GLOBALS['debug_objets']['sourcefile'] |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | if (defined('_VAR_INCLURE') and _VAR_INCLURE) { |
| 186 | 186 | $page['sourcefile'] = $sourcefile; |
| 187 | 187 | $page['texte'] = |
| 188 | - "<div class='inclure_blocs'><h6>" . $page['sourcefile'] . "</h6>" . $page['texte'] . "</div>" |
|
| 188 | + "<div class='inclure_blocs'><h6>".$page['sourcefile']."</h6>".$page['texte']."</div>" |
|
| 189 | 189 | . ($js_inclus ? "" : "<script type='text/javascript'>jQuery(function(){jQuery('.inclure_blocs > h6:first-child').hover(function(){jQuery(this).parent().addClass('hover')},function(){jQuery(this).parent().removeClass('hover')})});</script>"); |
| 190 | 190 | $js_inclus = true; |
| 191 | 191 | } |
@@ -220,21 +220,21 @@ discard block |
||
| 220 | 220 | } |
| 221 | 221 | if (is_array($val)) { |
| 222 | 222 | if ($profondeur_max > 0) { |
| 223 | - $val = 'array:' . count($val) . '(' . presenter_contexte($val, $profondeur_max - 1, 3) . ')'; |
|
| 223 | + $val = 'array:'.count($val).'('.presenter_contexte($val, $profondeur_max - 1, 3).')'; |
|
| 224 | 224 | } else { |
| 225 | - $val = 'array:' . count($val); |
|
| 225 | + $val = 'array:'.count($val); |
|
| 226 | 226 | } |
| 227 | 227 | } elseif (is_object($val)) { |
| 228 | 228 | $val = get_class($val); |
| 229 | 229 | } elseif (strlen("$val") > 30) { |
| 230 | - $val = substr("$val", 0, 29) . '…'; |
|
| 230 | + $val = substr("$val", 0, 29).'…'; |
|
| 231 | 231 | if (strstr($val, ' ')) { |
| 232 | 232 | $val = "'$val'"; |
| 233 | 233 | } |
| 234 | 234 | } elseif (strstr($val, ' ')) { |
| 235 | 235 | $val = "'$val'"; |
| 236 | 236 | } |
| 237 | - $infos[] = $var . '=' . $val; |
|
| 237 | + $infos[] = $var.'='.$val; |
|
| 238 | 238 | } |
| 239 | 239 | return join(', ', $infos); |
| 240 | 240 | } |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | . "?php include_spip('inc/headers');redirige_par_entete('" |
| 302 | 302 | . texte_script($url) |
| 303 | 303 | . "','',$status);" |
| 304 | - . "?" . ">", |
|
| 304 | + . "?".">", |
|
| 305 | 305 | 'process_ins' => 'php', |
| 306 | 306 | 'status' => $status |
| 307 | 307 | ); |