@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | if (isset($data[$root])) { # pas de racine sauf pour les rubriques |
| 143 | 143 | $r = "<option$selected value='$root' class='$class' style='$style'>$espace" |
| 144 | 144 | . $data[$root] |
| 145 | - . '</option>' . "\n"; |
|
| 145 | + . '</option>'."\n"; |
|
| 146 | 146 | } else { |
| 147 | 147 | $r = ''; |
| 148 | 148 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | // et voila le travail |
| 173 | - return $r . $sous; |
|
| 173 | + return $r.$sous; |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | /** |
@@ -218,12 +218,12 @@ discard block |
||
| 218 | 218 | while ($r = sql_fetch($q)) { |
| 219 | 219 | if (autoriser('voir', 'rubrique', $r['id_rubrique'])) { |
| 220 | 220 | // titre largeur maxi a 50 |
| 221 | - $titre = couper(supprimer_tags(typo($r['titre'])) . ' ', 50); |
|
| 221 | + $titre = couper(supprimer_tags(typo($r['titre'])).' ', 50); |
|
| 222 | 222 | if ( |
| 223 | 223 | $GLOBALS['meta']['multi_rubriques'] == 'oui' |
| 224 | 224 | && ($r['langue_choisie'] == 'oui' || $r['id_parent'] == 0) |
| 225 | 225 | ) { |
| 226 | - $titre .= ' [' . traduire_nom_langue($r['lang']) . ']'; |
|
| 226 | + $titre .= ' ['.traduire_nom_langue($r['lang']).']'; |
|
| 227 | 227 | } |
| 228 | 228 | $data[$r['id_rubrique']] = $titre; |
| 229 | 229 | $enfants[$r['id_parent']][] = $r['id_rubrique']; |
@@ -250,9 +250,9 @@ discard block |
||
| 250 | 250 | $att = " id='id_parent' name='id_parent'\nclass='selecteur_parent verdana1'"; |
| 251 | 251 | |
| 252 | 252 | if (preg_match(',^<option[^<>]*value=.(\d*).[^<>]*>([^<]*)</option>$,', $opt, $r)) { |
| 253 | - $r = "<input$att type='hidden' value='" . $r[1] . "' />" . $r[2]; |
|
| 253 | + $r = "<input$att type='hidden' value='".$r[1]."' />".$r[2]; |
|
| 254 | 254 | } else { |
| 255 | - $r = '<select' . $att . " size='1'>\n$opt</select>\n"; |
|
| 255 | + $r = '<select'.$att." size='1'>\n$opt</select>\n"; |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | # message pour neuneus (a supprimer ?) |
@@ -294,13 +294,13 @@ discard block |
||
| 294 | 294 | function selecteur_rubrique_ajax($id_rubrique, $type, $restreint, $idem = 0, $do = 'aff') { |
| 295 | 295 | |
| 296 | 296 | if ($id_rubrique) { |
| 297 | - $titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique=' . (int) $id_rubrique); |
|
| 297 | + $titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique='.(int) $id_rubrique); |
|
| 298 | 298 | } else { |
| 299 | 299 | $titre = $type == 'auteur' ? ' ' : _T('info_racine_site'); |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | $titre = str_replace('&', '&', (string) entites_html(textebrut(typo($titre)))); |
| 303 | - $init = " disabled='disabled' type='text' value=\"" . $titre . "\"\nstyle='width:300px;'"; |
|
| 303 | + $init = " disabled='disabled' type='text' value=\"".$titre."\"\nstyle='width:300px;'"; |
|
| 304 | 304 | |
| 305 | 305 | $url = generer_url_ecrire('selectionner', "id=$id_rubrique&type=$type&do=$do" |
| 306 | 306 | . ($idem ? "&exclus=$idem" : '') |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | . " jQuery(this).toggleClass('toggled'); " |
| 350 | 350 | . "return charger_node_url_si_vide('" |
| 351 | 351 | . $url |
| 352 | - . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='" . attribut_html(_T('titre_image_selecteur')) . "'>" |
|
| 352 | + . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='".attribut_html(_T('titre_image_selecteur'))."'>" |
|
| 353 | 353 | . $img_icone |
| 354 | 354 | . "</a><img src='" |
| 355 | 355 | . chemin_image('loader.svg') |
@@ -313,9 +313,9 @@ |
||
| 313 | 313 | && ($e = $flux['args']['contexte']['_etape']) > 1 |
| 314 | 314 | && ($ext = $flux['args']['ext']) |
| 315 | 315 | && ($f = $flux['data']) |
| 316 | - && file_exists($f . "_$e.$ext") |
|
| 316 | + && file_exists($f."_$e.$ext") |
|
| 317 | 317 | ) { |
| 318 | - $flux['data'] = $f . "_$e"; |
|
| 318 | + $flux['data'] = $f."_$e"; |
|
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | return $flux; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | // mais apres la fonction autoriser() |
| 120 | 120 | if ($f = find_in_path('mes_fonctions.php')) { |
| 121 | 121 | global $dossier_squelettes; |
| 122 | - include_once(_ROOT_CWD . $f); |
|
| 122 | + include_once(_ROOT_CWD.$f); |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | $qui = $GLOBALS['visiteur_session'] ?: []; |
| 161 | 161 | $qui = array_merge(['statut' => '', 'id_auteur' => 0, 'webmestre' => 'non'], $qui); |
| 162 | 162 | } elseif (is_numeric($qui)) { |
| 163 | - $qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . $qui); |
|
| 163 | + $qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.$qui); |
|
| 164 | 164 | if (!$qui) { |
| 165 | 165 | return false; |
| 166 | 166 | } |
@@ -173,8 +173,8 @@ discard block |
||
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | spip_log( |
| 176 | - "autoriser $faire $type $id (" . ($qui['nom'] ?? '') . ') ?', |
|
| 177 | - 'autoriser' . _LOG_DEBUG |
|
| 176 | + "autoriser $faire $type $id (".($qui['nom'] ?? '').') ?', |
|
| 177 | + 'autoriser'._LOG_DEBUG |
|
| 178 | 178 | ); |
| 179 | 179 | |
| 180 | 180 | // passer par objet_type pour avoir les alias |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | isset($GLOBALS['autoriser_exception'][$faire][$type][$id]) |
| 191 | 191 | && autoriser_exception($faire, $type, $id, 'verifier') || isset($GLOBALS['autoriser_exception'][$faire][$type]['*']) && autoriser_exception($faire, $type, '*', 'verifier') |
| 192 | 192 | ) { |
| 193 | - spip_log("autoriser ($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : OK Exception', 'autoriser' . _LOG_DEBUG); |
|
| 193 | + spip_log("autoriser ($faire, $type, $id, ".($qui['nom'] ?? '').') : OK Exception', 'autoriser'._LOG_DEBUG); |
|
| 194 | 194 | return true; |
| 195 | 195 | } |
| 196 | 196 | |
@@ -199,18 +199,18 @@ discard block |
||
| 199 | 199 | // autoriser_faire[_dist], autoriser_defaut[_dist] |
| 200 | 200 | $fonctions = $type |
| 201 | 201 | ? [ |
| 202 | - 'autoriser_' . $type . '_' . $faire, |
|
| 203 | - 'autoriser_' . $type . '_' . $faire . '_dist', |
|
| 204 | - 'autoriser_' . $type, |
|
| 205 | - 'autoriser_' . $type . '_dist', |
|
| 206 | - 'autoriser_' . $faire, |
|
| 207 | - 'autoriser_' . $faire . '_dist', |
|
| 202 | + 'autoriser_'.$type.'_'.$faire, |
|
| 203 | + 'autoriser_'.$type.'_'.$faire.'_dist', |
|
| 204 | + 'autoriser_'.$type, |
|
| 205 | + 'autoriser_'.$type.'_dist', |
|
| 206 | + 'autoriser_'.$faire, |
|
| 207 | + 'autoriser_'.$faire.'_dist', |
|
| 208 | 208 | 'autoriser_defaut', |
| 209 | 209 | 'autoriser_defaut_dist' |
| 210 | 210 | ] |
| 211 | 211 | : [ |
| 212 | - 'autoriser_' . $faire, |
|
| 213 | - 'autoriser_' . $faire . '_dist', |
|
| 212 | + 'autoriser_'.$faire, |
|
| 213 | + 'autoriser_'.$faire.'_dist', |
|
| 214 | 214 | 'autoriser_defaut', |
| 215 | 215 | 'autoriser_defaut_dist' |
| 216 | 216 | ]; |
@@ -224,8 +224,8 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | spip_log( |
| 227 | - "$f($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : ' . ($a ? 'OK' : 'niet'), |
|
| 228 | - 'autoriser' . _LOG_DEBUG |
|
| 227 | + "$f($faire, $type, $id, ".($qui['nom'] ?? '').') : '.($a ? 'OK' : 'niet'), |
|
| 228 | + 'autoriser'._LOG_DEBUG |
|
| 229 | 229 | ); |
| 230 | 230 | |
| 231 | 231 | return $a; |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | function autoriser_previsualiser_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 370 | 370 | |
| 371 | 371 | // Le visiteur a-t-il un statut prevu par la config ? |
| 372 | - if (str_contains((string) $GLOBALS['meta']['preview'], ',' . $qui['statut'] . ',')) { |
|
| 372 | + if (str_contains((string) $GLOBALS['meta']['preview'], ','.$qui['statut'].',')) { |
|
| 373 | 373 | return test_previsualiser_objet_champ($type, $id, $qui, $opt); |
| 374 | 374 | } |
| 375 | 375 | |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | } // pas de champ passe a la demande => NIET |
| 424 | 424 | $previsu = explode(',', (string) $c['previsu']); |
| 425 | 425 | // regarder si ce statut est autorise pour l'auteur |
| 426 | - if (in_array($opt[$champ] . '/auteur', $previsu)) { |
|
| 426 | + if (in_array($opt[$champ].'/auteur', $previsu)) { |
|
| 427 | 427 | // retrouver l’id_auteur qui a filé un lien de prévisu éventuellement, |
| 428 | 428 | // sinon l’auteur en session |
| 429 | 429 | include_spip('inc/securiser_action'); |
@@ -437,12 +437,12 @@ discard block |
||
| 437 | 437 | |
| 438 | 438 | if (!$id_auteur) { |
| 439 | 439 | return false; |
| 440 | - } elseif (autoriser('previsualiser' . $opt[$champ], $type, 0, $id_auteur)) { |
|
| 440 | + } elseif (autoriser('previsualiser'.$opt[$champ], $type, 0, $id_auteur)) { |
|
| 441 | 441 | // dans ce cas (admin en general), pas de filtrage sur ce statut |
| 442 | 442 | } elseif ( |
| 443 | 443 | !sql_countsel( |
| 444 | 444 | 'spip_auteurs_liens', |
| 445 | - 'id_auteur=' . (int) $id_auteur . ' AND objet=' . sql_quote($type) . ' AND id_objet=' . (int) $id |
|
| 445 | + 'id_auteur='.(int) $id_auteur.' AND objet='.sql_quote($type).' AND id_objet='.(int) $id |
|
| 446 | 446 | ) |
| 447 | 447 | ) { |
| 448 | 448 | return false; |
@@ -487,14 +487,14 @@ discard block |
||
| 487 | 487 | // multilinguisme par secteur et objet rattaché à une rubrique |
| 488 | 488 | $primary = id_table_objet($type); |
| 489 | 489 | $id_rubrique = $table != 'spip_rubriques' |
| 490 | - ? sql_getfetsel('id_rubrique', "$table", "$primary=" . (int) $id) |
|
| 490 | + ? sql_getfetsel('id_rubrique', "$table", "$primary=".(int) $id) |
|
| 491 | 491 | : $id; |
| 492 | - $id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . (int) $id_rubrique); |
|
| 492 | + $id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.(int) $id_rubrique); |
|
| 493 | 493 | if (!$id_secteur > 0) { |
| 494 | 494 | $id_secteur = $id_rubrique; |
| 495 | 495 | } |
| 496 | - $langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . (int) $id_secteur); |
|
| 497 | - $langue_objet = sql_getfetsel('lang', "$table", "$primary=" . (int) $id); |
|
| 496 | + $langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique='.(int) $id_secteur); |
|
| 497 | + $langue_objet = sql_getfetsel('lang', "$table", "$primary=".(int) $id); |
|
| 498 | 498 | if ($langue_secteur != $langue_objet) { |
| 499 | 499 | // configuration incohérente, on laisse l'utilisateur corriger la situation |
| 500 | 500 | return true; |
@@ -502,7 +502,7 @@ discard block |
||
| 502 | 502 | if ($table != 'spip_rubriques') { // le choix de la langue se fait seulement sur les rubriques |
| 503 | 503 | return false; |
| 504 | 504 | } else { |
| 505 | - $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . (int) $id); |
|
| 505 | + $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique='.(int) $id); |
|
| 506 | 506 | if ($id_parent != 0) { |
| 507 | 507 | // sous-rubriques : pas de choix de langue |
| 508 | 508 | return false; |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | |
| 555 | 555 | if (!isset($opt['statut'])) { |
| 556 | 556 | if (isset($desc['field']['statut'])) { |
| 557 | - $statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type) . '=' . (int) $id); |
|
| 557 | + $statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type).'='.(int) $id); |
|
| 558 | 558 | } else { |
| 559 | 559 | $statut = 'publie'; |
| 560 | 560 | } // pas de statut => publie |
@@ -719,11 +719,11 @@ discard block |
||
| 719 | 719 | return false; |
| 720 | 720 | } |
| 721 | 721 | |
| 722 | - if (sql_countsel('spip_rubriques', 'id_parent=' . (int) $id)) { |
|
| 722 | + if (sql_countsel('spip_rubriques', 'id_parent='.(int) $id)) { |
|
| 723 | 723 | return false; |
| 724 | 724 | } |
| 725 | 725 | |
| 726 | - if (sql_countsel('spip_articles', 'id_rubrique=' . (int) $id . " AND (statut<>'poubelle')")) { |
|
| 726 | + if (sql_countsel('spip_articles', 'id_rubrique='.(int) $id." AND (statut<>'poubelle')")) { |
|
| 727 | 727 | return false; |
| 728 | 728 | } |
| 729 | 729 | |
@@ -760,7 +760,7 @@ discard block |
||
| 760 | 760 | if (!$id) { |
| 761 | 761 | return false; |
| 762 | 762 | } |
| 763 | - $r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article=' . sql_quote($id)); |
|
| 763 | + $r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article='.sql_quote($id)); |
|
| 764 | 764 | |
| 765 | 765 | return $r && ( |
| 766 | 766 | autoriser('publierdans', 'rubrique', $r['id_rubrique'], $qui, $opt) |
@@ -768,7 +768,7 @@ discard block |
||
| 768 | 768 | (!isset($opt['statut']) || !in_array($opt['statut'], ['publie', 'refuse'], true)) |
| 769 | 769 | && in_array($qui['statut'], ['0minirezo', '1comite']) |
| 770 | 770 | && in_array($r['statut'], ['prop', 'prepa', 'poubelle']) |
| 771 | - && auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur']) |
|
| 771 | + && auteurs_objet('article', $id, 'id_auteur='.$qui['id_auteur']) |
|
| 772 | 772 | ) |
| 773 | 773 | ); |
| 774 | 774 | } |
@@ -826,7 +826,7 @@ discard block |
||
| 826 | 826 | if (!$id) { |
| 827 | 827 | return false; |
| 828 | 828 | } |
| 829 | - $statut = sql_getfetsel('statut', 'spip_articles', 'id_article=' . (int) $id); |
|
| 829 | + $statut = sql_getfetsel('statut', 'spip_articles', 'id_article='.(int) $id); |
|
| 830 | 830 | } |
| 831 | 831 | |
| 832 | 832 | return |
@@ -835,7 +835,7 @@ discard block |
||
| 835 | 835 | in_array($statut, ['prop', 'publie']) |
| 836 | 836 | // sinon si on est auteur, on a le droit de le voir, evidemment ! |
| 837 | 837 | |
| 838 | - || $id && $qui['id_auteur'] && auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur']); |
|
| 838 | + || $id && $qui['id_auteur'] && auteurs_objet('article', $id, 'id_auteur='.$qui['id_auteur']); |
|
| 839 | 839 | } |
| 840 | 840 | |
| 841 | 841 | |
@@ -856,8 +856,8 @@ discard block |
||
| 856 | 856 | function autoriser_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 857 | 857 | # securite, mais on aurait pas du arriver ici ! |
| 858 | 858 | if ( |
| 859 | - function_exists($f = 'autoriser_' . $type . '_voir') |
|
| 860 | - || function_exists($f = 'autoriser_' . $type . '_voir_dist') |
|
| 859 | + function_exists($f = 'autoriser_'.$type.'_voir') |
|
| 860 | + || function_exists($f = 'autoriser_'.$type.'_voir_dist') |
|
| 861 | 861 | ) { |
| 862 | 862 | return $f($faire, $type, $id, $qui, $opt); |
| 863 | 863 | } |
@@ -985,7 +985,7 @@ discard block |
||
| 985 | 985 | $n = sql_fetsel( |
| 986 | 986 | 'A.id_article', |
| 987 | 987 | 'spip_auteurs_liens AS L LEFT JOIN spip_articles AS A ON (L.objet=\'article\' AND L.id_objet=A.id_article)', |
| 988 | - "A.statut='publie' AND L.id_auteur=" . sql_quote($id) |
|
| 988 | + "A.statut='publie' AND L.id_auteur=".sql_quote($id) |
|
| 989 | 989 | ); |
| 990 | 990 | |
| 991 | 991 | return (bool) $n; |
@@ -1189,7 +1189,7 @@ discard block |
||
| 1189 | 1189 | && ($r = sql_allfetsel( |
| 1190 | 1190 | 'id_objet', |
| 1191 | 1191 | 'spip_auteurs_liens', |
| 1192 | - 'id_auteur=' . (int) $id_auteur . " AND objet='rubrique' AND id_objet!=0" |
|
| 1192 | + 'id_auteur='.(int) $id_auteur." AND objet='rubrique' AND id_objet!=0" |
|
| 1193 | 1193 | )) |
| 1194 | 1194 | && (is_countable($r) ? count($r) : 0) |
| 1195 | 1195 | ) { |
@@ -1866,8 +1866,8 @@ discard block |
||
| 1866 | 1866 | function auteurs_objet($objet, $id_objet, $cond = '') { |
| 1867 | 1867 | $objet = objet_type($objet); |
| 1868 | 1868 | $where = [ |
| 1869 | - 'objet=' . sql_quote($objet), |
|
| 1870 | - 'id_objet=' . (int) $id_objet |
|
| 1869 | + 'objet='.sql_quote($objet), |
|
| 1870 | + 'id_objet='.(int) $id_objet |
|
| 1871 | 1871 | ]; |
| 1872 | 1872 | if (!empty($cond)) { |
| 1873 | 1873 | if (is_array($cond)) { |
@@ -1902,7 +1902,7 @@ discard block |
||
| 1902 | 1902 | return sql_allfetsel( |
| 1903 | 1903 | 'id_auteur', |
| 1904 | 1904 | 'spip_auteurs_liens', |
| 1905 | - "objet='article' AND id_objet=" . (int) $id_article . ($cond ? " AND $cond" : '') |
|
| 1905 | + "objet='article' AND id_objet=".(int) $id_article.($cond ? " AND $cond" : '') |
|
| 1906 | 1906 | ); |
| 1907 | 1907 | } |
| 1908 | 1908 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $class = ' blocreplie'; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - return '<div ' . ($id ? "id='$id' " : '') . "class='bloc_depliable$class'>"; |
|
| 55 | + return '<div '.($id ? "id='$id' " : '')."class='bloc_depliable$class'>"; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | function fin_block() { |
@@ -63,12 +63,12 @@ discard block |
||
| 63 | 63 | // $deplie : true (deplie) ou false (plie) ou -1 (inactif) ou 'incertain' pour que le bouton s'auto init au chargement de la page |
| 64 | 64 | // $ids : id des div lies au bouton (facultatif, par defaut c'est le div.bloc_depliable qui suit) |
| 65 | 65 | function bouton_block_depliable($texte, $deplie, $ids = '') { |
| 66 | - $bouton_id = 'b' . substr(md5($texte . microtime()), 0, 8); |
|
| 66 | + $bouton_id = 'b'.substr(md5($texte.microtime()), 0, 8); |
|
| 67 | 67 | |
| 68 | 68 | $class = ($deplie === true) ? ' deplie' : (($deplie == -1) ? ' impliable' : ' replie'); |
| 69 | 69 | if (strlen((string) $ids)) { |
| 70 | 70 | $cible = explode(',', (string) $ids); |
| 71 | - $cible = '#' . implode(',#', $cible); |
|
| 71 | + $cible = '#'.implode(',#', $cible); |
|
| 72 | 72 | } else { |
| 73 | 73 | $cible = "#$bouton_id + div.bloc_depliable"; |
| 74 | 74 | } |
@@ -39,9 +39,9 @@ discard block |
||
| 39 | 39 | $mode = preg_replace(',\W,', '', $mode); |
| 40 | 40 | if ($mode) { |
| 41 | 41 | // chercher dans la base |
| 42 | - $mode_document = 'logo' . $mode; |
|
| 42 | + $mode_document = 'logo'.$mode; |
|
| 43 | 43 | $objet = objet_type($_id_objet); |
| 44 | - $doc = sql_fetsel('D.*', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', 'D.mode=' . sql_quote($mode_document) . ' AND L.objet=' . sql_quote($objet) . ' AND id_objet=' . (int) $id); |
|
| 44 | + $doc = sql_fetsel('D.*', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', 'D.mode='.sql_quote($mode_document).' AND L.objet='.sql_quote($objet).' AND id_objet='.(int) $id); |
|
| 45 | 45 | if ($doc) { |
| 46 | 46 | include_spip('inc/documents'); |
| 47 | 47 | $d = get_spip_doc($doc['fichier']); |
@@ -52,10 +52,10 @@ discard block |
||
| 52 | 52 | if ($compat_old_logos) { |
| 53 | 53 | # attention au cas $id = '0' pour LOGO_SITE_SPIP : utiliser intval() |
| 54 | 54 | $type = type_du_logo($_id_objet); |
| 55 | - $nom = $type . $mode . (int) $id; |
|
| 55 | + $nom = $type.$mode.(int) $id; |
|
| 56 | 56 | |
| 57 | 57 | foreach ($GLOBALS['formats_logos'] as $format) { |
| 58 | - if (@file_exists($d = (_DIR_LOGOS . $nom . '.' . $format))) { |
|
| 58 | + if (@file_exists($d = (_DIR_LOGOS.$nom.'.'.$format))) { |
|
| 59 | 59 | return [$d, _DIR_LOGOS, $nom, $format, @filemtime($d)]; |
| 60 | 60 | } |
| 61 | 61 | } |
@@ -69,17 +69,17 @@ |
||
| 69 | 69 | // compat < SPIP 3.3 |
| 70 | 70 | include_spip('inc/filtres_images_mini'); |
| 71 | 71 | $c['couleur_foncee'] = $c['couleur_theme']; |
| 72 | - $c['couleur_claire'] = '#' . couleur_eclaircir($c['couleur_theme'], .5); |
|
| 72 | + $c['couleur_claire'] = '#'.couleur_eclaircir($c['couleur_theme'], .5); |
|
| 73 | 73 | |
| 74 | 74 | return |
| 75 | - 'couleur_theme=' . substr((string) $c['couleur_theme'], 1) |
|
| 75 | + 'couleur_theme='.substr((string) $c['couleur_theme'], 1) |
|
| 76 | 76 | // compat < SPIP 3.3 |
| 77 | - . '&couleur_claire=' . substr($c['couleur_claire'], 1) |
|
| 78 | - . '&couleur_foncee=' . substr((string) $c['couleur_foncee'], 1); |
|
| 77 | + . '&couleur_claire='.substr($c['couleur_claire'], 1) |
|
| 78 | + . '&couleur_foncee='.substr((string) $c['couleur_foncee'], 1); |
|
| 79 | 79 | } else { |
| 80 | 80 | if (is_array($choix)) { |
| 81 | 81 | // compat < SPIP 3.3 |
| 82 | - $compat_spip_33 = function ($c) { |
|
| 82 | + $compat_spip_33 = function($c) { |
|
| 83 | 83 | if (!isset($c['couleur_theme'])) { |
| 84 | 84 | $c['couleur_theme'] = $c['couleur_foncee']; |
| 85 | 85 | unset($c['couleur_foncee']); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @return void |
| 43 | 43 | **/ |
| 44 | 44 | function install_fichier_connexion($nom, $texte) { |
| 45 | - $texte = '<' . "?php\n" |
|
| 45 | + $texte = '<'."?php\n" |
|
| 46 | 46 | . "if (!defined(\"_ECRIRE_INC_VERSION\")) return;\n" |
| 47 | 47 | . $texte; |
| 48 | 48 | |
@@ -114,10 +114,10 @@ discard block |
||
| 114 | 114 | return $regs; |
| 115 | 115 | } else { |
| 116 | 116 | $ar = '\s*\'([^\']*)\''; |
| 117 | - $r = '\s*,' . $ar; |
|
| 117 | + $r = '\s*,'.$ar; |
|
| 118 | 118 | $r = "#spip_connect_db[(]$ar$r$r$r$r(?:$r(?:$r(?:$r(?:$r)?)?)?)?#"; |
| 119 | 119 | if (preg_match($r, $s, $regs)) { |
| 120 | - $regs[2] = $regs[1] . ($regs[2] ? ':' . $regs[2] . ';' : ''); |
|
| 120 | + $regs[2] = $regs[1].($regs[2] ? ':'.$regs[2].';' : ''); |
|
| 121 | 121 | array_shift($regs); |
| 122 | 122 | array_shift($regs); |
| 123 | 123 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | // Si on n'a pas la bonne version de PHP, c'est la fin |
| 183 | 183 | if ($err) { |
| 184 | 184 | die("<div class='error'>" |
| 185 | - . '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>" |
|
| 185 | + . '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>" |
|
| 186 | 186 | . "<li><strong>{$err[0]}</strong></li>\n</ul></div>"); |
| 187 | 187 | } |
| 188 | 188 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | if ($err) { |
| 204 | 204 | echo "<div class='error'>" |
| 205 | - . '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>"; |
|
| 205 | + . '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>"; |
|
| 206 | 206 | foreach ($err as $e) { |
| 207 | 207 | echo "<li><strong>$e</strong></li>\n"; |
| 208 | 208 | } |
@@ -215,8 +215,8 @@ discard block |
||
| 215 | 215 | |
| 216 | 216 | |
| 217 | 217 | function info_etape($titre, $complement = '') { |
| 218 | - return '<h2>' . $titre . "</h2>\n" . |
|
| 219 | - ($complement ? '' . $complement . "\n" : ''); |
|
| 218 | + return '<h2>'.$titre."</h2>\n". |
|
| 219 | + ($complement ? ''.$complement."\n" : ''); |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | /** |
@@ -230,18 +230,18 @@ discard block |
||
| 230 | 230 | $code = _T('bouton_suivant'); |
| 231 | 231 | } |
| 232 | 232 | static $suivant = 0; |
| 233 | - $id = 'suivant' . (($suivant > 0) ? (string) $suivant : ''); |
|
| 233 | + $id = 'suivant'.(($suivant > 0) ? (string) $suivant : ''); |
|
| 234 | 234 | $suivant += 1; |
| 235 | 235 | |
| 236 | - return "\n<p class='boutons suivant'><input id='" . $id . "' type='submit'\nvalue=\"" . |
|
| 237 | - $code . |
|
| 236 | + return "\n<p class='boutons suivant'><input id='".$id."' type='submit'\nvalue=\"". |
|
| 237 | + $code. |
|
| 238 | 238 | " >>\" /></p>\n"; |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | function info_progression_etape($en_cours, $phase, $dir, $erreur = false) { |
| 242 | 242 | $intitule_etat = []; |
| 243 | 243 | |
| 244 | - $liste = find_all_in_path($dir, $phase . '(([0-9])+|fin)[.]php$'); |
|
| 244 | + $liste = find_all_in_path($dir, $phase.'(([0-9])+|fin)[.]php$'); |
|
| 245 | 245 | $debut = 1; |
| 246 | 246 | $last = is_countable($liste) ? count($liste) : 0; |
| 247 | 247 | |
@@ -272,23 +272,23 @@ discard block |
||
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | $aff_etapes .= "<li class='$class'><div class='fond'>"; |
| 275 | - $aff_etapes .= '<em>' . _T('etape') . " </em><span class='numero_etape'>$debut</span><em> : </em>"; |
|
| 276 | - $aff_etapes .= '<' . (($debut == $en_cours) ? 'strong' : 'span') . ' class="label_etape">' . $intitule_etat["$phase"][$debut] . '</' . (($debut == $en_cours) ? 'strong' : 'span') . '>'; |
|
| 275 | + $aff_etapes .= '<em>'._T('etape')." </em><span class='numero_etape'>$debut</span><em> : </em>"; |
|
| 276 | + $aff_etapes .= '<'.(($debut == $en_cours) ? 'strong' : 'span').' class="label_etape">'.$intitule_etat["$phase"][$debut].'</'.(($debut == $en_cours) ? 'strong' : 'span').'>'; |
|
| 277 | 277 | $aff_etapes .= '</div></li>'; |
| 278 | 278 | } |
| 279 | 279 | $debut++; |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | - return $aff_etapes . '</ul>'; |
|
| 282 | + return $aff_etapes.'</ul>'; |
|
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | |
| 286 | 286 | function fieldset($legend, $champs = [], $apres = '', $avant = '') { |
| 287 | - return "<fieldset>\n" . |
|
| 288 | - $avant . |
|
| 289 | - ($legend ? '<legend>' . $legend . "</legend>\n" : '') . |
|
| 290 | - fieldset_champs($champs) . |
|
| 291 | - $apres . |
|
| 287 | + return "<fieldset>\n". |
|
| 288 | + $avant. |
|
| 289 | + ($legend ? '<legend>'.$legend."</legend>\n" : ''). |
|
| 290 | + fieldset_champs($champs). |
|
| 291 | + $apres. |
|
| 292 | 292 | "</fieldset>\n"; |
| 293 | 293 | } |
| 294 | 294 | |
@@ -298,18 +298,18 @@ discard block |
||
| 298 | 298 | $type = isset($contenu['hidden']) ? 'hidden' : (preg_match(',^pass,', (string) $nom) ? 'password' : 'text'); |
| 299 | 299 | $class = isset($contenu['hidden']) ? '' : "class='formo' size='40' "; |
| 300 | 300 | if (isset($contenu['alternatives'])) { |
| 301 | - $fieldset .= $contenu['label'] . "\n"; |
|
| 301 | + $fieldset .= $contenu['label']."\n"; |
|
| 302 | 302 | foreach ($contenu['alternatives'] as $valeur => $label) { |
| 303 | - $fieldset .= "<input type='radio' name='" . $nom . |
|
| 303 | + $fieldset .= "<input type='radio' name='".$nom. |
|
| 304 | 304 | "' id='$nom-$valeur' value='$valeur'" |
| 305 | 305 | . (($valeur == $contenu['valeur']) ? "\nchecked='checked'" : '') |
| 306 | 306 | . "/>\n"; |
| 307 | - $fieldset .= "<label for='$nom-$valeur'>" . $label . "</label>\n"; |
|
| 307 | + $fieldset .= "<label for='$nom-$valeur'>".$label."</label>\n"; |
|
| 308 | 308 | } |
| 309 | 309 | $fieldset .= "<br />\n"; |
| 310 | 310 | } else { |
| 311 | - $fieldset .= "<label for='" . $nom . "'>" . $contenu['label'] . "</label>\n"; |
|
| 312 | - $fieldset .= '<input ' . $class . "type='" . $type . "' id='" . $nom . "' name='" . $nom . "'\nvalue='" . $contenu['valeur'] . "'" |
|
| 311 | + $fieldset .= "<label for='".$nom."'>".$contenu['label']."</label>\n"; |
|
| 312 | + $fieldset .= '<input '.$class."type='".$type."' id='".$nom."' name='".$nom."'\nvalue='".$contenu['valeur']."'" |
|
| 313 | 313 | . (preg_match(',^(pass|login),', (string) $nom) ? " autocomplete='off'" : '') |
| 314 | 314 | . ((isset($contenu['required']) && $contenu['required']) ? " required='required'" : '') |
| 315 | 315 | . " />\n"; |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | |
| 322 | 322 | function install_select_serveur() { |
| 323 | 323 | $options = []; |
| 324 | - $dir = _DIR_RESTREINT . 'req/'; |
|
| 324 | + $dir = _DIR_RESTREINT.'req/'; |
|
| 325 | 325 | $d = opendir($dir); |
| 326 | 326 | if (!$d) { |
| 327 | 327 | return []; |
@@ -329,17 +329,17 @@ discard block |
||
| 329 | 329 | while (($f = readdir($d)) !== false) { |
| 330 | 330 | if ( |
| 331 | 331 | preg_match('/^(.*)[.]php$/', $f, $s) |
| 332 | - && is_readable($f = $dir . $f) |
|
| 332 | + && is_readable($f = $dir.$f) |
|
| 333 | 333 | ) { |
| 334 | 334 | require_once($f); |
| 335 | 335 | $s = $s[1]; |
| 336 | - $v = 'spip_versions_' . $s; |
|
| 336 | + $v = 'spip_versions_'.$s; |
|
| 337 | 337 | if (function_exists($v) && $v()) { |
| 338 | 338 | $titre = _T("install_select_type_$s"); |
| 339 | 339 | // proposer mysql par defaut si dispo |
| 340 | 340 | $checked = ($s == 'mysql' ? " checked='checked'" : ''); |
| 341 | 341 | $options[$s] = "<li><input type='radio' id='$s' value='$s' name='server_db'$checked>" |
| 342 | - . "<label for='$s'>" . ($titre ?: $s) . '</label></li>'; |
|
| 342 | + . "<label for='$s'>".($titre ?: $s).'</label></li>'; |
|
| 343 | 343 | } else { |
| 344 | 344 | spip_log("$s: portage indisponible"); |
| 345 | 345 | } |
@@ -357,8 +357,8 @@ discard block |
||
| 357 | 357 | "\n<input type='hidden' name='etape' value='$etape' />" |
| 358 | 358 | . $hidden |
| 359 | 359 | . (_request('echec') ? |
| 360 | - ('<p><b>' . _T('avis_connexion_echec_1') . |
|
| 361 | - '</b></p><p>' . _T('avis_connexion_echec_2') . "</p><p style='font-size: small;'>" . _T('avis_connexion_echec_3') . '</p>') |
|
| 360 | + ('<p><b>'._T('avis_connexion_echec_1'). |
|
| 361 | + '</b></p><p>'._T('avis_connexion_echec_2')."</p><p style='font-size: small;'>"._T('avis_connexion_echec_3').'</p>') |
|
| 362 | 362 | : '') |
| 363 | 363 | |
| 364 | 364 | . ($jquery ? http_script('', 'jquery.js') : '') |
@@ -396,9 +396,9 @@ discard block |
||
| 396 | 396 | });') |
| 397 | 397 | |
| 398 | 398 | . ($server_db |
| 399 | - ? '<input type="hidden" name="server_db" value="' . $server_db . '" />' |
|
| 399 | + ? '<input type="hidden" name="server_db" value="'.$server_db.'" />' |
|
| 400 | 400 | . (($predef[0]) |
| 401 | - ? ('<h3>' . _T('install_serveur_hebergeur') . '</h3>') |
|
| 401 | + ? ('<h3>'._T('install_serveur_hebergeur').'</h3>') |
|
| 402 | 402 | : '') |
| 403 | 403 | : ('<fieldset><legend>' |
| 404 | 404 | . _T('install_select_type_db') |
@@ -413,9 +413,9 @@ discard block |
||
| 413 | 413 | . "\n</ul>\n</div></fieldset>") |
| 414 | 414 | ) |
| 415 | 415 | . '<div id="install_adresse_base_hebergeur">' |
| 416 | - . '<p>' . _T('texte_connexion_mysql') . '</p>' |
|
| 416 | + . '<p>'._T('texte_connexion_mysql').'</p>' |
|
| 417 | 417 | . ($predef[1] |
| 418 | - ? '<h3>' . _T('install_adresse_base_hebergeur') . '</h3>' |
|
| 418 | + ? '<h3>'._T('install_adresse_base_hebergeur').'</h3>' |
|
| 419 | 419 | : fieldset( |
| 420 | 420 | _T('entree_base_donnee_1'), |
| 421 | 421 | [ |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | |
| 431 | 431 | . '<div id="install_login_base_hebergeur">' |
| 432 | 432 | . ($predef[2] |
| 433 | - ? '<h3>' . _T('install_login_base_hebergeur') . '</h3>' |
|
| 433 | + ? '<h3>'._T('install_login_base_hebergeur').'</h3>' |
|
| 434 | 434 | : fieldset( |
| 435 | 435 | _T('entree_login_connexion_1'), |
| 436 | 436 | [ |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | |
| 446 | 446 | . '<div id="install_pass_base_hebergeur">' |
| 447 | 447 | . ($predef[3] |
| 448 | - ? '<h3>' . _T('install_pass_base_hebergeur') . '</h3>' |
|
| 448 | + ? '<h3>'._T('install_pass_base_hebergeur').'</h3>' |
|
| 449 | 449 | : fieldset( |
| 450 | 450 | _T('entree_mot_passe_1'), |
| 451 | 451 | [ |
@@ -467,20 +467,20 @@ discard block |
||
| 467 | 467 | function predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db) { |
| 468 | 468 | return ((defined('_INSTALL_HOST_DB')) |
| 469 | 469 | ? '' |
| 470 | - : "\n<input type='hidden' name='adresse_db' value=\"" . spip_htmlspecialchars($adresse_db) . '" />' |
|
| 470 | + : "\n<input type='hidden' name='adresse_db' value=\"".spip_htmlspecialchars($adresse_db).'" />' |
|
| 471 | 471 | ) |
| 472 | 472 | . ((defined('_INSTALL_USER_DB')) |
| 473 | 473 | ? '' |
| 474 | - : "\n<input type='hidden' name='login_db' value=\"" . spip_htmlspecialchars($login_db) . '" />' |
|
| 474 | + : "\n<input type='hidden' name='login_db' value=\"".spip_htmlspecialchars($login_db).'" />' |
|
| 475 | 475 | ) |
| 476 | 476 | . ((defined('_INSTALL_PASS_DB')) |
| 477 | 477 | ? '' |
| 478 | - : "\n<input type='hidden' name='pass_db' value=\"" . spip_htmlspecialchars($pass_db) . '" />' |
|
| 478 | + : "\n<input type='hidden' name='pass_db' value=\"".spip_htmlspecialchars($pass_db).'" />' |
|
| 479 | 479 | ) |
| 480 | 480 | |
| 481 | 481 | . ((defined('_INSTALL_SERVER_DB')) |
| 482 | 482 | ? '' |
| 483 | - : "\n<input type='hidden' name='server_db' value=\"" . spip_htmlspecialchars($server_db) . '" />' |
|
| 483 | + : "\n<input type='hidden' name='server_db' value=\"".spip_htmlspecialchars($server_db).'" />' |
|
| 484 | 484 | ); |
| 485 | 485 | } |
| 486 | 486 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * Code HTML du formulaire |
| 78 | 78 | */ |
| 79 | 79 | function redirige_action_auteur($action, $arg, $ret, $gra = '', $mode = false, $atts = '', $public = false) { |
| 80 | - $r = ($public ? _DIR_RESTREINT_ABS : _DIR_RESTREINT) . generer_url_ecrire($ret, $gra, true, true); |
|
| 80 | + $r = ($public ? _DIR_RESTREINT_ABS : _DIR_RESTREINT).generer_url_ecrire($ret, $gra, true, true); |
|
| 81 | 81 | |
| 82 | 82 | return generer_action_auteur($action, $arg, $r, $mode, $atts, $public); |
| 83 | 83 | } |
@@ -104,9 +104,9 @@ discard block |
||
| 104 | 104 | * URL, code HTML du formulaire ou tableau (action, arg, hash) |
| 105 | 105 | */ |
| 106 | 106 | function redirige_action_post($action, $arg, $ret, $gra, $corps, $att = '') { |
| 107 | - $r = _DIR_RESTREINT . generer_url_ecrire($ret, $gra, false, true); |
|
| 107 | + $r = _DIR_RESTREINT.generer_url_ecrire($ret, $gra, false, true); |
|
| 108 | 108 | |
| 109 | - return generer_action_auteur($action, $arg, $r, $corps, $att . " method='post'"); |
|
| 109 | + return generer_action_auteur($action, $arg, $r, $corps, $att." method='post'"); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | $c = $GLOBALS['meta']['charset']; |
| 143 | - header('Content-Type: ' . $content_type . '; charset=' . $c); |
|
| 144 | - $debut = (($xml && strlen(trim($corps))) ? '<' . "?xml version='1.0' encoding='" . $c . "'?" . ">\n" : ''); |
|
| 143 | + header('Content-Type: '.$content_type.'; charset='.$c); |
|
| 144 | + $debut = (($xml && strlen(trim($corps))) ? '<'."?xml version='1.0' encoding='".$c."'?".">\n" : ''); |
|
| 145 | 145 | $fin = ''; |
| 146 | 146 | |
| 147 | 147 | echo $debut, $corps, $fin, $e; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | function extraire_date($texte): string { |
| 39 | 39 | // format = 2001-08 |
| 40 | 40 | if (preg_match(',([1-2]\d{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 | return ''; |
| 44 | 44 | } |
@@ -69,11 +69,11 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | if (preg_match('#^([12]\d{3})([-/]00)?( [-0-9:]+)?$#', $date, $regs)) { |
| 71 | 71 | $regs = array_pad($regs, 4, null); // eviter notice php |
| 72 | - $date = $regs[1] . '-00-00' . $regs[3]; |
|
| 72 | + $date = $regs[1].'-00-00'.$regs[3]; |
|
| 73 | 73 | } else { |
| 74 | 74 | if (preg_match('#^([12]\d{3}[-/][01]?\d)([-/]00)?( [-0-9:]+)?$#', $date, $regs)) { |
| 75 | 75 | $regs = array_pad($regs, 4, null); // eviter notice php |
| 76 | - $date = preg_replace('@/@', '-', (string) $regs[1]) . '-00' . $regs[3]; |
|
| 76 | + $date = preg_replace('@/@', '-', (string) $regs[1]).'-00'.$regs[3]; |
|
| 77 | 77 | } else { |
| 78 | 78 | $date = date('Y-m-d H:i:s', strtotime($date)); |
| 79 | 79 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $letexte ??= ''; |
| 101 | 101 | if ( |
| 102 | 102 | !$verif_format_date |
| 103 | - || in_array(strlen($letexte), [10,19]) && preg_match('/^\d{4}-\d{2}-\d{2}(\s\d{2}:\d{2}:\d{2})?$/', $letexte) |
|
| 103 | + || in_array(strlen($letexte), [10, 19]) && preg_match('/^\d{4}-\d{2}-\d{2}(\s\d{2}:\d{2}:\d{2})?$/', $letexte) |
|
| 104 | 104 | ) { |
| 105 | 105 | if (strncmp('0000-00-00', $letexte, 10) == 0) { |
| 106 | 106 | return ''; |
@@ -385,39 +385,39 @@ discard block |
||
| 385 | 385 | if ($decal > 3600 * 24 * 30) { |
| 386 | 386 | $mois = floor($decal / (3600 * 24 * 30)); |
| 387 | 387 | $delai = $mois < 2 |
| 388 | - ? "$mois " . _T('date_un_mois') |
|
| 389 | - : "$mois " . _T('date_mois'); |
|
| 388 | + ? "$mois "._T('date_un_mois') |
|
| 389 | + : "$mois "._T('date_mois'); |
|
| 390 | 390 | } else { |
| 391 | 391 | if ($decal > 3600 * 24 * 7) { |
| 392 | 392 | $semaines = floor($decal / (3600 * 24 * 7)); |
| 393 | 393 | $delai = $semaines < 2 |
| 394 | - ? "$semaines " . _T('date_une_semaine') |
|
| 395 | - : "$semaines " . _T('date_semaines'); |
|
| 394 | + ? "$semaines "._T('date_une_semaine') |
|
| 395 | + : "$semaines "._T('date_semaines'); |
|
| 396 | 396 | } else { |
| 397 | 397 | if ($decal > 3600 * 24) { |
| 398 | 398 | $jours = floor($decal / (3600 * 24)); |
| 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 | $delai = $heures < 2 |
| 408 | - ? "$heures " . _T('date_une_heure') |
|
| 409 | - : "$heures " . _T('date_heures'); |
|
| 408 | + ? "$heures "._T('date_une_heure') |
|
| 409 | + : "$heures "._T('date_heures'); |
|
| 410 | 410 | } else { |
| 411 | 411 | if ($decal >= 60) { |
| 412 | 412 | $minutes = floor($decal / 60); |
| 413 | 413 | $delai = $minutes < 2 |
| 414 | - ? "$minutes " . _T('date_une_minute') |
|
| 415 | - : "$minutes " . _T('date_minutes'); |
|
| 414 | + ? "$minutes "._T('date_une_minute') |
|
| 415 | + : "$minutes "._T('date_minutes'); |
|
| 416 | 416 | } else { |
| 417 | 417 | $secondes = ceil($decal); |
| 418 | 418 | $delai = $secondes < 2 |
| 419 | - ? "$secondes " . _T('date_une_seconde') |
|
| 420 | - : "$secondes " . _T('date_secondes'); |
|
| 419 | + ? "$secondes "._T('date_une_seconde') |
|
| 420 | + : "$secondes "._T('date_secondes'); |
|
| 421 | 421 | } |
| 422 | 422 | } |
| 423 | 423 | } |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | $njour = 0; |
| 508 | 508 | } else { |
| 509 | 509 | $njour = (int) $jour; |
| 510 | - if ($jourth = _T('date_jnum' . $jour)) { |
|
| 510 | + if ($jourth = _T('date_jnum'.$jour)) { |
|
| 511 | 511 | $jour = $jourth; |
| 512 | 512 | } |
| 513 | 513 | } |
@@ -515,10 +515,10 @@ discard block |
||
| 515 | 515 | $mois = (int) $mois; |
| 516 | 516 | if ($mois > 0 && $mois < 13) { |
| 517 | 517 | /* Traiter le cas "abbr" pour les noms de mois */ |
| 518 | - $param = ((isset($options['param']) && $options['param'] === 'abbr') ? '_' . $options['param'] : ''); |
|
| 519 | - $nommois = _T('date_mois_' . $mois . $param); |
|
| 518 | + $param = ((isset($options['param']) && $options['param'] === 'abbr') ? '_'.$options['param'] : ''); |
|
| 519 | + $nommois = _T('date_mois_'.$mois.$param); |
|
| 520 | 520 | $jourmois = $jour |
| 521 | - ? _T('date_de_mois_' . $mois, ['j' => $jour, 'nommois' => $nommois]) |
|
| 521 | + ? _T('date_de_mois_'.$mois, ['j' => $jour, 'nommois' => $nommois]) |
|
| 522 | 522 | : $nommois; |
| 523 | 523 | } else { |
| 524 | 524 | $nommois = ''; |
@@ -526,7 +526,7 @@ discard block |
||
| 526 | 526 | } |
| 527 | 527 | |
| 528 | 528 | if ($annee < 0) { |
| 529 | - $annee = -$annee . ' ' . _T('date_avant_jc'); |
|
| 529 | + $annee = -$annee.' '._T('date_avant_jc'); |
|
| 530 | 530 | $avjc = true; |
| 531 | 531 | } else { |
| 532 | 532 | $avjc = false; |
@@ -552,11 +552,11 @@ discard block |
||
| 552 | 552 | } |
| 553 | 553 | } |
| 554 | 554 | if ($vue == 'saison') { |
| 555 | - return $saison ? _T('date_saison_' . $saison) : ''; |
|
| 555 | + return $saison ? _T('date_saison_'.$saison) : ''; |
|
| 556 | 556 | } else { |
| 557 | 557 | return $saison ? trim((string) _T( |
| 558 | 558 | 'date_fmt_saison_annee', |
| 559 | - ['saison' => _T('date_saison_' . $saison), 'annee' => $annee] |
|
| 559 | + ['saison' => _T('date_saison_'.$saison), 'annee' => $annee] |
|
| 560 | 560 | )) : ''; |
| 561 | 561 | } |
| 562 | 562 | |
@@ -633,9 +633,9 @@ discard block |
||
| 633 | 633 | } |
| 634 | 634 | $nom = mktime(1, 1, 1, $mois, $njour, $annee); |
| 635 | 635 | $nom = 1 + (int) date('w', $nom); |
| 636 | - $param = ((isset($options['param']) && $options['param']) ? '_' . $options['param'] : ''); |
|
| 636 | + $param = ((isset($options['param']) && $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) { |
@@ -1031,8 +1031,8 @@ discard block |
||
| 1031 | 1031 | |
| 1032 | 1032 | $dtstart = $dtend = $dtabbr = ''; |
| 1033 | 1033 | if (str_contains($forme, 'hcal')) { |
| 1034 | - $dtstart = "<abbr class='dtstart' title='" . date_iso($date_debut) . "'>"; |
|
| 1035 | - $dtend = "<abbr class='dtend' title='" . date_iso($date_fin) . "'>"; |
|
| 1034 | + $dtstart = "<abbr class='dtstart' title='".date_iso($date_debut)."'>"; |
|
| 1035 | + $dtend = "<abbr class='dtend' title='".date_iso($date_fin)."'>"; |
|
| 1036 | 1036 | $dtabbr = '</abbr>'; |
| 1037 | 1037 | } |
| 1038 | 1038 | |
@@ -1080,7 +1080,7 @@ discard block |
||
| 1080 | 1080 | } |
| 1081 | 1081 | } else { |
| 1082 | 1082 | $s = $dtabbr && $dtstart |
| 1083 | - ? $dtstart . spip_ucfirst($s) . $dtabbr |
|
| 1083 | + ? $dtstart.spip_ucfirst($s).$dtabbr |
|
| 1084 | 1084 | : spip_ucfirst($s); |
| 1085 | 1085 | } |
| 1086 | 1086 | } else { |
@@ -1099,8 +1099,8 @@ discard block |
||
| 1099 | 1099 | $date_debut = _T('date_fmt_jour_heure', ['jour' => $date_debut, 'heure' => $hd]); |
| 1100 | 1100 | $date_fin = _T('date_fmt_jour_heure', ['jour' => $date_fin, 'heure' => $hf]); |
| 1101 | 1101 | } |
| 1102 | - $date_debut = $dtstart . $date_debut . $dtabbr; |
|
| 1103 | - $date_fin = $dtend . $date_fin . $dtabbr; |
|
| 1102 | + $date_debut = $dtstart.$date_debut.$dtabbr; |
|
| 1103 | + $date_fin = $dtend.$date_fin.$dtabbr; |
|
| 1104 | 1104 | |
| 1105 | 1105 | $s = _T('date_fmt_periode', ['date_debut' => $date_debut, 'date_fin' => $date_fin]); |
| 1106 | 1106 | } else { |
@@ -1117,8 +1117,8 @@ discard block |
||
| 1117 | 1117 | $date_fin = _T('date_fmt_jour_heure', ['jour' => $date_fin, 'heure' => $hf]); |
| 1118 | 1118 | } |
| 1119 | 1119 | |
| 1120 | - $date_debut = $dtstart . $date_debut . $dtabbr; |
|
| 1121 | - $date_fin = $dtend . $date_fin . $dtabbr; |
|
| 1120 | + $date_debut = $dtstart.$date_debut.$dtabbr; |
|
| 1121 | + $date_fin = $dtend.$date_fin.$dtabbr; |
|
| 1122 | 1122 | $s = _T('date_fmt_periode', ['date_debut' => $date_debut, 'date_fin' => $date_fin]); |
| 1123 | 1123 | } |
| 1124 | 1124 | } |
@@ -1225,7 +1225,7 @@ discard block |
||
| 1225 | 1225 | $d = date('Y-m-d'); |
| 1226 | 1226 | } |
| 1227 | 1227 | |
| 1228 | - return substr($d, 0, 4) . substr($d, 5, 2) . substr($d, 8, 2); |
|
| 1228 | + return substr($d, 0, 4).substr($d, 5, 2).substr($d, 8, 2); |
|
| 1229 | 1229 | } |
| 1230 | 1230 | |
| 1231 | 1231 | /** |
@@ -1245,7 +1245,7 @@ discard block |
||
| 1245 | 1245 | $d = date('Y-m-d'); |
| 1246 | 1246 | } |
| 1247 | 1247 | |
| 1248 | - return substr($d, 0, 4) . substr($d, 5, 2); |
|
| 1248 | + return substr($d, 0, 4).substr($d, 5, 2); |
|
| 1249 | 1249 | } |
| 1250 | 1250 | |
| 1251 | 1251 | /** |