@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | // mais apres la fonction autoriser() |
| 121 | 121 | if ($f = find_in_path('mes_fonctions.php')) { |
| 122 | 122 | global $dossier_squelettes; |
| 123 | - include_once(_ROOT_CWD . $f); |
|
| 123 | + include_once(_ROOT_CWD.$f); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $qui = $GLOBALS['visiteur_session'] ?: []; |
| 163 | 163 | $qui = array_merge(['statut' => '', 'id_auteur' => 0, 'webmestre' => 'non'], $qui); |
| 164 | 164 | } elseif (is_numeric($qui)) { |
| 165 | - $qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . $qui); |
|
| 165 | + $qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.$qui); |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | // Admins restreints, on construit ici (pas generique mais...) |
@@ -172,8 +172,8 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | spip_log( |
| 175 | - "autoriser $faire $type $id (" . ($qui['nom'] ?? '') . ') ?', |
|
| 176 | - 'autoriser' . _LOG_DEBUG |
|
| 175 | + "autoriser $faire $type $id (".($qui['nom'] ?? '').') ?', |
|
| 176 | + 'autoriser'._LOG_DEBUG |
|
| 177 | 177 | ); |
| 178 | 178 | |
| 179 | 179 | // passer par objet_type pour avoir les alias |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | (isset($GLOBALS['autoriser_exception'][$faire][$type][$id]) and autoriser_exception($faire, $type, $id, 'verifier')) |
| 190 | 190 | or (isset($GLOBALS['autoriser_exception'][$faire][$type]['*']) and autoriser_exception($faire, $type, '*', 'verifier')) |
| 191 | 191 | ) { |
| 192 | - spip_log("autoriser ($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : OK Exception', 'autoriser' . _LOG_DEBUG); |
|
| 192 | + spip_log("autoriser ($faire, $type, $id, ".($qui['nom'] ?? '').') : OK Exception', 'autoriser'._LOG_DEBUG); |
|
| 193 | 193 | return true; |
| 194 | 194 | } |
| 195 | 195 | |
@@ -198,18 +198,18 @@ discard block |
||
| 198 | 198 | // autoriser_faire[_dist], autoriser_defaut[_dist] |
| 199 | 199 | $fonctions = $type |
| 200 | 200 | ? [ |
| 201 | - 'autoriser_' . $type . '_' . $faire, |
|
| 202 | - 'autoriser_' . $type . '_' . $faire . '_dist', |
|
| 203 | - 'autoriser_' . $type, |
|
| 204 | - 'autoriser_' . $type . '_dist', |
|
| 205 | - 'autoriser_' . $faire, |
|
| 206 | - 'autoriser_' . $faire . '_dist', |
|
| 201 | + 'autoriser_'.$type.'_'.$faire, |
|
| 202 | + 'autoriser_'.$type.'_'.$faire.'_dist', |
|
| 203 | + 'autoriser_'.$type, |
|
| 204 | + 'autoriser_'.$type.'_dist', |
|
| 205 | + 'autoriser_'.$faire, |
|
| 206 | + 'autoriser_'.$faire.'_dist', |
|
| 207 | 207 | 'autoriser_defaut', |
| 208 | 208 | 'autoriser_defaut_dist' |
| 209 | 209 | ] |
| 210 | 210 | : [ |
| 211 | - 'autoriser_' . $faire, |
|
| 212 | - 'autoriser_' . $faire . '_dist', |
|
| 211 | + 'autoriser_'.$faire, |
|
| 212 | + 'autoriser_'.$faire.'_dist', |
|
| 213 | 213 | 'autoriser_defaut', |
| 214 | 214 | 'autoriser_defaut_dist' |
| 215 | 215 | ]; |
@@ -222,8 +222,8 @@ discard block |
||
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | spip_log( |
| 225 | - "$f($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : ' . ($a ? 'OK' : 'niet'), |
|
| 226 | - 'autoriser' . _LOG_DEBUG |
|
| 225 | + "$f($faire, $type, $id, ".($qui['nom'] ?? '').') : '.($a ? 'OK' : 'niet'), |
|
| 226 | + 'autoriser'._LOG_DEBUG |
|
| 227 | 227 | ); |
| 228 | 228 | |
| 229 | 229 | return $a; |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | function autoriser_previsualiser_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 373 | 373 | |
| 374 | 374 | // Le visiteur a-t-il un statut prevu par la config ? |
| 375 | - if (strpos($GLOBALS['meta']['preview'], ',' . $qui['statut'] . ',') !== false) { |
|
| 375 | + if (strpos($GLOBALS['meta']['preview'], ','.$qui['statut'].',') !== false) { |
|
| 376 | 376 | return test_previsualiser_objet_champ($type, $id, $qui, $opt); |
| 377 | 377 | } |
| 378 | 378 | |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | } // pas de champ passe a la demande => NIET |
| 431 | 431 | $previsu = explode(',', $c['previsu']); |
| 432 | 432 | // regarder si ce statut est autorise pour l'auteur |
| 433 | - if (in_array($opt[$champ] . '/auteur', $previsu)) { |
|
| 433 | + if (in_array($opt[$champ].'/auteur', $previsu)) { |
|
| 434 | 434 | // retrouver l’id_auteur qui a filé un lien de prévisu éventuellement, |
| 435 | 435 | // sinon l’auteur en session |
| 436 | 436 | include_spip('inc/securiser_action'); |
@@ -444,12 +444,12 @@ discard block |
||
| 444 | 444 | |
| 445 | 445 | if (!$id_auteur) { |
| 446 | 446 | return false; |
| 447 | - } elseif (autoriser('previsualiser' . $opt[$champ], $type, 0, $id_auteur)) { |
|
| 447 | + } elseif (autoriser('previsualiser'.$opt[$champ], $type, 0, $id_auteur)) { |
|
| 448 | 448 | // dans ce cas (admin en general), pas de filtrage sur ce statut |
| 449 | 449 | } elseif ( |
| 450 | 450 | !sql_countsel( |
| 451 | 451 | 'spip_auteurs_liens', |
| 452 | - 'id_auteur=' . intval($id_auteur) . ' AND objet=' . sql_quote($type) . ' AND id_objet=' . intval($id) |
|
| 452 | + 'id_auteur='.intval($id_auteur).' AND objet='.sql_quote($type).' AND id_objet='.intval($id) |
|
| 453 | 453 | ) |
| 454 | 454 | ) { |
| 455 | 455 | return false; |
@@ -494,16 +494,16 @@ discard block |
||
| 494 | 494 | // multilinguisme par secteur et objet rattaché à une rubrique |
| 495 | 495 | $primary = id_table_objet($type); |
| 496 | 496 | if ($table != 'spip_rubriques') { |
| 497 | - $id_rubrique = sql_getfetsel('id_rubrique', "$table", "$primary=" . intval($id)); |
|
| 497 | + $id_rubrique = sql_getfetsel('id_rubrique', "$table", "$primary=".intval($id)); |
|
| 498 | 498 | } else { |
| 499 | 499 | $id_rubrique = $id; |
| 500 | 500 | } |
| 501 | - $id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 501 | + $id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique)); |
|
| 502 | 502 | if (!$id_secteur > 0) { |
| 503 | 503 | $id_secteur = $id_rubrique; |
| 504 | 504 | } |
| 505 | - $langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . intval($id_secteur)); |
|
| 506 | - $langue_objet = sql_getfetsel('lang', "$table", "$primary=" . intval($id)); |
|
| 505 | + $langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique='.intval($id_secteur)); |
|
| 506 | + $langue_objet = sql_getfetsel('lang', "$table", "$primary=".intval($id)); |
|
| 507 | 507 | if ($langue_secteur != $langue_objet) { |
| 508 | 508 | // configuration incohérente, on laisse l'utilisateur corriger la situation |
| 509 | 509 | return true; |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | if ($table != 'spip_rubriques') { // le choix de la langue se fait seulement sur les rubriques |
| 512 | 512 | return false; |
| 513 | 513 | } else { |
| 514 | - $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id)); |
|
| 514 | + $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique='.intval($id)); |
|
| 515 | 515 | if ($id_parent != 0) { |
| 516 | 516 | // sous-rubriques : pas de choix de langue |
| 517 | 517 | return false; |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | |
| 564 | 564 | if (!isset($opt['statut'])) { |
| 565 | 565 | if (isset($desc['field']['statut'])) { |
| 566 | - $statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type) . '=' . intval($id)); |
|
| 566 | + $statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type).'='.intval($id)); |
|
| 567 | 567 | } else { |
| 568 | 568 | $statut = 'publie'; |
| 569 | 569 | } // pas de statut => publie |
@@ -737,11 +737,11 @@ discard block |
||
| 737 | 737 | return false; |
| 738 | 738 | } |
| 739 | 739 | |
| 740 | - if (sql_countsel('spip_rubriques', 'id_parent=' . intval($id))) { |
|
| 740 | + if (sql_countsel('spip_rubriques', 'id_parent='.intval($id))) { |
|
| 741 | 741 | return false; |
| 742 | 742 | } |
| 743 | 743 | |
| 744 | - if (sql_countsel('spip_articles', 'id_rubrique=' . intval($id) . " AND (statut<>'poubelle')")) { |
|
| 744 | + if (sql_countsel('spip_articles', 'id_rubrique='.intval($id)." AND (statut<>'poubelle')")) { |
|
| 745 | 745 | return false; |
| 746 | 746 | } |
| 747 | 747 | |
@@ -778,7 +778,7 @@ discard block |
||
| 778 | 778 | if (!$id) { |
| 779 | 779 | return false; |
| 780 | 780 | } |
| 781 | - $r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article=' . sql_quote($id)); |
|
| 781 | + $r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article='.sql_quote($id)); |
|
| 782 | 782 | |
| 783 | 783 | return |
| 784 | 784 | $r |
@@ -789,7 +789,7 @@ discard block |
||
| 789 | 789 | (!isset($opt['statut']) or !in_array($opt['statut'], ['publie', 'refuse'], true)) |
| 790 | 790 | and in_array($qui['statut'], ['0minirezo', '1comite']) |
| 791 | 791 | and in_array($r['statut'], ['prop', 'prepa', 'poubelle']) |
| 792 | - and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur']) |
|
| 792 | + and auteurs_objet('article', $id, 'id_auteur='.$qui['id_auteur']) |
|
| 793 | 793 | ) |
| 794 | 794 | ); |
| 795 | 795 | } |
@@ -847,7 +847,7 @@ discard block |
||
| 847 | 847 | if (!$id) { |
| 848 | 848 | return false; |
| 849 | 849 | } |
| 850 | - $statut = sql_getfetsel('statut', 'spip_articles', 'id_article=' . intval($id)); |
|
| 850 | + $statut = sql_getfetsel('statut', 'spip_articles', 'id_article='.intval($id)); |
|
| 851 | 851 | } |
| 852 | 852 | |
| 853 | 853 | return |
@@ -858,7 +858,7 @@ discard block |
||
| 858 | 858 | or |
| 859 | 859 | ($id |
| 860 | 860 | and $qui['id_auteur'] |
| 861 | - and auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur'])); |
|
| 861 | + and auteurs_objet('article', $id, 'id_auteur='.$qui['id_auteur'])); |
|
| 862 | 862 | } |
| 863 | 863 | |
| 864 | 864 | |
@@ -879,8 +879,8 @@ discard block |
||
| 879 | 879 | function autoriser_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 880 | 880 | # securite, mais on aurait pas du arriver ici ! |
| 881 | 881 | if ( |
| 882 | - function_exists($f = 'autoriser_' . $type . '_voir') |
|
| 883 | - or function_exists($f = 'autoriser_' . $type . '_voir_dist') |
|
| 882 | + function_exists($f = 'autoriser_'.$type.'_voir') |
|
| 883 | + or function_exists($f = 'autoriser_'.$type.'_voir_dist') |
|
| 884 | 884 | ) { |
| 885 | 885 | return $f($faire, $type, $id, $qui, $opt); |
| 886 | 886 | } |
@@ -1011,7 +1011,7 @@ discard block |
||
| 1011 | 1011 | $n = sql_fetsel( |
| 1012 | 1012 | 'A.id_article', |
| 1013 | 1013 | 'spip_auteurs_liens AS L LEFT JOIN spip_articles AS A ON (L.objet=\'article\' AND L.id_objet=A.id_article)', |
| 1014 | - "A.statut='publie' AND L.id_auteur=" . sql_quote($id) |
|
| 1014 | + "A.statut='publie' AND L.id_auteur=".sql_quote($id) |
|
| 1015 | 1015 | ); |
| 1016 | 1016 | |
| 1017 | 1017 | return $n ? true : false; |
@@ -1223,7 +1223,7 @@ discard block |
||
| 1223 | 1223 | and $r = sql_allfetsel( |
| 1224 | 1224 | 'id_objet', |
| 1225 | 1225 | 'spip_auteurs_liens', |
| 1226 | - 'id_auteur=' . intval($id_auteur) . " AND objet='rubrique' AND id_objet!=0" |
|
| 1226 | + 'id_auteur='.intval($id_auteur)." AND objet='rubrique' AND id_objet!=0" |
|
| 1227 | 1227 | ) |
| 1228 | 1228 | and is_countable($r) ? count($r) : 0 |
| 1229 | 1229 | ) { |
@@ -1908,8 +1908,8 @@ discard block |
||
| 1908 | 1908 | function auteurs_objet($objet, $id_objet, $cond = '') { |
| 1909 | 1909 | $objet = objet_type($objet); |
| 1910 | 1910 | $where = [ |
| 1911 | - 'objet=' . sql_quote($objet), |
|
| 1912 | - 'id_objet=' . intval($id_objet) |
|
| 1911 | + 'objet='.sql_quote($objet), |
|
| 1912 | + 'id_objet='.intval($id_objet) |
|
| 1913 | 1913 | ]; |
| 1914 | 1914 | if (!empty($cond)) { |
| 1915 | 1915 | if (is_array($cond)) { |
@@ -1944,7 +1944,7 @@ discard block |
||
| 1944 | 1944 | return sql_allfetsel( |
| 1945 | 1945 | 'id_auteur', |
| 1946 | 1946 | 'spip_auteurs_liens', |
| 1947 | - "objet='article' AND id_objet=" . intval($id_article) . ($cond ? " AND $cond" : '') |
|
| 1947 | + "objet='article' AND id_objet=".intval($id_article).($cond ? " AND $cond" : '') |
|
| 1948 | 1948 | ); |
| 1949 | 1949 | } |
| 1950 | 1950 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | ]; |
| 44 | 44 | $options = array_merge($defaut, $options); |
| 45 | 45 | if (is_numeric($options['expires']) and $options['expires'] > 0) { |
| 46 | - $options['expires'] = gmdate('D, d M Y H:i:s', time() + $options['expires']) . ' GMT'; |
|
| 46 | + $options['expires'] = gmdate('D, d M Y H:i:s', time() + $options['expires']).' GMT'; |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | if (is_null($options) and isset($_SERVER['HTTP_RANGE'])) { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | function spip_livrer_fichier_entetes($fichier, $content_type = 'application/octet-stream', $attachment = false, $expires = 0) { |
| 73 | 73 | // toujours envoyer un content type, meme vide ! |
| 74 | 74 | header('Accept-Ranges: bytes'); |
| 75 | - header('Content-Type: ' . $content_type); |
|
| 75 | + header('Content-Type: '.$content_type); |
|
| 76 | 76 | |
| 77 | 77 | if ($attachment) { |
| 78 | 78 | $f = basename($fichier); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | else { |
| 91 | 91 | $f = basename($fichier); |
| 92 | 92 | header("Content-Disposition: inline; filename=\"$f\";"); |
| 93 | - header('Expires: ' . $expires); // set expiration time |
|
| 93 | + header('Expires: '.$expires); // set expiration time |
|
| 94 | 94 | } |
| 95 | 95 | } |
| 96 | 96 | |
@@ -142,12 +142,12 @@ discard block |
||
| 142 | 142 | // Parse Content-Range header for byte offsets, looks like "bytes=11525-" OR "bytes=11525-12451" |
| 143 | 143 | if ($range and preg_match('%bytes=(\d+)-(\d+)?%i', $range, $match)) { |
| 144 | 144 | ### Offset signifies where we should begin to read the file |
| 145 | - $byteOffset = (int)$match[1]; |
|
| 145 | + $byteOffset = (int) $match[1]; |
|
| 146 | 146 | |
| 147 | 147 | |
| 148 | 148 | ### Length is for how long we should read the file according to the browser, and can never go beyond the file size |
| 149 | 149 | if (isset($match[2])) { |
| 150 | - $finishBytes = (int)$match[2]; |
|
| 150 | + $finishBytes = (int) $match[2]; |
|
| 151 | 151 | $byteLength = $finishBytes + 1; |
| 152 | 152 | } else { |
| 153 | 153 | $finishBytes = $fileSize - 1; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | // partial content |
| 170 | 170 | header('HTTP/1.1 206 Partial content'); |
| 171 | - header($cr_header); ### Decrease by 1 on byte-length since this definition is zero-based index of bytes being sent |
|
| 171 | + header($cr_header); ### Decrease by 1 on byte-length since this definition is zero-based index of bytes being sent |
|
| 172 | 172 | |
| 173 | 173 | |
| 174 | 174 | $byteRange = $byteLength - $byteOffset; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | * @return void |
| 44 | 44 | **/ |
| 45 | 45 | function install_fichier_connexion($nom, $texte) { |
| 46 | - $texte = '<' . "?php\n" |
|
| 46 | + $texte = '<'."?php\n" |
|
| 47 | 47 | . "if (!defined(\"_ECRIRE_INC_VERSION\")) return;\n" |
| 48 | 48 | . $texte; |
| 49 | 49 | |
@@ -112,10 +112,10 @@ discard block |
||
| 112 | 112 | return $regs; |
| 113 | 113 | } else { |
| 114 | 114 | $ar = '\s*\'([^\']*)\''; |
| 115 | - $r = '\s*,' . $ar; |
|
| 115 | + $r = '\s*,'.$ar; |
|
| 116 | 116 | $r = "#spip_connect_db[(]$ar$r$r$r$r(?:$r(?:$r(?:$r(?:$r)?)?)?)?#"; |
| 117 | 117 | if (preg_match($r, $s, $regs)) { |
| 118 | - $regs[2] = $regs[1] . (!$regs[2] ? '' : ':' . $regs[2] . ';'); |
|
| 118 | + $regs[2] = $regs[1].(!$regs[2] ? '' : ':'.$regs[2].';'); |
|
| 119 | 119 | array_shift($regs); |
| 120 | 120 | array_shift($regs); |
| 121 | 121 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | // Si on n'a pas la bonne version de PHP, c'est la fin |
| 181 | 181 | if ($err) { |
| 182 | 182 | die("<div class='error'>" |
| 183 | - . '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>" |
|
| 183 | + . '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>" |
|
| 184 | 184 | . "<li><strong>{$err[0]}</strong></li>\n</ul></div>"); |
| 185 | 185 | } |
| 186 | 186 | |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | |
| 202 | 202 | if ($err) { |
| 203 | 203 | echo "<div class='error'>" |
| 204 | - . '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>"; |
|
| 204 | + . '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>"; |
|
| 205 | 205 | foreach ($err as $e) { |
| 206 | 206 | echo "<li><strong>$e</strong></li>\n"; |
| 207 | 207 | } |
@@ -234,8 +234,8 @@ discard block |
||
| 234 | 234 | |
| 235 | 235 | |
| 236 | 236 | function info_etape($titre, $complement = '') { |
| 237 | - return '<h2>' . $titre . "</h2>\n" . |
|
| 238 | - ($complement ? '' . $complement . "\n" : ''); |
|
| 237 | + return '<h2>'.$titre."</h2>\n". |
|
| 238 | + ($complement ? ''.$complement."\n" : ''); |
|
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | /** |
@@ -249,18 +249,18 @@ discard block |
||
| 249 | 249 | $code = _T('bouton_suivant'); |
| 250 | 250 | } |
| 251 | 251 | static $suivant = 0; |
| 252 | - $id = 'suivant' . (($suivant > 0) ? strval($suivant) : ''); |
|
| 252 | + $id = 'suivant'.(($suivant > 0) ? strval($suivant) : ''); |
|
| 253 | 253 | $suivant += 1; |
| 254 | 254 | |
| 255 | - return "\n<p class='boutons suivant'><input id='" . $id . "' type='submit'\nvalue=\"" . |
|
| 256 | - $code . |
|
| 255 | + return "\n<p class='boutons suivant'><input id='".$id."' type='submit'\nvalue=\"". |
|
| 256 | + $code. |
|
| 257 | 257 | " >>\" /></p>\n"; |
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | function info_progression_etape($en_cours, $phase, $dir, $erreur = false) { |
| 261 | 261 | $intitule_etat = []; |
| 262 | 262 | //$en_cours = _request('etape')?_request('etape'):""; |
| 263 | - $liste = find_all_in_path($dir, $phase . '(([0-9])+|fin)[.]php$'); |
|
| 263 | + $liste = find_all_in_path($dir, $phase.'(([0-9])+|fin)[.]php$'); |
|
| 264 | 264 | $debut = 1; |
| 265 | 265 | $etat = 'ok'; |
| 266 | 266 | $last = count($liste); |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | |
| 300 | 300 | $aff_etapes .= "<li class='$class'><div class='fond'>"; |
| 301 | 301 | $aff_etapes .= ($debut == $en_cours) ? '<strong>' : ''; |
| 302 | - $aff_etapes .= '<em>' . _T('etape') . " </em><span class='numero_etape'>$debut</span><em> : </em>"; |
|
| 302 | + $aff_etapes .= '<em>'._T('etape')." </em><span class='numero_etape'>$debut</span><em> : </em>"; |
|
| 303 | 303 | $aff_etapes .= $intitule_etat["$phase"][$debut]; |
| 304 | 304 | $aff_etapes .= ($debut == $en_cours) ? '</strong>' : ''; |
| 305 | 305 | $aff_etapes .= '</div></li>'; |
@@ -314,11 +314,11 @@ discard block |
||
| 314 | 314 | |
| 315 | 315 | |
| 316 | 316 | function fieldset($legend, $champs = [], $apres = '', $avant = '') { |
| 317 | - return "<fieldset>\n" . |
|
| 318 | - $avant . |
|
| 319 | - ($legend ? '<legend>' . $legend . "</legend>\n" : '') . |
|
| 320 | - fieldset_champs($champs) . |
|
| 321 | - $apres . |
|
| 317 | + return "<fieldset>\n". |
|
| 318 | + $avant. |
|
| 319 | + ($legend ? '<legend>'.$legend."</legend>\n" : ''). |
|
| 320 | + fieldset_champs($champs). |
|
| 321 | + $apres. |
|
| 322 | 322 | "</fieldset>\n"; |
| 323 | 323 | } |
| 324 | 324 | |
@@ -328,18 +328,18 @@ discard block |
||
| 328 | 328 | $type = isset($contenu['hidden']) ? 'hidden' : (preg_match(',^pass,', $nom) ? 'password' : 'text'); |
| 329 | 329 | $class = isset($contenu['hidden']) ? '' : "class='formo' size='40' "; |
| 330 | 330 | if (isset($contenu['alternatives'])) { |
| 331 | - $fieldset .= $contenu['label'] . "\n"; |
|
| 331 | + $fieldset .= $contenu['label']."\n"; |
|
| 332 | 332 | foreach ($contenu['alternatives'] as $valeur => $label) { |
| 333 | - $fieldset .= "<input type='radio' name='" . $nom . |
|
| 333 | + $fieldset .= "<input type='radio' name='".$nom. |
|
| 334 | 334 | "' id='$nom-$valeur' value='$valeur'" |
| 335 | 335 | . (($valeur == $contenu['valeur']) ? "\nchecked='checked'" : '') |
| 336 | 336 | . "/>\n"; |
| 337 | - $fieldset .= "<label for='$nom-$valeur'>" . $label . "</label>\n"; |
|
| 337 | + $fieldset .= "<label for='$nom-$valeur'>".$label."</label>\n"; |
|
| 338 | 338 | } |
| 339 | 339 | $fieldset .= "<br />\n"; |
| 340 | 340 | } else { |
| 341 | - $fieldset .= "<label for='" . $nom . "'>" . $contenu['label'] . "</label>\n"; |
|
| 342 | - $fieldset .= '<input ' . $class . "type='" . $type . "' id='" . $nom . "' name='" . $nom . "'\nvalue='" . $contenu['valeur'] . "'" |
|
| 341 | + $fieldset .= "<label for='".$nom."'>".$contenu['label']."</label>\n"; |
|
| 342 | + $fieldset .= '<input '.$class."type='".$type."' id='".$nom."' name='".$nom."'\nvalue='".$contenu['valeur']."'" |
|
| 343 | 343 | . (preg_match(',^(pass|login),', $nom) ? " autocomplete='off'" : '') |
| 344 | 344 | . ((isset($contenu['required']) and $contenu['required']) ? " required='required'" : '') |
| 345 | 345 | . " />\n"; |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | |
| 352 | 352 | function install_select_serveur() { |
| 353 | 353 | $options = []; |
| 354 | - $dir = _DIR_RESTREINT . 'req/'; |
|
| 354 | + $dir = _DIR_RESTREINT.'req/'; |
|
| 355 | 355 | $d = opendir($dir); |
| 356 | 356 | if (!$d) { |
| 357 | 357 | return []; |
@@ -359,17 +359,17 @@ discard block |
||
| 359 | 359 | while (($f = readdir($d)) !== false) { |
| 360 | 360 | if ( |
| 361 | 361 | (preg_match('/^(.*)[.]php$/', $f, $s)) |
| 362 | - and is_readable($f = $dir . $f) |
|
| 362 | + and is_readable($f = $dir.$f) |
|
| 363 | 363 | ) { |
| 364 | 364 | require_once($f); |
| 365 | 365 | $s = $s[1]; |
| 366 | - $v = 'spip_versions_' . $s; |
|
| 366 | + $v = 'spip_versions_'.$s; |
|
| 367 | 367 | if (function_exists($v) and $v()) { |
| 368 | 368 | $titre = _T("install_select_type_$s"); |
| 369 | 369 | // proposer mysql par defaut si dispo |
| 370 | 370 | $checked = ($s == 'mysql' ? " checked='checked'" : ''); |
| 371 | 371 | $options[$s] = "<li><input type='radio' id='$s' value='$s' name='server_db'$checked>" |
| 372 | - . "<label for='$s'>" . ($titre ?: $s) . '</label></li>'; |
|
| 372 | + . "<label for='$s'>".($titre ?: $s).'</label></li>'; |
|
| 373 | 373 | } else { |
| 374 | 374 | spip_log("$s: portage indisponible"); |
| 375 | 375 | } |
@@ -387,8 +387,8 @@ discard block |
||
| 387 | 387 | "\n<input type='hidden' name='etape' value='$etape' />" |
| 388 | 388 | . $hidden |
| 389 | 389 | . (_request('echec') ? |
| 390 | - ('<p><b>' . _T('avis_connexion_echec_1') . |
|
| 391 | - '</b></p><p>' . _T('avis_connexion_echec_2') . "</p><p style='font-size: small;'>" . _T('avis_connexion_echec_3') . '</p>') |
|
| 390 | + ('<p><b>'._T('avis_connexion_echec_1'). |
|
| 391 | + '</b></p><p>'._T('avis_connexion_echec_2')."</p><p style='font-size: small;'>"._T('avis_connexion_echec_3').'</p>') |
|
| 392 | 392 | : '') |
| 393 | 393 | |
| 394 | 394 | . ($jquery ? http_script('', 'jquery.js') : '') |
@@ -426,9 +426,9 @@ discard block |
||
| 426 | 426 | });') |
| 427 | 427 | |
| 428 | 428 | . ($server_db |
| 429 | - ? '<input type="hidden" name="server_db" value="' . $server_db . '" />' |
|
| 429 | + ? '<input type="hidden" name="server_db" value="'.$server_db.'" />' |
|
| 430 | 430 | . (($predef[0]) |
| 431 | - ? ('<h3>' . _T('install_serveur_hebergeur') . '</h3>') |
|
| 431 | + ? ('<h3>'._T('install_serveur_hebergeur').'</h3>') |
|
| 432 | 432 | : '') |
| 433 | 433 | : ('<fieldset><legend>' |
| 434 | 434 | . _T('install_select_type_db') |
@@ -443,9 +443,9 @@ discard block |
||
| 443 | 443 | . "\n</ul>\n</div></fieldset>") |
| 444 | 444 | ) |
| 445 | 445 | . '<div id="install_adresse_base_hebergeur">' |
| 446 | - . '<p>' . _T('texte_connexion_mysql') . '</p>' |
|
| 446 | + . '<p>'._T('texte_connexion_mysql').'</p>' |
|
| 447 | 447 | . ($predef[1] |
| 448 | - ? '<h3>' . _T('install_adresse_base_hebergeur') . '</h3>' |
|
| 448 | + ? '<h3>'._T('install_adresse_base_hebergeur').'</h3>' |
|
| 449 | 449 | : fieldset( |
| 450 | 450 | _T('entree_base_donnee_1'), |
| 451 | 451 | [ |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | |
| 461 | 461 | . '<div id="install_login_base_hebergeur">' |
| 462 | 462 | . ($predef[2] |
| 463 | - ? '<h3>' . _T('install_login_base_hebergeur') . '</h3>' |
|
| 463 | + ? '<h3>'._T('install_login_base_hebergeur').'</h3>' |
|
| 464 | 464 | : fieldset( |
| 465 | 465 | _T('entree_login_connexion_1'), |
| 466 | 466 | [ |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | |
| 476 | 476 | . '<div id="install_pass_base_hebergeur">' |
| 477 | 477 | . ($predef[3] |
| 478 | - ? '<h3>' . _T('install_pass_base_hebergeur') . '</h3>' |
|
| 478 | + ? '<h3>'._T('install_pass_base_hebergeur').'</h3>' |
|
| 479 | 479 | : fieldset( |
| 480 | 480 | _T('entree_mot_passe_1'), |
| 481 | 481 | [ |
@@ -497,20 +497,20 @@ discard block |
||
| 497 | 497 | function predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db) { |
| 498 | 498 | return ((defined('_INSTALL_HOST_DB')) |
| 499 | 499 | ? '' |
| 500 | - : "\n<input type='hidden' name='adresse_db' value=\"" . spip_htmlspecialchars($adresse_db) . '" />' |
|
| 500 | + : "\n<input type='hidden' name='adresse_db' value=\"".spip_htmlspecialchars($adresse_db).'" />' |
|
| 501 | 501 | ) |
| 502 | 502 | . ((defined('_INSTALL_USER_DB')) |
| 503 | 503 | ? '' |
| 504 | - : "\n<input type='hidden' name='login_db' value=\"" . spip_htmlspecialchars($login_db) . '" />' |
|
| 504 | + : "\n<input type='hidden' name='login_db' value=\"".spip_htmlspecialchars($login_db).'" />' |
|
| 505 | 505 | ) |
| 506 | 506 | . ((defined('_INSTALL_PASS_DB')) |
| 507 | 507 | ? '' |
| 508 | - : "\n<input type='hidden' name='pass_db' value=\"" . spip_htmlspecialchars($pass_db) . '" />' |
|
| 508 | + : "\n<input type='hidden' name='pass_db' value=\"".spip_htmlspecialchars($pass_db).'" />' |
|
| 509 | 509 | ) |
| 510 | 510 | |
| 511 | 511 | . ((defined('_INSTALL_SERVER_DB')) |
| 512 | 512 | ? '' |
| 513 | - : "\n<input type='hidden' name='server_db' value=\"" . spip_htmlspecialchars($server_db) . '" />' |
|
| 513 | + : "\n<input type='hidden' name='server_db' value=\"".spip_htmlspecialchars($server_db).'" />' |
|
| 514 | 514 | ); |
| 515 | 515 | } |
| 516 | 516 | |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $id_rubrique, |
| 151 | 151 | [ |
| 152 | 152 | 'data' => $set, |
| 153 | - 'nonvide' => ['titre' => _T('titre_nouvelle_rubrique') . ' ' . _T('info_numero_abbreviation') . $id_rubrique] |
|
| 153 | + 'nonvide' => ['titre' => _T('titre_nouvelle_rubrique').' '._T('info_numero_abbreviation').$id_rubrique] |
|
| 154 | 154 | ], |
| 155 | 155 | $c |
| 156 | 156 | ) |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | ) |
| 255 | 255 | ) { |
| 256 | 256 | if ($s['statut'] != 'prepa') { |
| 257 | - spip_log("deplacement de $id_rubrique vers $id_parent refuse a " . $GLOBALS['visiteur_session']['id_auteur'] . ' ' . $GLOBALS['visiteur_session']['statut']); |
|
| 257 | + spip_log("deplacement de $id_rubrique vers $id_parent refuse a ".$GLOBALS['visiteur_session']['id_auteur'].' '.$GLOBALS['visiteur_session']['statut']); |
|
| 258 | 258 | } |
| 259 | 259 | } elseif (editer_rubrique_breves($id_rubrique, $id_parent, $c)) { |
| 260 | 260 | $statut_ancien = $s['statut']; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | function extraire_date($texte): string { |
| 40 | 40 | // format = 2001-08 |
| 41 | 41 | if (preg_match(',([1-2][0-9]{3})[^0-9]*(1[0-2]|0?[1-9]),', $texte, $regs)) { |
| 42 | - return $regs[1] . '-' . sprintf('%02d', $regs[2]) . '-01'; |
|
| 42 | + return $regs[1].'-'.sprintf('%02d', $regs[2]).'-01'; |
|
| 43 | 43 | } |
| 44 | 44 | return ''; |
| 45 | 45 | } |
@@ -70,11 +70,11 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | if (preg_match('#^([12][0-9]{3})([-/]00)?( [-0-9:]+)?$#', $date, $regs)) { |
| 72 | 72 | $regs = array_pad($regs, 4, null); // eviter notice php |
| 73 | - $date = $regs[1] . '-00-00' . $regs[3]; |
|
| 73 | + $date = $regs[1].'-00-00'.$regs[3]; |
|
| 74 | 74 | } else { |
| 75 | 75 | if (preg_match('#^([12][0-9]{3}[-/][01]?[0-9])([-/]00)?( [-0-9:]+)?$#', $date, $regs)) { |
| 76 | 76 | $regs = array_pad($regs, 4, null); // eviter notice php |
| 77 | - $date = preg_replace('@/@', '-', $regs[1]) . '-00' . $regs[3]; |
|
| 77 | + $date = preg_replace('@/@', '-', $regs[1]).'-00'.$regs[3]; |
|
| 78 | 78 | } else { |
| 79 | 79 | $date = date('Y-m-d H:i:s', strtotime($date)); |
| 80 | 80 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | $letexte ??= ''; |
| 102 | 102 | if ( |
| 103 | 103 | !$verif_format_date |
| 104 | - or (in_array(strlen($letexte), [10,19]) and |
|
| 104 | + or (in_array(strlen($letexte), [10, 19]) and |
|
| 105 | 105 | preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}(\s[0-9]{2}:[0-9]{2}:[0-9]{2})?$/', $letexte)) |
| 106 | 106 | ) { |
| 107 | 107 | if (strncmp('0000-00-00', $letexte, 10) == 0) { |
@@ -388,17 +388,17 @@ discard block |
||
| 388 | 388 | if ($decal > 3600 * 24 * 30) { |
| 389 | 389 | $mois = floor($decal / (3600 * 24 * 30)); |
| 390 | 390 | if ($mois < 2) { |
| 391 | - $delai = "$mois " . _T('date_un_mois'); |
|
| 391 | + $delai = "$mois "._T('date_un_mois'); |
|
| 392 | 392 | } else { |
| 393 | - $delai = "$mois " . _T('date_mois'); |
|
| 393 | + $delai = "$mois "._T('date_mois'); |
|
| 394 | 394 | } |
| 395 | 395 | } else { |
| 396 | 396 | if ($decal > 3600 * 24 * 7) { |
| 397 | 397 | $semaines = floor($decal / (3600 * 24 * 7)); |
| 398 | 398 | if ($semaines < 2) { |
| 399 | - $delai = "$semaines " . _T('date_une_semaine'); |
|
| 399 | + $delai = "$semaines "._T('date_une_semaine'); |
|
| 400 | 400 | } else { |
| 401 | - $delai = "$semaines " . _T('date_semaines'); |
|
| 401 | + $delai = "$semaines "._T('date_semaines'); |
|
| 402 | 402 | } |
| 403 | 403 | } else { |
| 404 | 404 | if ($decal > 3600 * 24) { |
@@ -406,30 +406,30 @@ discard block |
||
| 406 | 406 | if ($jours < 2) { |
| 407 | 407 | return $il_y_a == 'date_dans' ? _T('date_demain') : _T('date_hier'); |
| 408 | 408 | } else { |
| 409 | - $delai = "$jours " . _T('date_jours'); |
|
| 409 | + $delai = "$jours "._T('date_jours'); |
|
| 410 | 410 | } |
| 411 | 411 | } else { |
| 412 | 412 | if ($decal >= 3600) { |
| 413 | 413 | $heures = floor($decal / 3600); |
| 414 | 414 | if ($heures < 2) { |
| 415 | - $delai = "$heures " . _T('date_une_heure'); |
|
| 415 | + $delai = "$heures "._T('date_une_heure'); |
|
| 416 | 416 | } else { |
| 417 | - $delai = "$heures " . _T('date_heures'); |
|
| 417 | + $delai = "$heures "._T('date_heures'); |
|
| 418 | 418 | } |
| 419 | 419 | } else { |
| 420 | 420 | if ($decal >= 60) { |
| 421 | 421 | $minutes = floor($decal / 60); |
| 422 | 422 | if ($minutes < 2) { |
| 423 | - $delai = "$minutes " . _T('date_une_minute'); |
|
| 423 | + $delai = "$minutes "._T('date_une_minute'); |
|
| 424 | 424 | } else { |
| 425 | - $delai = "$minutes " . _T('date_minutes'); |
|
| 425 | + $delai = "$minutes "._T('date_minutes'); |
|
| 426 | 426 | } |
| 427 | 427 | } else { |
| 428 | 428 | $secondes = ceil($decal); |
| 429 | 429 | if ($secondes < 2) { |
| 430 | - $delai = "$secondes " . _T('date_une_seconde'); |
|
| 430 | + $delai = "$secondes "._T('date_une_seconde'); |
|
| 431 | 431 | } else { |
| 432 | - $delai = "$secondes " . _T('date_secondes'); |
|
| 432 | + $delai = "$secondes "._T('date_secondes'); |
|
| 433 | 433 | } |
| 434 | 434 | } |
| 435 | 435 | } |
@@ -522,7 +522,7 @@ discard block |
||
| 522 | 522 | $njour = 0; |
| 523 | 523 | } else { |
| 524 | 524 | $njour = intval($jour); |
| 525 | - if ($jourth = _T('date_jnum' . $jour)) { |
|
| 525 | + if ($jourth = _T('date_jnum'.$jour)) { |
|
| 526 | 526 | $jour = $jourth; |
| 527 | 527 | } |
| 528 | 528 | } |
@@ -530,10 +530,10 @@ discard block |
||
| 530 | 530 | $mois = intval($mois); |
| 531 | 531 | if ($mois > 0 and $mois < 13) { |
| 532 | 532 | /* Traiter le cas "abbr" pour les noms de mois */ |
| 533 | - $param = ((isset($options['param']) and $options['param'] === 'abbr') ? '_' . $options['param'] : ''); |
|
| 534 | - $nommois = _T('date_mois_' . $mois . $param); |
|
| 533 | + $param = ((isset($options['param']) and $options['param'] === 'abbr') ? '_'.$options['param'] : ''); |
|
| 534 | + $nommois = _T('date_mois_'.$mois.$param); |
|
| 535 | 535 | if ($jour) { |
| 536 | - $jourmois = _T('date_de_mois_' . $mois, ['j' => $jour, 'nommois' => $nommois]); |
|
| 536 | + $jourmois = _T('date_de_mois_'.$mois, ['j' => $jour, 'nommois' => $nommois]); |
|
| 537 | 537 | } else { |
| 538 | 538 | $jourmois = $nommois; |
| 539 | 539 | } |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | } |
| 544 | 544 | |
| 545 | 545 | if ($annee < 0) { |
| 546 | - $annee = -$annee . ' ' . _T('date_avant_jc'); |
|
| 546 | + $annee = -$annee.' '._T('date_avant_jc'); |
|
| 547 | 547 | $avjc = true; |
| 548 | 548 | } else { |
| 549 | 549 | $avjc = false; |
@@ -569,11 +569,11 @@ discard block |
||
| 569 | 569 | } |
| 570 | 570 | } |
| 571 | 571 | if ($vue == 'saison') { |
| 572 | - return $saison ? _T('date_saison_' . $saison) : ''; |
|
| 572 | + return $saison ? _T('date_saison_'.$saison) : ''; |
|
| 573 | 573 | } else { |
| 574 | 574 | return $saison ? trim(_T( |
| 575 | 575 | 'date_fmt_saison_annee', |
| 576 | - ['saison' => _T('date_saison_' . $saison), 'annee' => $annee] |
|
| 576 | + ['saison' => _T('date_saison_'.$saison), 'annee' => $annee] |
|
| 577 | 577 | )) : ''; |
| 578 | 578 | } |
| 579 | 579 | |
@@ -650,9 +650,9 @@ discard block |
||
| 650 | 650 | } |
| 651 | 651 | $nom = mktime(1, 1, 1, $mois, $njour, $annee); |
| 652 | 652 | $nom = 1 + (int) date('w', $nom); |
| 653 | - $param = ((isset($options['param']) and $options['param']) ? '_' . $options['param'] : ''); |
|
| 653 | + $param = ((isset($options['param']) and $options['param']) ? '_'.$options['param'] : ''); |
|
| 654 | 654 | |
| 655 | - return _T('date_jour_' . $nom . $param); |
|
| 655 | + return _T('date_jour_'.$nom.$param); |
|
| 656 | 656 | |
| 657 | 657 | case 'mois_annee': |
| 658 | 658 | if ($avjc) { |
@@ -1047,8 +1047,8 @@ discard block |
||
| 1047 | 1047 | |
| 1048 | 1048 | $dtstart = $dtend = $dtabbr = ''; |
| 1049 | 1049 | if (strpos($forme, 'hcal') !== false) { |
| 1050 | - $dtstart = "<abbr class='dtstart' title='" . date_iso($date_debut) . "'>"; |
|
| 1051 | - $dtend = "<abbr class='dtend' title='" . date_iso($date_fin) . "'>"; |
|
| 1050 | + $dtstart = "<abbr class='dtstart' title='".date_iso($date_debut)."'>"; |
|
| 1051 | + $dtend = "<abbr class='dtend' title='".date_iso($date_fin)."'>"; |
|
| 1052 | 1052 | $dtabbr = '</abbr>'; |
| 1053 | 1053 | } |
| 1054 | 1054 | |
@@ -1096,7 +1096,7 @@ discard block |
||
| 1096 | 1096 | } |
| 1097 | 1097 | } else { |
| 1098 | 1098 | if ($dtabbr && $dtstart) { |
| 1099 | - $s = $dtstart . spip_ucfirst($s) . $dtabbr; |
|
| 1099 | + $s = $dtstart.spip_ucfirst($s).$dtabbr; |
|
| 1100 | 1100 | } else { |
| 1101 | 1101 | $s = spip_ucfirst($s); |
| 1102 | 1102 | } |
@@ -1119,8 +1119,8 @@ discard block |
||
| 1119 | 1119 | $date_debut = _T('date_fmt_jour_heure', ['jour' => $date_debut, 'heure' => $hd]); |
| 1120 | 1120 | $date_fin = _T('date_fmt_jour_heure', ['jour' => $date_fin, 'heure' => $hf]); |
| 1121 | 1121 | } |
| 1122 | - $date_debut = $dtstart . $date_debut . $dtabbr; |
|
| 1123 | - $date_fin = $dtend . $date_fin . $dtabbr; |
|
| 1122 | + $date_debut = $dtstart.$date_debut.$dtabbr; |
|
| 1123 | + $date_fin = $dtend.$date_fin.$dtabbr; |
|
| 1124 | 1124 | |
| 1125 | 1125 | $s = _T('date_fmt_periode', ['date_debut' => $date_debut, 'date_fin' => $date_fin]); |
| 1126 | 1126 | } else { |
@@ -1137,8 +1137,8 @@ discard block |
||
| 1137 | 1137 | $date_fin = _T('date_fmt_jour_heure', ['jour' => $date_fin, 'heure' => $hf]); |
| 1138 | 1138 | } |
| 1139 | 1139 | |
| 1140 | - $date_debut = $dtstart . $date_debut . $dtabbr; |
|
| 1141 | - $date_fin = $dtend . $date_fin . $dtabbr; |
|
| 1140 | + $date_debut = $dtstart.$date_debut.$dtabbr; |
|
| 1141 | + $date_fin = $dtend.$date_fin.$dtabbr; |
|
| 1142 | 1142 | $s = _T('date_fmt_periode', ['date_debut' => $date_debut, 'date_fin' => $date_fin]); |
| 1143 | 1143 | } |
| 1144 | 1144 | } |
@@ -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) . substr($d, 8, 2); |
|
| 1245 | + return substr($d, 0, 4).substr($d, 5, 2).substr($d, 8, 2); |
|
| 1246 | 1246 | } |
| 1247 | 1247 | |
| 1248 | 1248 | /** |
@@ -1262,7 +1262,7 @@ discard block |
||
| 1262 | 1262 | $d = date('Y-m-d'); |
| 1263 | 1263 | } |
| 1264 | 1264 | |
| 1265 | - return substr($d, 0, 4) . substr($d, 5, 2); |
|
| 1265 | + return substr($d, 0, 4).substr($d, 5, 2); |
|
| 1266 | 1266 | } |
| 1267 | 1267 | |
| 1268 | 1268 | /** |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * Mot de passe |
| 32 | 32 | **/ |
| 33 | 33 | function creer_pass_aleatoire($longueur = 16, $sel = '') { |
| 34 | - $seed = (int)round(((float)microtime() + 1) * time()); |
|
| 34 | + $seed = (int) round(((float) microtime() + 1) * time()); |
|
| 35 | 35 | |
| 36 | 36 | mt_srand($seed); |
| 37 | 37 | $s = ''; |
@@ -42,9 +42,9 @@ discard block |
||
| 42 | 42 | if (!$s) { |
| 43 | 43 | $s = random_int(0, mt_getrandmax()); |
| 44 | 44 | } |
| 45 | - $s = substr(md5(uniqid($s) . $sel), 0, 16); |
|
| 45 | + $s = substr(md5(uniqid($s).$sel), 0, 16); |
|
| 46 | 46 | } |
| 47 | - $r = unpack('Cr', pack('H2', $s . $s)); |
|
| 47 | + $r = unpack('Cr', pack('H2', $s.$s)); |
|
| 48 | 48 | $x = $r['r'] & 63; |
| 49 | 49 | if ($x < 10) { |
| 50 | 50 | $x = chr($x + 48); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | static $seeded; |
| 83 | 83 | |
| 84 | 84 | if (!$seeded) { |
| 85 | - $seed = (int)round(((float)microtime() + 1) * time()); |
|
| 85 | + $seed = (int) round(((float) microtime() + 1) * time()); |
|
| 86 | 86 | mt_srand($seed); |
| 87 | 87 | $seeded = true; |
| 88 | 88 | } |
@@ -168,10 +168,10 @@ discard block |
||
| 168 | 168 | ecrire_meta('low_sec', $low_sec = creer_pass_aleatoire()); |
| 169 | 169 | } |
| 170 | 170 | } else { |
| 171 | - $low_sec = sql_getfetsel('low_sec', 'spip_auteurs', 'id_auteur = ' . intval($id_auteur)); |
|
| 171 | + $low_sec = sql_getfetsel('low_sec', 'spip_auteurs', 'id_auteur = '.intval($id_auteur)); |
|
| 172 | 172 | if (!$low_sec) { |
| 173 | 173 | $low_sec = creer_pass_aleatoire(); |
| 174 | - sql_updateq('spip_auteurs', ['low_sec' => $low_sec], 'id_auteur = ' . intval($id_auteur)); |
|
| 174 | + sql_updateq('spip_auteurs', ['low_sec' => $low_sec], 'id_auteur = '.intval($id_auteur)); |
|
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | function generer_url_api_low_sec(string $script, string $format, string $fond, string $path, string $args, bool $no_entities = false, ?bool $public = null) { |
| 230 | 230 | $id_auteur = $GLOBALS['visiteur_session']['id_auteur'] ?? 0; |
| 231 | 231 | $cle = afficher_low_sec($id_auteur, "$script/$format $fond $args"); |
| 232 | - $path = "$id_auteur/$cle/$format/$fond" . ($path ? "/$path" : ''); |
|
| 232 | + $path = "$id_auteur/$cle/$format/$fond".($path ? "/$path" : ''); |
|
| 233 | 233 | |
| 234 | 234 | return generer_url_api($script, $path, $args, $no_entities = false, $public); |
| 235 | 235 | } |
@@ -253,9 +253,9 @@ discard block |
||
| 253 | 253 | foreach ($args as $val => $var) { |
| 254 | 254 | if ($var) { |
| 255 | 255 | if ($val <> 'statut') { |
| 256 | - $a .= ':' . $val . '-' . $var; |
|
| 256 | + $a .= ':'.$val.'-'.$var; |
|
| 257 | 257 | } |
| 258 | - $b .= $val . '=' . $var . '&'; |
|
| 258 | + $b .= $val.'='.$var.'&'; |
|
| 259 | 259 | } |
| 260 | 260 | } |
| 261 | 261 | $a = substr($a, 1); |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | * Clé |
| 286 | 286 | **/ |
| 287 | 287 | function afficher_low_sec($id_auteur, $action = '') { |
| 288 | - return substr(md5($action . low_sec($id_auteur)), 0, 8); |
|
| 288 | + return substr(md5($action.low_sec($id_auteur)), 0, 8); |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | /** |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | if (!$id_auteur = intval($id_auteur)) { |
| 317 | 317 | return; |
| 318 | 318 | } // jamais trop prudent ;) |
| 319 | - sql_updateq('spip_auteurs', ['low_sec' => ''], 'id_auteur = ' . intval($id_auteur)); |
|
| 319 | + sql_updateq('spip_auteurs', ['low_sec' => ''], 'id_auteur = '.intval($id_auteur)); |
|
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | |
@@ -334,8 +334,8 @@ discard block |
||
| 334 | 334 | * - void sinon. |
| 335 | 335 | **/ |
| 336 | 336 | function ecrire_acces() { |
| 337 | - $htaccess = _DIR_RESTREINT . _ACCESS_FILE_NAME; |
|
| 338 | - $htpasswd = _DIR_TMP . _AUTH_USER_FILE; |
|
| 337 | + $htaccess = _DIR_RESTREINT._ACCESS_FILE_NAME; |
|
| 338 | + $htpasswd = _DIR_TMP._AUTH_USER_FILE; |
|
| 339 | 339 | |
| 340 | 340 | // Cette variable de configuration peut etre posee par un plugin |
| 341 | 341 | // par exemple acces_restreint ; |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | and !@file_exists($htaccess) |
| 347 | 347 | ) { |
| 348 | 348 | spip_unlink($htpasswd); |
| 349 | - spip_unlink($htpasswd . '-admin'); |
|
| 349 | + spip_unlink($htpasswd.'-admin'); |
|
| 350 | 350 | return; |
| 351 | 351 | } |
| 352 | 352 | |
@@ -374,10 +374,10 @@ discard block |
||
| 374 | 374 | $pwd_all = ''; // login:htpass pour tous |
| 375 | 375 | $pwd_admin = ''; // login:htpass pour les admins |
| 376 | 376 | |
| 377 | - $res = sql_select('login, htpass, statut', 'spip_auteurs', "htpass!='' AND login!='' AND " . sql_in('statut', ['1comite', '0minirezo', 'nouveau'])); |
|
| 377 | + $res = sql_select('login, htpass, statut', 'spip_auteurs', "htpass!='' AND login!='' AND ".sql_in('statut', ['1comite', '0minirezo', 'nouveau'])); |
|
| 378 | 378 | while ($row = sql_fetch($res)) { |
| 379 | 379 | if (strlen($row['login']) and strlen($row['htpass'])) { |
| 380 | - $ligne = $row['login'] . ':' . $row['htpass'] . "\n"; |
|
| 380 | + $ligne = $row['login'].':'.$row['htpass']."\n"; |
|
| 381 | 381 | $pwd_all .= $ligne; |
| 382 | 382 | if ($row['statut'] == '0minirezo') { |
| 383 | 383 | $pwd_admin .= $ligne; |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | * @return boolean |
| 421 | 421 | */ |
| 422 | 422 | function verifier_htaccess($rep, $force = false) { |
| 423 | - $htaccess = rtrim($rep, '/') . '/' . _ACCESS_FILE_NAME; |
|
| 423 | + $htaccess = rtrim($rep, '/').'/'._ACCESS_FILE_NAME; |
|
| 424 | 424 | if (((@file_exists($htaccess)) or defined('_TEST_DIRS')) and !$force) { |
| 425 | 425 | return true; |
| 426 | 426 | } |
@@ -449,17 +449,17 @@ discard block |
||
| 449 | 449 | fputs($ht, $deny); |
| 450 | 450 | fclose($ht); |
| 451 | 451 | @chmod($htaccess, _SPIP_CHMOD & 0666); |
| 452 | - $t = rtrim($rep, '/') . '/.ok'; |
|
| 452 | + $t = rtrim($rep, '/').'/.ok'; |
|
| 453 | 453 | if ($ht = @fopen($t, 'w')) { |
| 454 | 454 | @fclose($ht); |
| 455 | 455 | include_spip('inc/distant'); |
| 456 | 456 | $t = substr($t, strlen(_DIR_RACINE)); |
| 457 | - $t = url_de_base() . $t; |
|
| 457 | + $t = url_de_base().$t; |
|
| 458 | 458 | $ht = recuperer_url($t, ['methode' => 'HEAD', 'taille_max' => 0, 'follow_location' => false]); |
| 459 | 459 | $ht = ($ht['status'] ?? null) === 403; |
| 460 | 460 | } |
| 461 | 461 | } |
| 462 | - spip_log("Creation de $htaccess " . ($ht ? ' reussie' : ' manquee')); |
|
| 462 | + spip_log("Creation de $htaccess ".($ht ? ' reussie' : ' manquee')); |
|
| 463 | 463 | |
| 464 | 464 | return $ht; |
| 465 | 465 | } |
@@ -485,11 +485,11 @@ discard block |
||
| 485 | 485 | $dirs = sql_allfetsel('extension', 'spip_types_documents'); |
| 486 | 486 | $dirs[] = ['extension' => 'distant']; |
| 487 | 487 | foreach ($dirs as $e) { |
| 488 | - if (is_dir($dir = _DIR_IMG . $e['extension'])) { |
|
| 488 | + if (is_dir($dir = _DIR_IMG.$e['extension'])) { |
|
| 489 | 489 | if ($f) { |
| 490 | 490 | verifier_htaccess($dir); |
| 491 | 491 | } else { |
| 492 | - spip_unlink($dir . '/' . _ACCESS_FILE_NAME); |
|
| 492 | + spip_unlink($dir.'/'._ACCESS_FILE_NAME); |
|
| 493 | 493 | } |
| 494 | 494 | } |
| 495 | 495 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | and ( |
| 104 | 104 | $newcompt > $debut or ($newcompt == $debut and $newcompt == $memo['compteur']) |
| 105 | 105 | )); |
| 106 | - $res[] = "<li class='pagination-item'>" . lien_ou_expose($memo['url'], $memo['initiale'], $on ? 'span.pagination-item-label' : '', 'pagination-item-label lien_pagination') . '</li>'; |
|
| 106 | + $res[] = "<li class='pagination-item'>".lien_ou_expose($memo['url'], $memo['initiale'], $on ? 'span.pagination-item-label' : '', 'pagination-item-label lien_pagination').'</li>'; |
|
| 107 | 107 | } |
| 108 | 108 | if ($initiale) { |
| 109 | 109 | $memo = [ |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | } |
| 117 | 117 | if (!$initiale and !$url) { |
| 118 | 118 | if ((is_countable($res) ? count($res) : 0) > 1) { |
| 119 | - $out = "<ul class='pagination-items'>" . implode(' ', $res) . '</ul>'; |
|
| 119 | + $out = "<ul class='pagination-items'>".implode(' ', $res).'</ul>'; |
|
| 120 | 120 | } |
| 121 | 121 | $memo = null; |
| 122 | 122 | $res = []; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | ) { |
| 158 | 158 | return parametre_url(parametre_url(generer_url_ecrire('message_edit', 'new=oui'), 'to', $id_auteur), 'redirect', self()); |
| 159 | 159 | } elseif (strlen($email) and autoriser('voir', 'auteur', $id_auteur)) { |
| 160 | - return 'mailto:' . $email; |
|
| 160 | + return 'mailto:'.$email; |
|
| 161 | 161 | } else { |
| 162 | 162 | return ''; |
| 163 | 163 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | // message d'erreur au retour d'une operation |
| 122 | 122 | if ($erreur) { |
| 123 | - echo "<div class='error'>" . spip_htmlspecialchars($erreur) . '</div>'; |
|
| 123 | + echo "<div class='error'>".spip_htmlspecialchars($erreur).'</div>'; |
|
| 124 | 124 | } |
| 125 | 125 | if ($erreur_activation) { |
| 126 | 126 | echo "<div class='error'>$erreur_activation</div>"; |
@@ -147,11 +147,11 @@ discard block |
||
| 147 | 147 | if ($quoi !== 'actifs') { |
| 148 | 148 | $lpf = liste_plugin_files(); |
| 149 | 149 | if ($lpf) { |
| 150 | - echo '<p>' . _T('texte_presente_plugin') . '</p>'; |
|
| 150 | + echo '<p>'._T('texte_presente_plugin').'</p>'; |
|
| 151 | 151 | } else { |
| 152 | 152 | if (!@is_dir(_DIR_PLUGINS)) { |
| 153 | - echo '<p>' . _T('plugin_info_automatique_ftp', ['rep' => joli_repertoire(_DIR_PLUGINS)]) |
|
| 154 | - . ' — ' . _T('plugin_info_automatique_creer') . '</p>'; |
|
| 153 | + echo '<p>'._T('plugin_info_automatique_ftp', ['rep' => joli_repertoire(_DIR_PLUGINS)]) |
|
| 154 | + . ' — '._T('plugin_info_automatique_creer').'</p>'; |
|
| 155 | 155 | } |
| 156 | 156 | } |
| 157 | 157 | $lcpaffiche = $lpf; |
@@ -172,10 +172,10 @@ discard block |
||
| 172 | 172 | if (defined('_DIR_PLUGINS_SUPPL')) { |
| 173 | 173 | $nb += is_countable($lcpas) ? count($lcpas) : 0; |
| 174 | 174 | } |
| 175 | - echo '<h3>' . sinon( |
|
| 175 | + echo '<h3>'.sinon( |
|
| 176 | 176 | singulier_ou_pluriel($nb, 'plugins_actif_un', 'plugins_actifs', 'count'), |
| 177 | 177 | _T('plugins_actif_aucun') |
| 178 | - ) . '</h3>'; |
|
| 178 | + ).'</h3>'; |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | if (empty($format)) { |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | if ($corps) { |
| 194 | 194 | $corps .= "\n<div class='boutons' style='display:none;'>" |
| 195 | - . "<input type='submit' class='submit save' value='" . _T('bouton_enregistrer') |
|
| 195 | + . "<input type='submit' class='submit save' value='"._T('bouton_enregistrer') |
|
| 196 | 196 | . "' />" |
| 197 | 197 | . '</div>'; |
| 198 | 198 | } |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | . debut_cadre_trait_couleur('', true, '', _T('plugins_liste_dist'), 'liste_plugins_dist') |
| 267 | 267 | . '<p>' |
| 268 | 268 | . _T('plugin_info_plugins_dist_1', ['plugins_dist' => joli_repertoire(_DIR_PLUGINS_DIST)]) |
| 269 | - . '<br />' . _T('plugin_info_plugins_dist_2') |
|
| 269 | + . '<br />'._T('plugin_info_plugins_dist_2') |
|
| 270 | 270 | . '</p>' |
| 271 | 271 | . $liste |
| 272 | 272 | . fin_cadre_trait_couleur() |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | $res = debut_cadre_enfonce('', true, '', _T('plugin_librairies_installees')); |
| 290 | 290 | $res .= '<dl>'; |
| 291 | 291 | foreach ($libs as $lib => $rep) { |
| 292 | - $res .= "<dt>$lib</dt><dd>" . joli_repertoire($rep) . "</dd>\n"; |
|
| 292 | + $res .= "<dt>$lib</dt><dd>".joli_repertoire($rep)."</dd>\n"; |
|
| 293 | 293 | } |
| 294 | 294 | $res .= '</dl>'; |
| 295 | 295 | $res .= fin_cadre_enfonce(); |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | $libs = []; |
| 309 | 309 | foreach (array_reverse(creer_chemin()) as $d) { |
| 310 | 310 | if ( |
| 311 | - is_dir($dir = $d . 'lib/') |
|
| 311 | + is_dir($dir = $d.'lib/') |
|
| 312 | 312 | and $t = opendir($dir) |
| 313 | 313 | ) { |
| 314 | 314 | while (($f = readdir($t)) !== false) { |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | if ($logo) { |
| 41 | 41 | # TODO : deprecated, a supprimer -> anciens logos IMG/artonxx.png pas en base |
| 42 | 42 | if ((is_countable($logo) ? count($logo) : 0) < 6) { |
| 43 | - spip_log('Supprimer ancien logo ' . json_encode($logo, JSON_THROW_ON_ERROR), 'logo'); |
|
| 43 | + spip_log('Supprimer ancien logo '.json_encode($logo, JSON_THROW_ON_ERROR), 'logo'); |
|
| 44 | 44 | spip_unlink($logo[0]); |
| 45 | 45 | } |
| 46 | 46 | elseif ( |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | return $erreur; |
| 90 | 90 | } |
| 91 | 91 | // chercher dans la base |
| 92 | - $mode_document = 'logo' . $mode; |
|
| 92 | + $mode_document = 'logo'.$mode; |
|
| 93 | 93 | |
| 94 | 94 | include_spip('inc/documents'); |
| 95 | 95 | $erreur = ''; |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $tmp_name = false; |
| 107 | 107 | if (file_exists($source)) { |
| 108 | 108 | $tmp_name = $source; |
| 109 | - } elseif (file_exists($f = determine_upload() . $source)) { |
|
| 109 | + } elseif (file_exists($f = determine_upload().$source)) { |
|
| 110 | 110 | $tmp_name = $f; |
| 111 | 111 | } |
| 112 | 112 | if (!$tmp_name) { |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | if (!is_numeric($id_document)) { |
| 144 | 144 | $erreur = ($id_document ?: 'Erreur inconnue'); |
| 145 | - spip_log("Erreur ajout logo : $erreur pour source=" . json_encode($source, JSON_THROW_ON_ERROR), 'logo'); |
|
| 145 | + spip_log("Erreur ajout logo : $erreur pour source=".json_encode($source, JSON_THROW_ON_ERROR), 'logo'); |
|
| 146 | 146 | return $erreur; |
| 147 | 147 | } |
| 148 | 148 | |
@@ -175,23 +175,23 @@ discard block |
||
| 175 | 175 | $GLOBALS['meta']['articles_modif'] = 'non'; |
| 176 | 176 | |
| 177 | 177 | foreach (['on', 'off'] as $mode) { |
| 178 | - $nom_base = $type . $mode; |
|
| 178 | + $nom_base = $type.$mode; |
|
| 179 | 179 | $dir = (defined('_DIR_LOGOS') ? _DIR_LOGOS : _DIR_IMG); |
| 180 | 180 | |
| 181 | - $files = glob($dir . $nom_base . '*'); |
|
| 181 | + $files = glob($dir.$nom_base.'*'); |
|
| 182 | 182 | // est-ce que c'est une nouvelle tentative de migration ? |
| 183 | 183 | // dans ce cas les logos sont deja dans IMG/logo/ |
| 184 | 184 | if (!(is_countable($files) ? count($files) : 0)) { |
| 185 | - $files = glob($dir_logos . $nom_base . '*'); |
|
| 185 | + $files = glob($dir_logos.$nom_base.'*'); |
|
| 186 | 186 | if (is_countable($files) ? count($files) : 0) { |
| 187 | 187 | // mais il faut verifier si ils ont pas deja ete migres pour tout ou partie |
| 188 | 188 | $filescheck = []; |
| 189 | 189 | foreach ($files as $file) { |
| 190 | - $short = basename(dirname($file)) . DIRECTORY_SEPARATOR . basename($file); |
|
| 190 | + $short = basename(dirname($file)).DIRECTORY_SEPARATOR.basename($file); |
|
| 191 | 191 | $filescheck[$short] = $file; |
| 192 | 192 | } |
| 193 | 193 | // trouver ceux deja migres |
| 194 | - $deja = sql_allfetsel('fichier', 'spip_documents', sql_in('fichier', array_keys($filescheck)) . " AND mode LIKE 'logo%'"); |
|
| 194 | + $deja = sql_allfetsel('fichier', 'spip_documents', sql_in('fichier', array_keys($filescheck))." AND mode LIKE 'logo%'"); |
|
| 195 | 195 | if (is_countable($deja) ? count($deja) : 0) { |
| 196 | 196 | $deja = array_column($deja, 'fichier'); |
| 197 | 197 | $restant = array_diff(array_keys($filescheck), $deja); |
@@ -211,11 +211,11 @@ discard block |
||
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | $count = (is_countable($files) ? count($files) : 0); |
| 214 | - spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE); |
|
| 214 | + spip_log("logo_migrer_en_base $objet $mode : ".$count.' logos restant', 'maj'._LOG_INFO_IMPORTANTE); |
|
| 215 | 215 | |
| 216 | 216 | $deja = []; |
| 217 | 217 | foreach ($files as $file) { |
| 218 | - $logo = substr($file, strlen($dir . $nom_base)); |
|
| 218 | + $logo = substr($file, strlen($dir.$nom_base)); |
|
| 219 | 219 | $logo = explode('.', $logo); |
| 220 | 220 | if ( |
| 221 | 221 | is_numeric($logo[0]) |
@@ -226,16 +226,16 @@ discard block |
||
| 226 | 226 | // if no logo in base |
| 227 | 227 | if (!$logo or (is_countable($logo) ? count($logo) : 0) < 6) { |
| 228 | 228 | foreach ($formats_logos as $format) { |
| 229 | - if (@file_exists($d = ($dir . ($nom = $nom_base . intval($id_objet) . '.' . $format)))) { |
|
| 229 | + if (@file_exists($d = ($dir.($nom = $nom_base.intval($id_objet).'.'.$format)))) { |
|
| 230 | 230 | if (isset($desc['field']['date_modif'])) { |
| 231 | 231 | $date_modif = sql_getfetsel('date_modif', $table, "$_id_objet=$id_objet"); |
| 232 | 232 | } else { |
| 233 | 233 | $date_modif = null; |
| 234 | 234 | } |
| 235 | 235 | // logo_modifier commence par supprimer le logo existant, donc on le deplace pour pas le perdre |
| 236 | - @rename($d, $dir_logos . $nom); |
|
| 236 | + @rename($d, $dir_logos.$nom); |
|
| 237 | 237 | // et on le declare comme nouveau logo |
| 238 | - logo_modifier($objet, $id_objet, $mode, $dir_logos . $nom); |
|
| 238 | + logo_modifier($objet, $id_objet, $mode, $dir_logos.$nom); |
|
| 239 | 239 | if ($date_modif) { |
| 240 | 240 | sql_updateq($table, ['date_modif' => $date_modif], "$_id_objet=$id_objet"); |
| 241 | 241 | } |
@@ -249,12 +249,12 @@ discard block |
||
| 249 | 249 | // si le fichier est encore la on le move : rien a faire ici |
| 250 | 250 | // (sauf si c'est une re-migration : il est deja dans logo/ donc il bouge pas) |
| 251 | 251 | if ($dir !== $dir_logos and file_exists($file)) { |
| 252 | - @rename($file, $dir_logos_erreurs . basename($file)); |
|
| 252 | + @rename($file, $dir_logos_erreurs.basename($file)); |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | 255 | $count--; |
| 256 | 256 | if ($count % 250 === 0) { |
| 257 | - spip_log("logo_migrer_en_base $objet $mode : " . $count . ' logos restant', 'maj' . _LOG_INFO_IMPORTANTE); |
|
| 257 | + spip_log("logo_migrer_en_base $objet $mode : ".$count.' logos restant', 'maj'._LOG_INFO_IMPORTANTE); |
|
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | if ($time_limit and time() > $time_limit) { |