@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $t = time() - (4 * _RENOUVELLE_ALEA); |
| 84 | 84 | while (($f = readdir($dir)) !== false) { |
| 85 | 85 | if (preg_match(",^[^\d-]*(-?\d+)_\w{32}\.php[3]?$,", $f, $regs)) { |
| 86 | - $f = _DIR_SESSIONS . $f; |
|
| 86 | + $f = _DIR_SESSIONS.$f; |
|
| 87 | 87 | if (($actives and $regs[1] == $id_auteur) or ($t > filemtime($f))) { |
| 88 | 88 | spip_unlink($f); |
| 89 | 89 | } |
@@ -160,9 +160,9 @@ discard block |
||
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | if (!isset($_COOKIE['spip_session']) |
| 163 | - or !preg_match(',^' . $id_auteur . '_,', $_COOKIE['spip_session']) |
|
| 163 | + or !preg_match(',^'.$id_auteur.'_,', $_COOKIE['spip_session']) |
|
| 164 | 164 | ) { |
| 165 | - $_COOKIE['spip_session'] = $id_auteur . '_' . md5(uniqid(rand(), true)); |
|
| 165 | + $_COOKIE['spip_session'] = $id_auteur.'_'.md5(uniqid(rand(), true)); |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | // Maintenant on sait qu'on a des choses à écrire |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | } else { |
| 192 | 192 | $fichier_session = fichier_session('alea_ephemere'); |
| 193 | 193 | if (!ecrire_fichier_session($fichier_session, $auteur)) { |
| 194 | - spip_log('Echec ecriture fichier session ' . $fichier_session, "session" . _LOG_HS); |
|
| 194 | + spip_log('Echec ecriture fichier session '.$fichier_session, "session"._LOG_HS); |
|
| 195 | 195 | include_spip('inc/minipres'); |
| 196 | 196 | echo minipres(); |
| 197 | 197 | exit; |
@@ -204,15 +204,15 @@ discard block |
||
| 204 | 204 | // poser le cookie de session SPIP |
| 205 | 205 | include_spip('inc/cookie'); |
| 206 | 206 | $duree = definir_duree_cookie_session($auteur); |
| 207 | - spip_setcookie( 'spip_session', $_COOKIE['spip_session'], time() + $duree); |
|
| 207 | + spip_setcookie('spip_session', $_COOKIE['spip_session'], time() + $duree); |
|
| 208 | 208 | spip_log("ajoute session $fichier_session cookie $duree", "session"); |
| 209 | 209 | |
| 210 | 210 | // Si on est admin, poser le cookie de correspondance |
| 211 | 211 | if (!function_exists('autoriser')) { |
| 212 | 212 | include_spip('inc/autoriser'); |
| 213 | 213 | } |
| 214 | - if (autoriser('ecrire','','',$auteur) and _DUREE_COOKIE_ADMIN) { |
|
| 215 | - spip_setcookie('spip_admin', '@' . $auteur['login'], time() + max(_DUREE_COOKIE_ADMIN, $duree)); |
|
| 214 | + if (autoriser('ecrire', '', '', $auteur) and _DUREE_COOKIE_ADMIN) { |
|
| 215 | + spip_setcookie('spip_admin', '@'.$auteur['login'], time() + max(_DUREE_COOKIE_ADMIN, $duree)); |
|
| 216 | 216 | } // sinon le supprimer ... |
| 217 | 217 | else { |
| 218 | 218 | spip_setcookie('spip_admin', '', 1); |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | $coef = 20; |
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | - return (int)(_RENOUVELLE_ALEA * $coef); |
|
| 252 | + return (int) (_RENOUVELLE_ALEA * $coef); |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | /** |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | |
| 298 | 298 | // Renouveler la session avec l'alea courant |
| 299 | 299 | include($fichier_session); |
| 300 | - spip_log('renouvelle session ' . $GLOBALS['visiteur_session']['id_auteur'], "session"); |
|
| 300 | + spip_log('renouvelle session '.$GLOBALS['visiteur_session']['id_auteur'], "session"); |
|
| 301 | 301 | spip_unlink($fichier_session); |
| 302 | 302 | ajouter_session($GLOBALS['visiteur_session']); |
| 303 | 303 | } |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | } |
| 330 | 330 | } else { |
| 331 | 331 | if ($change) { |
| 332 | - spip_log("rejoue session $fichier_session " . $_COOKIE['spip_session'], "session"); |
|
| 332 | + spip_log("rejoue session $fichier_session ".$_COOKIE['spip_session'], "session"); |
|
| 333 | 333 | if ($fichier_session) { |
| 334 | 334 | spip_unlink($fichier_session); |
| 335 | 335 | } |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | } |
| 542 | 542 | |
| 543 | 543 | // liste des sessions |
| 544 | - $sessions = preg_files(_DIR_SESSIONS, '/' . $id_auteur . '_.*\.php$'); |
|
| 544 | + $sessions = preg_files(_DIR_SESSIONS, '/'.$id_auteur.'_.*\.php$'); |
|
| 545 | 545 | |
| 546 | 546 | // si on en a plus que la limite, supprimer les plus vieilles |
| 547 | 547 | // si ce ne sont pas des sessions anonymes car elles sont alors chacune differentes |
@@ -620,12 +620,12 @@ discard block |
||
| 620 | 620 | $auteur = preparer_ecriture_session($auteur); |
| 621 | 621 | |
| 622 | 622 | // enregistrer les autres donnees du visiteur |
| 623 | - $texte = "<" . "?php\n"; |
|
| 623 | + $texte = "<"."?php\n"; |
|
| 624 | 624 | foreach ($auteur as $var => $val) { |
| 625 | - $texte .= '$GLOBALS[\'visiteur_session\'][\'' . $var . '\'] = ' |
|
| 626 | - . var_export($val, true) . ";\n"; |
|
| 625 | + $texte .= '$GLOBALS[\'visiteur_session\'][\''.$var.'\'] = ' |
|
| 626 | + . var_export($val, true).";\n"; |
|
| 627 | 627 | } |
| 628 | - $texte .= "?" . ">\n"; |
|
| 628 | + $texte .= "?".">\n"; |
|
| 629 | 629 | |
| 630 | 630 | return ecrire_fichier($fichier, $texte); |
| 631 | 631 | } |
@@ -655,7 +655,7 @@ discard block |
||
| 655 | 655 | $repertoire = sous_repertoire(_DIR_SESSIONS, '', false, $tantpis); |
| 656 | 656 | $c = $_COOKIE['spip_session']; |
| 657 | 657 | |
| 658 | - return $repertoire . intval($c) . '_' . md5($c . ' ' . $GLOBALS['meta'][$alea]) . '.php'; |
|
| 658 | + return $repertoire.intval($c).'_'.md5($c.' '.$GLOBALS['meta'][$alea]).'.php'; |
|
| 659 | 659 | } |
| 660 | 660 | } |
| 661 | 661 | |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | * @return string |
| 674 | 674 | */ |
| 675 | 675 | function rejouer_session() { |
| 676 | - return '<img src="' . generer_url_action('cookie', 'change_session=oui', true) . '" width="0" height="0" alt="" />'; |
|
| 676 | + return '<img src="'.generer_url_action('cookie', 'change_session=oui', true).'" width="0" height="0" alt="" />'; |
|
| 677 | 677 | } |
| 678 | 678 | |
| 679 | 679 | |
@@ -688,7 +688,7 @@ discard block |
||
| 688 | 688 | return $res; |
| 689 | 689 | } |
| 690 | 690 | |
| 691 | - return $res = md5($GLOBALS['ip'] . (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '')); |
|
| 691 | + return $res = md5($GLOBALS['ip'].(isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '')); |
|
| 692 | 692 | } |
| 693 | 693 | |
| 694 | 694 | |
@@ -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); |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | // recuperer le secteur, pour affecter les bons champs extras |
| 103 | 103 | if ($id_rubrique and $is_secteur) { |
| 104 | 104 | if (!$row['id_secteur']) { |
| 105 | - $row_rub = sql_getfetsel("id_secteur", "spip_rubriques", "id_rubrique=" . sql_quote($id_rubrique)); |
|
| 105 | + $row_rub = sql_getfetsel("id_secteur", "spip_rubriques", "id_rubrique=".sql_quote($id_rubrique)); |
|
| 106 | 106 | $row['id_secteur'] = $row_rub; |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | $row = sql_fetsel("*", $table, "$_id_objet=$lier_trad"); |
| 137 | 137 | if ($row) { |
| 138 | 138 | include_spip('inc/filtres'); |
| 139 | - $row[$champ_titre] = filtrer_entites(objet_T($type, 'info_nouvelle_traduction')) . ' ' . $row[$champ_titre]; |
|
| 139 | + $row[$champ_titre] = filtrer_entites(objet_T($type, 'info_nouvelle_traduction')).' '.$row[$champ_titre]; |
|
| 140 | 140 | } else { |
| 141 | 141 | $row = array(); |
| 142 | 142 | } |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | $row_rub = sql_fetsel("id_rubrique", "spip_rubriques", |
| 180 | - "lang='" . $GLOBALS['spip_lang'] . "' AND id_parent=$id_parent"); |
|
| 180 | + "lang='".$GLOBALS['spip_lang']."' AND id_parent=$id_parent"); |
|
| 181 | 181 | if ($row_rub) { |
| 182 | 182 | $row['id_rubrique'] = $row_rub['id_rubrique']; |
| 183 | 183 | } |
@@ -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'>" . $conflit['base'] . '</textarea>'; |
|
| 143 | + $erreurs[$champ] .= _T('alerte_modif_info_concourante')."<br /><textarea readonly='readonly' class='forml'>".$conflit['base'].'</textarea>'; |
|
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | } |
@@ -214,10 +214,10 @@ discard block |
||
| 214 | 214 | // Appel direct dans un squelette |
| 215 | 215 | if (!$row) { |
| 216 | 216 | if (!$new or $lier_trad) { |
| 217 | - if ($select = charger_fonction('precharger_' . $type, 'inc', true)) { |
|
| 217 | + if ($select = charger_fonction('precharger_'.$type, 'inc', true)) { |
|
| 218 | 218 | $row = $select($id, $id_parent, $lier_trad); |
| 219 | 219 | } else { |
| 220 | - $row = sql_fetsel('*', $table_objet_sql, $id_table_objet . '=' . intval($id)); |
|
| 220 | + $row = sql_fetsel('*', $table_objet_sql, $id_table_objet.'='.intval($id)); |
|
| 221 | 221 | } |
| 222 | 222 | if (!$new) { |
| 223 | 223 | $md5 = controles_md5($row); |
@@ -287,13 +287,12 @@ discard block |
||
| 287 | 287 | unset($contexte['lang']); |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | - $contexte['_hidden'] = "<input type='hidden' name='editer_$type' value='oui' />\n" . |
|
| 291 | - (!$lier_trad ? '' : |
|
| 292 | - ("\n<input type='hidden' name='lier_trad' value='" . |
|
| 293 | - $lier_trad . |
|
| 294 | - "' />" . |
|
| 295 | - "\n<input type='hidden' name='changer_lang' value='" . |
|
| 296 | - $config['langue'] . |
|
| 290 | + $contexte['_hidden'] = "<input type='hidden' name='editer_$type' value='oui' />\n". |
|
| 291 | + (!$lier_trad ? '' : ("\n<input type='hidden' name='lier_trad' value='". |
|
| 292 | + $lier_trad. |
|
| 293 | + "' />". |
|
| 294 | + "\n<input type='hidden' name='changer_lang' value='". |
|
| 295 | + $config['langue']. |
|
| 297 | 296 | "' />")) |
| 298 | 297 | . $hidden |
| 299 | 298 | . (isset($md5) ? $md5 : ''); |
@@ -320,14 +319,14 @@ discard block |
||
| 320 | 319 | $aider = charger_fonction('aider', 'inc'); |
| 321 | 320 | if (strlen($texte) > 28 * 1024) { |
| 322 | 321 | $texte = str_replace("\r\n", "\n", $texte); |
| 323 | - $pos = strpos($texte, "\n\n", 28 * 1024); // coupe para > 28 ko |
|
| 322 | + $pos = strpos($texte, "\n\n", 28 * 1024); // coupe para > 28 ko |
|
| 324 | 323 | if ($pos > 0 and $pos < 32 * 1024) { |
| 325 | - $debut = substr($texte, 0, $pos) . "\n\n<!--SPIP-->\n"; |
|
| 324 | + $debut = substr($texte, 0, $pos)."\n\n<!--SPIP-->\n"; |
|
| 326 | 325 | $suite = substr($texte, $pos + 2); |
| 327 | 326 | } else { |
| 328 | - $pos = strpos($texte, ' ', 28 * 1024); // sinon coupe espace |
|
| 327 | + $pos = strpos($texte, ' ', 28 * 1024); // sinon coupe espace |
|
| 329 | 328 | if (!($pos > 0 and $pos < 32 * 1024)) { |
| 330 | - $pos = 28 * 1024; // au pire (pas d'espace trouv'e) |
|
| 329 | + $pos = 28 * 1024; // au pire (pas d'espace trouv'e) |
|
| 331 | 330 | $decalage = 0; // si y'a pas d'espace, il ne faut pas perdre le caract`ere |
| 332 | 331 | } else { |
| 333 | 332 | $decalage = 1; |
@@ -357,13 +356,13 @@ discard block |
||
| 357 | 356 | } |
| 358 | 357 | |
| 359 | 358 | include_spip('inc/barre'); |
| 360 | - $textes_supplement = "<br /><span style='color: red'>" . _T('info_texte_long') . "</span>\n"; |
|
| 359 | + $textes_supplement = "<br /><span style='color: red'>"._T('info_texte_long')."</span>\n"; |
|
| 361 | 360 | $nombre = 0; |
| 362 | 361 | |
| 363 | 362 | while (strlen($texte) > 29 * 1024) { |
| 364 | 363 | $nombre++; |
| 365 | 364 | list($texte1, $texte) = coupe_trop_long($texte); |
| 366 | - $textes_supplement .= '<br />' . |
|
| 365 | + $textes_supplement .= '<br />'. |
|
| 367 | 366 | "<textarea id='texte$nombre' name='texte_plus[$nombre]'$att_text>$texte1</textarea>\n"; |
| 368 | 367 | } |
| 369 | 368 | |
@@ -451,7 +450,7 @@ discard block |
||
| 451 | 450 | $ctr = array(); |
| 452 | 451 | foreach ($data as $key => $val) { |
| 453 | 452 | $m = md5($val); |
| 454 | - $k = $prefixe . $key; |
|
| 453 | + $k = $prefixe.$key; |
|
| 455 | 454 | |
| 456 | 455 | switch ($format) { |
| 457 | 456 | case 'html': |
@@ -464,7 +463,7 @@ discard block |
||
| 464 | 463 | } |
| 465 | 464 | |
| 466 | 465 | if ($format == 'html') { |
| 467 | - return "\n\n<!-- controles md5 -->\n" . join("\n", $ctr) . "\n\n"; |
|
| 466 | + return "\n\n<!-- controles md5 -->\n".join("\n", $ctr)."\n\n"; |
|
| 468 | 467 | } else { |
| 469 | 468 | return $ctr; |
| 470 | 469 | } |
@@ -615,7 +614,7 @@ discard block |
||
| 615 | 614 | // On elimine les donnees non modifiees par le formulaire (mais |
| 616 | 615 | // potentiellement modifiees entre temps par un autre utilisateur) |
| 617 | 616 | foreach ($champs as $key => $val) { |
| 618 | - if (isset($ctr[$prefix . $key]) and $m = $ctr[$prefix . $key]) { |
|
| 617 | + if (isset($ctr[$prefix.$key]) and $m = $ctr[$prefix.$key]) { |
|
| 619 | 618 | if (is_scalar($val) and $m == md5($val)) { |
| 620 | 619 | unset($champs[$key]); |
| 621 | 620 | } |
@@ -644,7 +643,7 @@ discard block |
||
| 644 | 643 | // de conflit. |
| 645 | 644 | $ctrh = $ctrq = $conflits = array(); |
| 646 | 645 | foreach (array_keys($champs) as $key) { |
| 647 | - if (isset($ctr[$prefix . $key]) and $m = $ctr[$prefix . $key]) { |
|
| 646 | + if (isset($ctr[$prefix.$key]) and $m = $ctr[$prefix.$key]) { |
|
| 648 | 647 | $ctrh[$key] = $m; |
| 649 | 648 | $ctrq[] = $key; |
| 650 | 649 | } |
@@ -677,9 +676,9 @@ discard block |
||
| 677 | 676 | */ |
| 678 | 677 | function display_conflit_champ($x) { |
| 679 | 678 | if (strstr($x, "\n") or strlen($x) > 80) { |
| 680 | - return "<textarea style='width:99%; height:10em;'>" . entites_html($x) . "</textarea>\n"; |
|
| 679 | + return "<textarea style='width:99%; height:10em;'>".entites_html($x)."</textarea>\n"; |
|
| 681 | 680 | } else { |
| 682 | - return "<input type='text' size='40' style='width:99%' value=\"" . entites_html($x) . "\" />\n"; |
|
| 681 | + return "<input type='text' size='40' style='width:99%' value=\"".entites_html($x)."\" />\n"; |
|
| 683 | 682 | } |
| 684 | 683 | } |
| 685 | 684 | |
@@ -719,11 +718,11 @@ discard block |
||
| 719 | 718 | ) : $champ; |
| 720 | 719 | |
| 721 | 720 | $diffs[] = "<h2>$titre</h2>\n" |
| 722 | - . '<h3>' . _T('info_conflit_edition_differences') . "</h3>\n" |
|
| 723 | - . "<div style='max-height:8em; overflow: auto; width:99%;'>" . $d . "</div>\n" |
|
| 724 | - . '<h4>' . _T('info_conflit_edition_votre_version') . '</h4>' |
|
| 721 | + . '<h3>'._T('info_conflit_edition_differences')."</h3>\n" |
|
| 722 | + . "<div style='max-height:8em; overflow: auto; width:99%;'>".$d."</div>\n" |
|
| 723 | + . '<h4>'._T('info_conflit_edition_votre_version').'</h4>' |
|
| 725 | 724 | . display_conflit_champ($a['post']) |
| 726 | - . '<h4>' . _T('info_conflit_edition_version_enregistree') . '</h4>' |
|
| 725 | + . '<h4>'._T('info_conflit_edition_version_enregistree').'</h4>' |
|
| 727 | 726 | . display_conflit_champ($base); |
| 728 | 727 | } |
| 729 | 728 | |
@@ -731,16 +730,16 @@ discard block |
||
| 731 | 730 | $id = uniqid(rand()); |
| 732 | 731 | $redirect = "<form action='$redirect' method='get' |
| 733 | 732 | id='$id' |
| 734 | - style='float:" . $GLOBALS['spip_lang_right'] . "; margin-top:2em;'>\n" |
|
| 733 | + style='float:".$GLOBALS['spip_lang_right']."; margin-top:2em;'>\n" |
|
| 735 | 734 | . form_hidden($redirect) |
| 736 | - . "<input type='submit' value='" . _T('icone_retour') . "' /> |
|
| 735 | + . "<input type='submit' value='"._T('icone_retour')."' /> |
|
| 737 | 736 | </form>\n"; |
| 738 | 737 | |
| 739 | 738 | // pour les documents, on est probablement en ajax : il faut ajaxer |
| 740 | 739 | if (_AJAX) { |
| 741 | 740 | $redirect .= '<script type="text/javascript">' |
| 742 | - . 'setTimeout(function(){$("#' . $id . '") |
|
| 743 | - .ajaxForm({target:$("#' . $id . '").parent()}); |
|
| 741 | + . 'setTimeout(function(){$("#'.$id.'") |
|
| 742 | + .ajaxForm({target:$("#' . $id.'").parent()}); |
|
| 744 | 743 | }, 200);' |
| 745 | 744 | . "</script>\n"; |
| 746 | 745 | } |
@@ -759,9 +758,9 @@ discard block |
||
| 759 | 758 | .diff-para-deplace .diff-supprime { background: #ffb8b8; border: 1px solid #808080; } |
| 760 | 759 | .diff-para-deplace .diff-deplace { background: #b8b8ff; border: 1px solid #808080; } |
| 761 | 760 | </style>' |
| 762 | - . '<p>' . _T('info_conflit_edition_avis_non_sauvegarde') . '</p>' |
|
| 763 | - . '<p>' . _T('texte_conflit_edition_correction') . '</p>' |
|
| 764 | - . "<div style='text-align:" . $GLOBALS['spip_lang_left'] . ";'>" |
|
| 761 | + . '<p>'._T('info_conflit_edition_avis_non_sauvegarde').'</p>' |
|
| 762 | + . '<p>'._T('texte_conflit_edition_correction').'</p>' |
|
| 763 | + . "<div style='text-align:".$GLOBALS['spip_lang_left'].";'>" |
|
| 765 | 764 | . join("\n", $diffs) |
| 766 | 765 | . "</div>\n" |
| 767 | 766 | |
@@ -119,8 +119,8 @@ |
||
| 119 | 119 | $GLOBALS["couleur_lien_off"] = $couleurs_spip[$choix]['couleur_lien_off']; |
| 120 | 120 | |
| 121 | 121 | return |
| 122 | - "couleur_claire=" . substr($couleurs_spip[$choix]['couleur_claire'], 1) . |
|
| 123 | - '&couleur_foncee=' . substr($couleurs_spip[$choix]['couleur_foncee'], 1); |
|
| 122 | + "couleur_claire=".substr($couleurs_spip[$choix]['couleur_claire'], 1). |
|
| 123 | + '&couleur_foncee='.substr($couleurs_spip[$choix]['couleur_foncee'], 1); |
|
| 124 | 124 | } else { |
| 125 | 125 | if (is_array($choix)) { |
| 126 | 126 | if ($ajouter) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | if ($notification = charger_fonction($quoi, 'notifications', true)) { |
| 41 | 41 | spip_log("$notification($quoi,$id" |
| 42 | - . ($options ? "," . serialize($options) : "") |
|
| 42 | + . ($options ? ",".serialize($options) : "") |
|
| 43 | 43 | . ")", 'notifications'); |
| 44 | 44 | $notification($quoi, $id, $options); |
| 45 | 45 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $envoi = pipeline('notifications_envoyer_mails', array('email' => $email, 'sujet' => $sujet, 'texte' => $texte)); |
| 147 | 147 | $email = $envoi['email']; |
| 148 | 148 | |
| 149 | - job_queue_add('envoyer_mail', ">$email : " . $envoi['sujet'], |
|
| 149 | + job_queue_add('envoyer_mail', ">$email : ".$envoi['sujet'], |
|
| 150 | 150 | array($email, $envoi['sujet'], $envoi['texte'], $from, $headers), 'inc/'); |
| 151 | 151 | } |
| 152 | 152 | |
@@ -37,8 +37,8 @@ discard block |
||
| 37 | 37 | **/ |
| 38 | 38 | function changer_langue($lang) { |
| 39 | 39 | |
| 40 | - $liste_langues = ',' . @$GLOBALS['meta']['langues_proposees'] |
|
| 41 | - . ',' . @$GLOBALS['meta']['langues_multilingue'] . ','; |
|
| 40 | + $liste_langues = ','.@$GLOBALS['meta']['langues_proposees'] |
|
| 41 | + . ','.@$GLOBALS['meta']['langues_multilingue'].','; |
|
| 42 | 42 | |
| 43 | 43 | // Si la langue demandee n'existe pas, on essaie d'autres variantes |
| 44 | 44 | // Exemple : 'pt-br' => 'pt_br' => 'pt' |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | } |
| 190 | 190 | foreach ($langues as $l) { |
| 191 | 191 | $selected = ($l == $default) ? ' selected=\'selected\'' : ''; |
| 192 | - $ret .= "<option value='$l'$selected>[" . $l . "] " . traduire_nom_langue($l) . "</option>\n"; |
|
| 192 | + $ret .= "<option value='$l'$selected>[".$l."] ".traduire_nom_langue($l)."</option>\n"; |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | if (!test_espace_prive()) { |
@@ -204,23 +204,21 @@ discard block |
||
| 204 | 204 | |
| 205 | 205 | return generer_action_auteur('converser', $base, $cible, |
| 206 | 206 | (select_langues($nom_select, $change, $ret) |
| 207 | - . "<noscript><div style='display:inline'><input type='submit' class='fondo' value='" . _T('bouton_changer') . "' /></div></noscript>"), |
|
| 207 | + . "<noscript><div style='display:inline'><input type='submit' class='fondo' value='"._T('bouton_changer')."' /></div></noscript>"), |
|
| 208 | 208 | " method='post'"); |
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | // http://code.spip.net/@select_langues |
| 212 | 212 | function select_langues($nom_select, $change, $options, $label = "") { |
| 213 | 213 | static $cpt = 0; |
| 214 | - $id = "menu_langues" . $cpt++; |
|
| 214 | + $id = "menu_langues".$cpt++; |
|
| 215 | 215 | |
| 216 | 216 | return |
| 217 | - "<label for='$id'>" . ($label ? $label : _T('info_langues')) . "</label> " . |
|
| 217 | + "<label for='$id'>".($label ? $label : _T('info_langues'))."</label> ". |
|
| 218 | 218 | "<select name='$nom_select' id='$id' " |
| 219 | 219 | . ((!test_espace_prive()) ? |
| 220 | - ("class='forml menu_langues'") : |
|
| 221 | - (($nom_select == 'var_lang_ecrire') ? |
|
| 222 | - ("class='lang_ecrire'") : |
|
| 223 | - "class='fondl'")) |
|
| 220 | + ("class='forml menu_langues'") : (($nom_select == 'var_lang_ecrire') ? |
|
| 221 | + ("class='lang_ecrire'") : "class='fondl'")) |
|
| 224 | 222 | . $change |
| 225 | 223 | . ">\n" |
| 226 | 224 | . $options |
@@ -342,7 +340,7 @@ discard block |
||
| 342 | 340 | and (!isset($GLOBALS['spip_lang']) |
| 343 | 341 | or $GLOBALS['spip_lang'] != $GLOBALS['meta']['langue_site']) |
| 344 | 342 | ) { |
| 345 | - return changer_langue($GLOBALS['meta']['langue_site']);//@:install |
|
| 343 | + return changer_langue($GLOBALS['meta']['langue_site']); //@:install |
|
| 346 | 344 | } |
| 347 | 345 | // en theorie là, la globale est définie, sinon c'est un problème. |
| 348 | 346 | if (!isset($GLOBALS['spip_lang'])) { |
@@ -443,7 +441,7 @@ discard block |
||
| 443 | 441 | if (!isset($GLOBALS['meta']['langue_site'])) { |
| 444 | 442 | // Initialisation : le francais si dispo, sinon la premiere langue trouvee |
| 445 | 443 | $GLOBALS['meta']['langue_site'] = $tout = |
| 446 | - (!$all_langs or (strpos(',' . _LANGUE_PAR_DEFAUT . ',', ",$all_langs,") !== false)) |
|
| 444 | + (!$all_langs or (strpos(','._LANGUE_PAR_DEFAUT.',', ",$all_langs,") !== false)) |
|
| 447 | 445 | ? _LANGUE_PAR_DEFAUT : substr($all_langs, 0, strpos($all_langs, ',')); |
| 448 | 446 | ecrire_meta('langue_site', $tout); |
| 449 | 447 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | function surligner_mots($page, $surcharge_surligne = '') { |
| 54 | 54 | $surlignejs_engines = array( |
| 55 | 55 | array( |
| 56 | - "," . str_replace(array("/", "."), array("\/", "\."), $GLOBALS['meta']['adresse_site']) . ",i", |
|
| 56 | + ",".str_replace(array("/", "."), array("\/", "\."), $GLOBALS['meta']['adresse_site']).",i", |
|
| 57 | 57 | ",recherche=([^&]+),i" |
| 58 | 58 | ), //SPIP |
| 59 | 59 | array(",^http://(www\.)?google\.,i", ",q=([^&]+),i"), // Google |
@@ -89,20 +89,20 @@ discard block |
||
| 89 | 89 | //good referrer found or var_recherche is not null |
| 90 | 90 | include_spip('inc/filtres'); |
| 91 | 91 | $script = " |
| 92 | - <script type='text/javascript' src='" . url_absolue(find_in_path('javascript/SearchHighlight.js')) . "'></script> |
|
| 92 | + <script type='text/javascript' src='" . url_absolue(find_in_path('javascript/SearchHighlight.js'))."'></script> |
|
| 93 | 93 | <script type='text/javascript'>/*<![CDATA[*/ |
| 94 | 94 | if (window.jQuery) |
| 95 | 95 | (function(\$){\$(function(){ |
| 96 | 96 | \$(document).SearchHighlight({ |
| 97 | - tag_name:'" . (html5_permis() ? 'mark' : 'span') . "', |
|
| 97 | + tag_name:'" . (html5_permis() ? 'mark' : 'span')."', |
|
| 98 | 98 | style_name:'spip_surligne', |
| 99 | 99 | exact:'whole', |
| 100 | 100 | style_name_suffix:false, |
| 101 | - engines:[/^" . str_replace(array("/", "."), array("\/", "\."), $GLOBALS['meta']['adresse_site']) . "/i,/recherche=([^&]+)/i], |
|
| 101 | + engines:[/^" . str_replace(array("/", "."), array("\/", "\."), $GLOBALS['meta']['adresse_site'])."/i,/recherche=([^&]+)/i], |
|
| 102 | 102 | highlight:'.surlignable', |
| 103 | 103 | nohighlight:'.pas_surlignable'" . |
| 104 | 104 | ($surcharge_surligne ? ", |
| 105 | - keys:'$surcharge_surligne'" : "") . ", |
|
| 105 | + keys:'$surcharge_surligne'" : "").", |
|
| 106 | 106 | min_length: 3 |
| 107 | 107 | }) |
| 108 | 108 | }); |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | && autoriser('onglet', "_$id") |
| 102 | 102 | ) { |
| 103 | 103 | $onglets[$id] = new Bouton( |
| 104 | - isset($infos['icone']) ? find_in_theme($infos['icone']) : '', // icone |
|
| 105 | - $infos['titre'], // titre |
|
| 104 | + isset($infos['icone']) ? find_in_theme($infos['icone']) : '', // icone |
|
| 105 | + $infos['titre'], // titre |
|
| 106 | 106 | (isset($infos['action']) and $infos['action']) |
| 107 | 107 | ? generer_url_ecrire($infos['action'], |
| 108 | 108 | (isset($infos['parametres']) and $infos['parametres']) ? $infos['parametres'] : '') |
@@ -139,5 +139,5 @@ discard block |
||
| 139 | 139 | $res .= onglet(_T($onglet->libelle), $url, $exec, $ongletCourant, $onglet->icone); |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | - return !$res ? '' : (debut_onglet($class) . $res . fin_onglet()); |
|
| 142 | + return !$res ? '' : (debut_onglet($class).$res.fin_onglet()); |
|
| 143 | 143 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | if ($aff_racine) { |
| 56 | 56 | $info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id="); |
| 57 | - $idom3 = $idom . "_selection"; |
|
| 57 | + $idom3 = $idom."_selection"; |
|
| 58 | 58 | |
| 59 | 59 | $onClick = "jQuery(this).parent().addClass('on');jQuery('#choix_parent_principal .on').removeClass('on'); aff_selection(0, '$idom3', '$info', event);return false;"; |
| 60 | 60 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | textebrut(_T('info_racine_site')))), |
| 64 | 64 | "\n\r", " "); |
| 65 | 65 | |
| 66 | - $js_func = $do . '_selection_titre'; |
|
| 66 | + $js_func = $do.'_selection_titre'; |
|
| 67 | 67 | $ondbClick = "$js_func('$ondbClick',0,'selection_rubrique','id_parent');"; |
| 68 | 68 | |
| 69 | 69 | $aff_racine = "<div class='petite-racine item'>" |
@@ -104,12 +104,12 @@ discard block |
||
| 104 | 104 | **/ |
| 105 | 105 | function construire_selectionner_hierarchie($idom, $liste, $racine, $url, $name, $url_init = '') { |
| 106 | 106 | |
| 107 | - $idom1 = $idom . "_champ_recherche"; |
|
| 108 | - $idom2 = $idom . "_principal"; |
|
| 109 | - $idom3 = $idom . "_selection"; |
|
| 110 | - $idom4 = $idom . "_col_1"; |
|
| 111 | - $idom5 = 'img_' . $idom4; |
|
| 112 | - $idom6 = $idom . "_fonc"; |
|
| 107 | + $idom1 = $idom."_champ_recherche"; |
|
| 108 | + $idom2 = $idom."_principal"; |
|
| 109 | + $idom3 = $idom."_selection"; |
|
| 110 | + $idom4 = $idom."_col_1"; |
|
| 111 | + $idom5 = 'img_'.$idom4; |
|
| 112 | + $idom6 = $idom."_fonc"; |
|
| 113 | 113 | |
| 114 | 114 | return "<div id='$idom'>" |
| 115 | 115 | . "<a id='$idom6' style='visibility: hidden;'" |
@@ -117,9 +117,9 @@ discard block |
||
| 117 | 117 | . "></a>" |
| 118 | 118 | . "<div class='recherche_rapide_parent'>" |
| 119 | 119 | . http_img_pack("searching.gif", "*", |
| 120 | - "style='visibility: hidden;float:" . $GLOBALS['spip_lang_right'] . "' id='$idom5'") |
|
| 120 | + "style='visibility: hidden;float:".$GLOBALS['spip_lang_right']."' id='$idom5'") |
|
| 121 | 121 | . "" |
| 122 | - . "<input style='width: 100px;float:" . $GLOBALS['spip_lang_right'] . ";' type='search' id='$idom1'" |
|
| 122 | + . "<input style='width: 100px;float:".$GLOBALS['spip_lang_right'].";' type='search' id='$idom1'" |
|
| 123 | 123 | // eliminer Return car il provoque la soumission (balise unique) |
| 124 | 124 | // et eliminer Tab pour la navigation au clavier |
| 125 | 125 | // ce serait encore mieux de ne le faire que s'il y a encore plusieurs |
@@ -166,8 +166,8 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | $liste = $id_rubrique; |
| 168 | 168 | $id_rubrique = intval($id_rubrique); |
| 169 | - while ($id_rubrique = sql_getfetsel("id_parent", "spip_rubriques", "id_rubrique = " . $id_rubrique)) { |
|
| 170 | - $liste = $id_rubrique . ",$liste"; |
|
| 169 | + while ($id_rubrique = sql_getfetsel("id_parent", "spip_rubriques", "id_rubrique = ".$id_rubrique)) { |
|
| 170 | + $liste = $id_rubrique.",$liste"; |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | return explode(',', "0,$liste"); |