@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * Texte |
| 42 | 42 | */ |
| 43 | 43 | function sandbox_composer_texte($texte, &$p) { |
| 44 | - $code = "'" . str_replace(array("\\", "'"), array("\\\\", "\\'"), $texte) . "'"; |
|
| 44 | + $code = "'".str_replace(array("\\", "'"), array("\\\\", "\\'"), $texte)."'"; |
|
| 45 | 45 | |
| 46 | 46 | return $code; |
| 47 | 47 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * Balise qui appelle ce filtre |
| 59 | 59 | * @return string |
| 60 | 60 | */ |
| 61 | -function sandbox_composer_filtre($fonc, $code, $arglist, &$p, $nb_arg_droite=1000) : string { |
|
| 61 | +function sandbox_composer_filtre($fonc, $code, $arglist, &$p, $nb_arg_droite = 1000) : string { |
|
| 62 | 62 | if (isset($GLOBALS['spip_matrice'][$fonc])) { |
| 63 | 63 | $code = "filtrer('$fonc',$code$arglist)"; |
| 64 | 64 | } |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | $code = "$f($code$arglist)"; |
| 83 | 83 | $nb_arg_gauche = 1; // la balise à laquelle s'applique le filtre |
| 84 | 84 | } |
| 85 | - $nb_args_f = $nb_arg_gauche+$nb_arg_droite; |
|
| 85 | + $nb_args_f = $nb_arg_gauche + $nb_arg_droite; |
|
| 86 | 86 | $min_f = $refl->getNumberOfRequiredParameters(); |
| 87 | 87 | if (($nb_args_f < $min_f)) { |
| 88 | - $msg_args = ['filtre' => texte_script ($fonc), 'nb'=> $min_f - $nb_args_f]; |
|
| 89 | - erreur_squelette ([ 'zbug_erreur_filtre_nbarg_min', $msg_args], $p); |
|
| 88 | + $msg_args = ['filtre' => texte_script($fonc), 'nb'=> $min_f - $nb_args_f]; |
|
| 89 | + erreur_squelette(['zbug_erreur_filtre_nbarg_min', $msg_args], $p); |
|
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | // le filtre n'existe pas, |
@@ -171,8 +171,8 @@ discard block |
||
| 171 | 171 | */ |
| 172 | 172 | function sandbox_filtrer_squelette($skel, $corps, $filtres) { |
| 173 | 173 | $series_filtres = func_get_args(); |
| 174 | - array_shift($series_filtres);// skel |
|
| 175 | - array_shift($series_filtres);// corps |
|
| 174 | + array_shift($series_filtres); // skel |
|
| 175 | + array_shift($series_filtres); // corps |
|
| 176 | 176 | |
| 177 | 177 | // proteger les <INCLUDE> et tous les morceaux de php licites |
| 178 | 178 | if ($skel['process_ins'] == 'php') { |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | if (is_array($r)) { |
| 221 | 221 | $dst[] = $r[0]; |
| 222 | 222 | |
| 223 | - return $src[] = '___' . md5($r[0]) . '___'; |
|
| 223 | + return $src[] = '___'.md5($r[0]).'___'; |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | // si on recoit pas un tableau, on renvoit les couples de substitution |
@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | $_class = interprete_argument_balise(3, $p); |
| 49 | 49 | $_role = interprete_argument_balise(4, $p); |
| 50 | 50 | $_id = interprete_argument_balise(5, $p); |
| 51 | - $_texte = ($_texte ? $_texte : "''"); |
|
| 51 | + $_texte = ($_texte ? $_texte : "''"); |
|
| 52 | 52 | $_titre = ($_titre ? ", $_titre" : ', null'); |
| 53 | 53 | $_class = ($_class ? ", $_class" : ', null'); |
| 54 | - $_role = ($_role ? ", $_role" : ', null'); |
|
| 55 | - $_id = ($_id ? ", $_id" : ', null'); |
|
| 54 | + $_role = ($_role ? ", $_role" : ', null'); |
|
| 55 | + $_id = ($_id ? ", $_id" : ', null'); |
|
| 56 | 56 | |
| 57 | 57 | $f = chercher_filtre('message_alerte'); |
| 58 | 58 | $p->code = "$f($_texte$_titre$_class$_role$_id)"; |
@@ -90,10 +90,10 @@ discard block |
||
| 90 | 90 | $_class = interprete_argument_balise(2, $p); |
| 91 | 91 | $_role = interprete_argument_balise(3, $p); |
| 92 | 92 | $_id = interprete_argument_balise(4, $p); |
| 93 | - $_titre = ($_titre ? "$_titre" : 'null'); |
|
| 93 | + $_titre = ($_titre ? "$_titre" : 'null'); |
|
| 94 | 94 | $_class = ($_class ? ", $_class" : ', null'); |
| 95 | - $_role = ($_role ? ", $_role" : ', null'); |
|
| 96 | - $_id = ($_id ? ", $_id" : ', null'); |
|
| 95 | + $_role = ($_role ? ", $_role" : ', null'); |
|
| 96 | + $_id = ($_id ? ", $_id" : ', null'); |
|
| 97 | 97 | |
| 98 | 98 | $f = chercher_filtre('message_alerte_ouvrir'); |
| 99 | 99 | $p->code = "$f($_titre$_class$_role$_id)"; |
@@ -163,8 +163,8 @@ discard block |
||
| 163 | 163 | $message_alerte_ouvrir = chercher_filtre('message_alerte_ouvrir'); |
| 164 | 164 | $message_alerte_fermer = chercher_filtre('message_alerte_fermer'); |
| 165 | 165 | $message = |
| 166 | - $message_alerte_ouvrir($titre, $class, $role, $id) . |
|
| 167 | - $texte . |
|
| 166 | + $message_alerte_ouvrir($titre, $class, $role, $id). |
|
| 167 | + $texte. |
|
| 168 | 168 | $message_alerte_fermer(); |
| 169 | 169 | |
| 170 | 170 | return $message; |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | ]; |
| 214 | 214 | $type = array_intersect(explode(' ', $class), $types); |
| 215 | 215 | $type = reset($type); |
| 216 | - $class = trim(str_replace($types, '', $class) . " $type"); |
|
| 216 | + $class = trim(str_replace($types, '', $class)." $type"); |
|
| 217 | 217 | |
| 218 | 218 | // Classes |
| 219 | 219 | $class_racine = 'msg-alert'; |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | |
| 239 | 239 | // Attributs |
| 240 | 240 | $attr_role = ($role ? "role=\"$role\"" : ''); |
| 241 | - $attr_id = ($id ? "id=\"$id\"" : ''); |
|
| 241 | + $attr_id = ($id ? "id=\"$id\"" : ''); |
|
| 242 | 242 | $attr_data = ($type ? "data-alert=\"$type\"" : ''); |
| 243 | 243 | |
| 244 | 244 | $message = |
@@ -34,9 +34,9 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | $res = sql_select("rub1.id_rubrique, rub1.titre, rub1.id_parent, rub1.lang, rub1.langue_choisie, rub2.id_rubrique AS id_enfant", |
| 36 | 36 | "spip_rubriques AS rub1 LEFT JOIN spip_rubriques AS rub2 ON (rub1.id_rubrique = rub2.id_parent)", |
| 37 | - "rub1.id_parent = " . sql_quote($id_rubrique) . " |
|
| 38 | - AND rub1.id_rubrique!=" . sql_quote($exclu) . " |
|
| 39 | - AND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=" . sql_quote($exclu) . ")", "", "0+rub1.titre,rub1.titre"); |
|
| 37 | + "rub1.id_parent = ".sql_quote($id_rubrique)." |
|
| 38 | + AND rub1.id_rubrique!=" . sql_quote($exclu)." |
|
| 39 | + AND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=" . sql_quote($exclu).")", "", "0+rub1.titre,rub1.titre"); |
|
| 40 | 40 | |
| 41 | 41 | while ($row = sql_fetch($res)) { |
| 42 | 42 | if (autoriser('voir', 'rubrique', $row['id_rubrique'])) { |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | if ($row['langue_choisie'] != 'oui') { |
| 47 | 47 | $t .= ' <small title="' |
| 48 | 48 | . traduire_nom_langue($row['lang']) |
| 49 | - . '">[' . $row['lang'] . ']</small>'; |
|
| 49 | + . '">['.$row['lang'].']</small>'; |
|
| 50 | 50 | } |
| 51 | 51 | $ordre[$row['id_rubrique']] = $t; |
| 52 | 52 | } |
@@ -54,14 +54,14 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | $next = isset($list[$col]) ? $list[$col] : 0; |
| 56 | 56 | if ($ordre) { |
| 57 | - $rec = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclu&do=$do&col=" . ($col + 1)); |
|
| 57 | + $rec = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclu&do=$do&col=".($col + 1)); |
|
| 58 | 58 | $info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id="); |
| 59 | - $args = "'$idom',this,$col,'" . $GLOBALS['spip_lang_left'] . "','$info',event"; |
|
| 59 | + $args = "'$idom',this,$col,'".$GLOBALS['spip_lang_left']."','$info',event"; |
|
| 60 | 60 | |
| 61 | 61 | foreach ($ordre as $id => $titrebrut) { |
| 62 | 62 | $titre = supprimer_numero($titrebrut); |
| 63 | 63 | |
| 64 | - $classe1 = 'petit-item ' . ($id_rubrique ? 'petite-rubrique' : "petit-secteur"); |
|
| 64 | + $classe1 = 'petit-item '.($id_rubrique ? 'petite-rubrique' : "petit-secteur"); |
|
| 65 | 65 | if (isset($rub[$id]["enfants"])) { |
| 66 | 66 | $classe2 = " class='rub-ouverte'"; |
| 67 | 67 | $url = "\nhref='$rec&id=$id'"; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $url = "\nhref='javascript:void(0)'"; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - $js_func = $do . '_selection_titre'; |
|
| 73 | + $js_func = $do.'_selection_titre'; |
|
| 74 | 74 | $click = "\nonclick=\"changerhighlight(this.parentNode.parentNode.parentNode);\nreturn " |
| 75 | 75 | . (!is_array($list) ? ' false' |
| 76 | 76 | : "aff_selection_provisoire($id,$args)") |
@@ -97,14 +97,14 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - $idom2 = $idom . "_col_" . ($col + 1); |
|
| 100 | + $idom2 = $idom."_col_".($col + 1); |
|
| 101 | 101 | $left = ($col * 250); |
| 102 | 102 | |
| 103 | 103 | return http_img_pack("loader.svg", "", |
| 104 | - "class='loader' style='visibility: hidden; position: absolute; " . $GLOBALS['spip_lang_left'] . ": " |
|
| 104 | + "class='loader' style='visibility: hidden; position: absolute; ".$GLOBALS['spip_lang_left'].": " |
|
| 105 | 105 | . ($left - 30) |
| 106 | 106 | . "px; top: 2px; z-index: 2;' id='img_$idom2'") |
| 107 | - . "<div style='width: 250px; height: 100%; overflow: auto; position: absolute; top: 0px; " . $GLOBALS['spip_lang_left'] . ": " |
|
| 107 | + . "<div style='width: 250px; height: 100%; overflow: auto; position: absolute; top: 0px; ".$GLOBALS['spip_lang_left'].": " |
|
| 108 | 108 | . ($left - 250) |
| 109 | 109 | . "px;'>" |
| 110 | 110 | . $ret |
@@ -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='petit-item 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 formulaire_recherche'>" |
| 119 | 119 | . http_img_pack("loader.svg", "", |
| 120 | - "class='loader' style='visibility: hidden;float:" . $GLOBALS['spip_lang_right'] . "' id='$idom5'") |
|
| 120 | + "class='loader' style='visibility: hidden;float:".$GLOBALS['spip_lang_right']."' id='$idom5'") |
|
| 121 | 121 | . "" |
| 122 | - . "<input style='width: 10em;float:" . $GLOBALS['spip_lang_right'] . ";' type='text' class='text search' id='$idom1' placeholder='" . _T('info_rechercher') . "'" |
|
| 122 | + . "<input style='width: 10em;float:".$GLOBALS['spip_lang_right'].";' type='text' class='text search' id='$idom1' placeholder='"._T('info_rechercher')."'" |
|
| 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"); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | function extraire_date($texte) { |
| 39 | 39 | // format = 2001-08 |
| 40 | 40 | if (preg_match(",([1-2][0-9]{3})[^0-9]*(1[0-2]|0?[1-9]),", $texte, $regs)) { |
| 41 | - return $regs[1] . "-" . sprintf("%02d", $regs[2]) . "-01"; |
|
| 41 | + return $regs[1]."-".sprintf("%02d", $regs[2])."-01"; |
|
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | |
@@ -68,11 +68,11 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | if (preg_match("#^([12][0-9]{3})([-/]00)?( [-0-9:]+)?$#", $date, $regs)) { |
| 70 | 70 | $regs = array_pad($regs, 4, null); // eviter notice php |
| 71 | - $date = $regs[1] . "-00-00" . $regs[3]; |
|
| 71 | + $date = $regs[1]."-00-00".$regs[3]; |
|
| 72 | 72 | } else { |
| 73 | 73 | if (preg_match("#^([12][0-9]{3}[-/][01]?[0-9])([-/]00)?( [-0-9:]+)?$#", $date, $regs)) { |
| 74 | 74 | $regs = array_pad($regs, 4, null); // eviter notice php |
| 75 | - $date = preg_replace("@/@", "-", $regs[1]) . "-00" . $regs[3]; |
|
| 75 | + $date = preg_replace("@/@", "-", $regs[1])."-00".$regs[3]; |
|
| 76 | 76 | } else { |
| 77 | 77 | $date = date("Y-m-d H:i:s", strtotime($date)); |
| 78 | 78 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | **/ |
| 98 | 98 | function vider_date($letexte, $verif_format_date = false) { |
| 99 | 99 | if (!$verif_format_date |
| 100 | - or (in_array(strlen($letexte), [10,19]) and |
|
| 100 | + or (in_array(strlen($letexte), [10, 19]) and |
|
| 101 | 101 | preg_match("/^[0-9]{4}-[0-9]{2}-[0-9]{2}(\s[0-9]{2}:[0-9]{2}:[0-9]{2})?$/", $letexte))) { |
| 102 | 102 | |
| 103 | 103 | if (strncmp("0000-00-00", $letexte, 10) == 0) { |
@@ -208,8 +208,8 @@ discard block |
||
| 208 | 208 | * - si 'abbr' ne précise pas l'unité des minutes : 12h10 |
| 209 | 209 | * @return string L'heure formatée dans la langue en cours. |
| 210 | 210 | **/ |
| 211 | -function heures_minutes($numdate, $forme='') { |
|
| 212 | - if ($forme !='abbr') { |
|
| 211 | +function heures_minutes($numdate, $forme = '') { |
|
| 212 | + if ($forme != 'abbr') { |
|
| 213 | 213 | return _T('date_fmt_heures_minutes', array('h' => heures($numdate), 'm' => minutes($numdate))); |
| 214 | 214 | } |
| 215 | 215 | else { |
@@ -381,17 +381,17 @@ discard block |
||
| 381 | 381 | if ($decal > 3600 * 24 * 30) { |
| 382 | 382 | $mois = floor($decal / (3600 * 24 * 30)); |
| 383 | 383 | if ($mois < 2) { |
| 384 | - $delai = "$mois " . _T("date_un_mois"); |
|
| 384 | + $delai = "$mois "._T("date_un_mois"); |
|
| 385 | 385 | } else { |
| 386 | - $delai = "$mois " . _T("date_mois"); |
|
| 386 | + $delai = "$mois "._T("date_mois"); |
|
| 387 | 387 | } |
| 388 | 388 | } else { |
| 389 | 389 | if ($decal > 3600 * 24 * 7) { |
| 390 | 390 | $semaines = floor($decal / (3600 * 24 * 7)); |
| 391 | 391 | if ($semaines < 2) { |
| 392 | - $delai = "$semaines " . _T("date_une_semaine"); |
|
| 392 | + $delai = "$semaines "._T("date_une_semaine"); |
|
| 393 | 393 | } else { |
| 394 | - $delai = "$semaines " . _T("date_semaines"); |
|
| 394 | + $delai = "$semaines "._T("date_semaines"); |
|
| 395 | 395 | } |
| 396 | 396 | } else { |
| 397 | 397 | if ($decal > 3600 * 24) { |
@@ -399,30 +399,30 @@ discard block |
||
| 399 | 399 | if ($jours < 2) { |
| 400 | 400 | return $il_y_a == "date_dans" ? _T("date_demain") : _T("date_hier"); |
| 401 | 401 | } else { |
| 402 | - $delai = "$jours " . _T("date_jours"); |
|
| 402 | + $delai = "$jours "._T("date_jours"); |
|
| 403 | 403 | } |
| 404 | 404 | } else { |
| 405 | 405 | if ($decal >= 3600) { |
| 406 | 406 | $heures = floor($decal / 3600); |
| 407 | 407 | if ($heures < 2) { |
| 408 | - $delai = "$heures " . _T("date_une_heure"); |
|
| 408 | + $delai = "$heures "._T("date_une_heure"); |
|
| 409 | 409 | } else { |
| 410 | - $delai = "$heures " . _T("date_heures"); |
|
| 410 | + $delai = "$heures "._T("date_heures"); |
|
| 411 | 411 | } |
| 412 | 412 | } else { |
| 413 | 413 | if ($decal >= 60) { |
| 414 | 414 | $minutes = floor($decal / 60); |
| 415 | 415 | if ($minutes < 2) { |
| 416 | - $delai = "$minutes " . _T("date_une_minute"); |
|
| 416 | + $delai = "$minutes "._T("date_une_minute"); |
|
| 417 | 417 | } else { |
| 418 | - $delai = "$minutes " . _T("date_minutes"); |
|
| 418 | + $delai = "$minutes "._T("date_minutes"); |
|
| 419 | 419 | } |
| 420 | 420 | } else { |
| 421 | 421 | $secondes = ceil($decal); |
| 422 | 422 | if ($secondes < 2) { |
| 423 | - $delai = "$secondes " . _T("date_une_seconde"); |
|
| 423 | + $delai = "$secondes "._T("date_une_seconde"); |
|
| 424 | 424 | } else { |
| 425 | - $delai = "$secondes " . _T("date_secondes"); |
|
| 425 | + $delai = "$secondes "._T("date_secondes"); |
|
| 426 | 426 | } |
| 427 | 427 | } |
| 428 | 428 | } |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | $njour = 0; |
| 518 | 518 | } else { |
| 519 | 519 | $njour = intval($jour); |
| 520 | - if ($jourth = _T('date_jnum' . $jour)) { |
|
| 520 | + if ($jourth = _T('date_jnum'.$jour)) { |
|
| 521 | 521 | $jour = $jourth; |
| 522 | 522 | } |
| 523 | 523 | } |
@@ -525,10 +525,10 @@ discard block |
||
| 525 | 525 | $mois = intval($mois); |
| 526 | 526 | if ($mois > 0 and $mois < 13) { |
| 527 | 527 | /* Traiter le cas "abbr" pour les noms de mois */ |
| 528 | - $param = ((isset($options['param']) and $options['param'] === "abbr") ? '_' . $options['param'] : ''); |
|
| 529 | - $nommois = _T('date_mois_' . $mois . $param); |
|
| 528 | + $param = ((isset($options['param']) and $options['param'] === "abbr") ? '_'.$options['param'] : ''); |
|
| 529 | + $nommois = _T('date_mois_'.$mois.$param); |
|
| 530 | 530 | if ($jour) { |
| 531 | - $jourmois = _T('date_de_mois_' . $mois, array('j' => $jour, 'nommois' => $nommois)); |
|
| 531 | + $jourmois = _T('date_de_mois_'.$mois, array('j' => $jour, 'nommois' => $nommois)); |
|
| 532 | 532 | } else { |
| 533 | 533 | $jourmois = $nommois; |
| 534 | 534 | } |
@@ -538,7 +538,7 @@ discard block |
||
| 538 | 538 | } |
| 539 | 539 | |
| 540 | 540 | if ($annee < 0) { |
| 541 | - $annee = -$annee . " " . _T('date_avant_jc'); |
|
| 541 | + $annee = -$annee." "._T('date_avant_jc'); |
|
| 542 | 542 | $avjc = true; |
| 543 | 543 | } else { |
| 544 | 544 | $avjc = false; |
@@ -564,10 +564,10 @@ discard block |
||
| 564 | 564 | } |
| 565 | 565 | } |
| 566 | 566 | if ($vue == 'saison') { |
| 567 | - return $saison ? _T('date_saison_' . $saison) : ''; |
|
| 567 | + return $saison ? _T('date_saison_'.$saison) : ''; |
|
| 568 | 568 | } else { |
| 569 | 569 | return $saison ? trim(_T('date_fmt_saison_annee', |
| 570 | - array('saison' => _T('date_saison_' . $saison), 'annee' => $annee))) : ''; |
|
| 570 | + array('saison' => _T('date_saison_'.$saison), 'annee' => $annee))) : ''; |
|
| 571 | 571 | } |
| 572 | 572 | |
| 573 | 573 | case 'court': |
@@ -633,9 +633,9 @@ discard block |
||
| 633 | 633 | } |
| 634 | 634 | $nom = mktime(1, 1, 1, $mois, $njour, $annee); |
| 635 | 635 | $nom = 1 + date('w', $nom); |
| 636 | - $param = ((isset($options['param']) and $options['param']) ? '_' . $options['param'] : ''); |
|
| 636 | + $param = ((isset($options['param']) and $options['param']) ? '_'.$options['param'] : ''); |
|
| 637 | 637 | |
| 638 | - return _T('date_jour_' . $nom . $param); |
|
| 638 | + return _T('date_jour_'.$nom.$param); |
|
| 639 | 639 | |
| 640 | 640 | case 'mois_annee': |
| 641 | 641 | if ($avjc) { |
@@ -1030,8 +1030,8 @@ discard block |
||
| 1030 | 1030 | |
| 1031 | 1031 | $dtstart = $dtend = $dtabbr = ""; |
| 1032 | 1032 | if (strpos($forme, 'hcal') !== false) { |
| 1033 | - $dtstart = "<abbr class='dtstart' title='" . date_iso($date_debut) . "'>"; |
|
| 1034 | - $dtend = "<abbr class='dtend' title='" . date_iso($date_fin) . "'>"; |
|
| 1033 | + $dtstart = "<abbr class='dtstart' title='".date_iso($date_debut)."'>"; |
|
| 1034 | + $dtend = "<abbr class='dtend' title='".date_iso($date_fin)."'>"; |
|
| 1035 | 1035 | $dtabbr = "</abbr>"; |
| 1036 | 1036 | } |
| 1037 | 1037 | |
@@ -1075,7 +1075,7 @@ discard block |
||
| 1075 | 1075 | } |
| 1076 | 1076 | } else { |
| 1077 | 1077 | if ($dtabbr && $dtstart) { |
| 1078 | - $s = $dtstart . spip_ucfirst($s) . $dtabbr; |
|
| 1078 | + $s = $dtstart.spip_ucfirst($s).$dtabbr; |
|
| 1079 | 1079 | } else { |
| 1080 | 1080 | $s = spip_ucfirst($s); |
| 1081 | 1081 | } |
@@ -1098,8 +1098,8 @@ discard block |
||
| 1098 | 1098 | $date_debut = _T('date_fmt_jour_heure', array('jour' => $date_debut, 'heure' => $hd)); |
| 1099 | 1099 | $date_fin = _T('date_fmt_jour_heure', array('jour' => $date_fin, 'heure' => $hf)); |
| 1100 | 1100 | } |
| 1101 | - $date_debut = $dtstart . $date_debut . $dtabbr; |
|
| 1102 | - $date_fin = $dtend . $date_fin . $dtabbr; |
|
| 1101 | + $date_debut = $dtstart.$date_debut.$dtabbr; |
|
| 1102 | + $date_fin = $dtend.$date_fin.$dtabbr; |
|
| 1103 | 1103 | |
| 1104 | 1104 | $s = _T('date_fmt_periode', array('date_debut' => $date_debut, 'date_fin' => $date_fin)); |
| 1105 | 1105 | } else { |
@@ -1116,8 +1116,8 @@ discard block |
||
| 1116 | 1116 | $date_fin = _T('date_fmt_jour_heure', array('jour' => $date_fin, 'heure' => $hf)); |
| 1117 | 1117 | } |
| 1118 | 1118 | |
| 1119 | - $date_debut = $dtstart . $date_debut . $dtabbr; |
|
| 1120 | - $date_fin = $dtend . $date_fin . $dtabbr; |
|
| 1119 | + $date_debut = $dtstart.$date_debut.$dtabbr; |
|
| 1120 | + $date_fin = $dtend.$date_fin.$dtabbr; |
|
| 1121 | 1121 | $s = _T('date_fmt_periode', array('date_debut' => $date_debut, 'date_fin' => $date_fin)); |
| 1122 | 1122 | |
| 1123 | 1123 | } |
@@ -1222,7 +1222,7 @@ discard block |
||
| 1222 | 1222 | $d = date("Y-m-d"); |
| 1223 | 1223 | } |
| 1224 | 1224 | |
| 1225 | - return substr($d, 0, 4) . substr($d, 5, 2) . substr($d, 8, 2); |
|
| 1225 | + return substr($d, 0, 4).substr($d, 5, 2).substr($d, 8, 2); |
|
| 1226 | 1226 | } |
| 1227 | 1227 | |
| 1228 | 1228 | /** |
@@ -1242,7 +1242,7 @@ discard block |
||
| 1242 | 1242 | $d = date("Y-m-d"); |
| 1243 | 1243 | } |
| 1244 | 1244 | |
| 1245 | - return substr($d, 0, 4) . substr($d, 5, 2); |
|
| 1245 | + return substr($d, 0, 4).substr($d, 5, 2); |
|
| 1246 | 1246 | } |
| 1247 | 1247 | |
| 1248 | 1248 | /** |
@@ -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 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | if (in_array('eval', $trace_fonctions) and in_array('inclure_modele', $trace_fonctions)) { |
| 105 | 105 | $k = array_search('inclure_modele', $trace_fonctions); |
| 106 | 106 | // les arguments de recuperer_fond() passes par inclure_modele() |
| 107 | - return $trace[$k-1]['args'][1]['args']; |
|
| 107 | + return $trace[$k - 1]['args'][1]['args']; |
|
| 108 | 108 | } |
| 109 | 109 | return false; |
| 110 | 110 | } |
@@ -250,9 +250,9 @@ discard block |
||
| 250 | 250 | if (isset($valeurs['_action'])) { |
| 251 | 251 | $securiser_action = charger_fonction('securiser_action', 'inc'); |
| 252 | 252 | $secu = $securiser_action(reset($valeurs['_action']), end($valeurs['_action']), '', -1); |
| 253 | - $valeurs['_hidden'] = (isset($valeurs['_hidden']) ? $valeurs['_hidden'] : '') . |
|
| 254 | - "<input type='hidden' name='arg' value='" . $secu['arg'] . "' />" |
|
| 255 | - . "<input type='hidden' name='hash' value='" . $secu['hash'] . "' />"; |
|
| 253 | + $valeurs['_hidden'] = (isset($valeurs['_hidden']) ? $valeurs['_hidden'] : ''). |
|
| 254 | + "<input type='hidden' name='arg' value='".$secu['arg']."' />" |
|
| 255 | + . "<input type='hidden' name='hash' value='".$secu['hash']."' />"; |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | // empiler la lang en tant que premier argument implicite du CVT |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | // et si $k ne commence pas par un _ (c'est bien une vrai erreur sur un vrai champ) |
| 293 | 293 | if (html5_permis()) { |
| 294 | 294 | foreach ($erreurs as $k => $v) { |
| 295 | - if (is_string($v) and strlen(trim($v)) and strpos($k,'_') !== 0) { |
|
| 295 | + if (is_string($v) and strlen(trim($v)) and strpos($k, '_') !== 0) { |
|
| 296 | 296 | // on encapsule dans un span car ces messages sont en general simple, juste du texte, et deja dans un span dans le form |
| 297 | 297 | $valeurs['erreurs'][$k] = "<span role='alert'>".$erreurs[$k]."</span>"; |
| 298 | 298 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | return; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | -include_spip('inc/charsets'); # pour le nom de fichier |
|
| 23 | +include_spip('inc/charsets'); # pour le nom de fichier |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * Effacer une rubrique |
@@ -37,24 +37,24 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | if (intval($id_rubrique)) { |
| 39 | 39 | |
| 40 | - sql_delete("spip_rubriques", "id_rubrique=" . intval($id_rubrique)); |
|
| 40 | + sql_delete("spip_rubriques", "id_rubrique=".intval($id_rubrique)); |
|
| 41 | 41 | // Les admin restreints qui n'administraient que cette rubrique |
| 42 | 42 | // deviennent redacteurs |
| 43 | 43 | // (il y a sans doute moyen de faire ca avec un having) |
| 44 | 44 | |
| 45 | - $q = sql_select("id_auteur", "spip_auteurs_liens", "objet='rubrique' AND id_objet=" . intval($id_rubrique)); |
|
| 45 | + $q = sql_select("id_auteur", "spip_auteurs_liens", "objet='rubrique' AND id_objet=".intval($id_rubrique)); |
|
| 46 | 46 | while ($r = sql_fetch($q)) { |
| 47 | 47 | $id_auteur = $r['id_auteur']; |
| 48 | 48 | // degrader avant de supprimer la restriction d'admin |
| 49 | 49 | // section critique sur les droits |
| 50 | 50 | $n = sql_countsel("spip_auteurs_liens", |
| 51 | - "objet='rubrique' AND id_objet!=" . intval($id_rubrique) . " AND id_auteur=" . intval($id_auteur)); |
|
| 51 | + "objet='rubrique' AND id_objet!=".intval($id_rubrique)." AND id_auteur=".intval($id_auteur)); |
|
| 52 | 52 | if (!$n) { |
| 53 | 53 | include_spip('action/editer_auteur'); |
| 54 | 54 | auteur_modifier($id_auteur, array("statut" => '1comite')); |
| 55 | 55 | } |
| 56 | 56 | sql_delete("spip_auteurs_liens", |
| 57 | - "objet='rubrique' AND id_objet=" . intval($id_rubrique) . " AND id_auteur=" . intval($id_auteur)); |
|
| 57 | + "objet='rubrique' AND id_objet=".intval($id_rubrique)." AND id_auteur=".intval($id_auteur)); |
|
| 58 | 58 | } |
| 59 | 59 | // menu_rubriques devra recalculer |
| 60 | 60 | effacer_meta("date_calcul_rubriques"); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | $res = admin_repair_tables(); |
| 40 | 40 | if (!$res) { |
| 41 | - $res = "<div class='error'>" . _T('avis_erreur_mysql') . ' ' . sql_errno() . ': ' . sql_error() . "</div>\n"; |
|
| 41 | + $res = "<div class='error'>"._T('avis_erreur_mysql').' '.sql_errno().': '.sql_error()."</div>\n"; |
|
| 42 | 42 | } else { |
| 43 | 43 | include_spip('inc/rubriques'); |
| 44 | 44 | calculer_rubriques(); |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | include_spip('inc/minipres'); |
| 48 | 48 | $res .= pipeline('base_admin_repair', $res); |
| 49 | 49 | echo minipres(_T('texte_tentative_recuperation'), |
| 50 | - $res . generer_form_ecrire('accueil', '', '', _T('public:accueil_site'))); |
|
| 50 | + $res.generer_form_ecrire('accueil', '', '', _T('public:accueil_site'))); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
@@ -90,24 +90,24 @@ discard block |
||
| 90 | 90 | $count = sql_countsel($tab); |
| 91 | 91 | |
| 92 | 92 | if ($count > 1) { |
| 93 | - $m .= "(" . _T('texte_compte_elements', array('count' => $count)) . ")\n"; |
|
| 93 | + $m .= "("._T('texte_compte_elements', array('count' => $count)).")\n"; |
|
| 94 | 94 | } else { |
| 95 | 95 | if ($count == 1) { |
| 96 | - $m .= "(" . _T('texte_compte_element', array('count' => $count)) . ")\n"; |
|
| 96 | + $m .= "("._T('texte_compte_element', array('count' => $count)).")\n"; |
|
| 97 | 97 | } else { |
| 98 | - $m .= "(" . _T('texte_vide') . ")\n"; |
|
| 98 | + $m .= "("._T('texte_vide').")\n"; |
|
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | if ($result_repair |
| 103 | 103 | and $msg = join(" ", |
| 104 | - (is_resource($result_repair) or is_object($result_repair)) ? sql_fetch($result_repair) : $result_repair) . ' ' |
|
| 104 | + (is_resource($result_repair) or is_object($result_repair)) ? sql_fetch($result_repair) : $result_repair).' ' |
|
| 105 | 105 | and strpos($msg, ' OK ') === false |
| 106 | 106 | ) { |
| 107 | 107 | $class = " class='notice'"; |
| 108 | - $m .= "<br /><tt>" . spip_htmlentities($msg) . "</tt>\n"; |
|
| 108 | + $m .= "<br /><tt>".spip_htmlentities($msg)."</tt>\n"; |
|
| 109 | 109 | } else { |
| 110 | - $m .= " " . _T('texte_table_ok'); |
|
| 110 | + $m .= " "._T('texte_table_ok'); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | $res .= "<div$class>$m</div>"; |