@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $GLOBALS['connexions'][$server_db] = $link; |
| 49 | 49 | |
| 50 | 50 | $GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']] |
| 51 | - = $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']]; |
|
| 51 | + = $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']]; |
|
| 52 | 52 | |
| 53 | 53 | $minipage = new Spip\Afficher\Minipage\Installation(); |
| 54 | 54 | echo $minipage->installDebutPage(); |
@@ -68,18 +68,18 @@ discard block |
||
| 68 | 68 | //echo "\n-->\n"; |
| 69 | 69 | |
| 70 | 70 | if (($db_connect == '0') && $link) { |
| 71 | - echo "<div class='success'><b>" . _T('info_connexion_ok') . '</b></div>'; |
|
| 71 | + echo "<div class='success'><b>"._T('info_connexion_ok').'</b></div>'; |
|
| 72 | 72 | echo info_progression_etape(2, 'etape_', 'install/'); |
| 73 | 73 | |
| 74 | - echo info_etape(_T('menu_aide_installation_choix_base') . aider('install2', true)); |
|
| 74 | + echo info_etape(_T('menu_aide_installation_choix_base').aider('install2', true)); |
|
| 75 | 75 | |
| 76 | 76 | echo "\n", '<!-- ', sql_version($server_db), ' -->'; |
| 77 | 77 | [$checked, $res] = install_etape_2_bases($login_db, $server_db); |
| 78 | 78 | |
| 79 | 79 | $hidden = (defined('_SPIP_CHMOD') |
| 80 | 80 | ? '' |
| 81 | - : ("\n<input type='hidden' name='chmod' value='" . spip_htmlspecialchars($chmod) . "' />")) |
|
| 82 | - . predef_ou_cache($adresse_db . ($port ? ':' . $port : ''), $login_db, $pass_db, $server_db); |
|
| 81 | + : ("\n<input type='hidden' name='chmod' value='".spip_htmlspecialchars($chmod)."' />")) |
|
| 82 | + . predef_ou_cache($adresse_db.($port ? ':'.$port : ''), $login_db, $pass_db, $server_db); |
|
| 83 | 83 | |
| 84 | 84 | echo install_etape_2_form($hidden, $checked, $res, 3); |
| 85 | 85 | } else { |
@@ -87,8 +87,8 @@ discard block |
||
| 87 | 87 | |
| 88 | 88 | echo "<div class='error'>"; |
| 89 | 89 | echo info_etape(_T('info_connexion_base')); |
| 90 | - echo '<h3>' . _T('avis_connexion_echec_1') . '</h3>'; |
|
| 91 | - echo '<p>' . _T('avis_connexion_echec_2') . '</p>'; |
|
| 90 | + echo '<h3>'._T('avis_connexion_echec_1').'</h3>'; |
|
| 91 | + echo '<p>'._T('avis_connexion_echec_2').'</p>'; |
|
| 92 | 92 | |
| 93 | 93 | echo "<p style='font-size: small;'>", |
| 94 | 94 | _T('avis_connexion_echec_3'), |
@@ -120,8 +120,8 @@ discard block |
||
| 120 | 120 | . ' ' |
| 121 | 121 | ]; |
| 122 | 122 | } |
| 123 | - $res = '<b>' . _T('avis_lecture_noms_bases_1') . '</b> |
|
| 124 | - ' . _T('avis_lecture_noms_bases_2') . '<p>'; |
|
| 123 | + $res = '<b>'._T('avis_lecture_noms_bases_1').'</b> |
|
| 124 | + ' . _T('avis_lecture_noms_bases_2').'<p>'; |
|
| 125 | 125 | |
| 126 | 126 | $checked = false; |
| 127 | 127 | if ($login_db) { |
@@ -138,10 +138,10 @@ discard block |
||
| 138 | 138 | if ($ok) { |
| 139 | 139 | $res .= _T('avis_lecture_noms_bases_3') |
| 140 | 140 | . '<ul>' |
| 141 | - . '<li><input name="choix_db" value="' . $test_base . "\" type='radio' id='stand' checked='checked' />" |
|
| 142 | - . "<label for='stand'>" . $test_base . "</label></li>\n" |
|
| 141 | + . '<li><input name="choix_db" value="'.$test_base."\" type='radio' id='stand' checked='checked' />" |
|
| 142 | + . "<label for='stand'>".$test_base."</label></li>\n" |
|
| 143 | 143 | . '</ul>' |
| 144 | - . '<p>' . _T('info_ou') . ' '; |
|
| 144 | + . '<p>'._T('info_ou').' '; |
|
| 145 | 145 | $checked = true; |
| 146 | 146 | } |
| 147 | 147 | } |
@@ -154,20 +154,20 @@ discard block |
||
| 154 | 154 | "\n<input type='hidden' name='etape' value='$etape' />" |
| 155 | 155 | . $hidden |
| 156 | 156 | . (defined('_INSTALL_NAME_DB') |
| 157 | - ? '<h3>' . _T('install_nom_base_hebergeur') . ' <tt>' . _INSTALL_NAME_DB . '</tt>' . '</h3>' |
|
| 158 | - : "\n<fieldset><legend>" . _T('texte_choix_base_1') . "</legend>\n" |
|
| 157 | + ? '<h3>'._T('install_nom_base_hebergeur').' <tt>'._INSTALL_NAME_DB.'</tt>'.'</h3>' |
|
| 158 | + : "\n<fieldset><legend>"._T('texte_choix_base_1')."</legend>\n" |
|
| 159 | 159 | . $res |
| 160 | 160 | . "\n<input name=\"choix_db\" value=\"new_spip\" type='radio' id='nou'" |
| 161 | 161 | . ($checked ? '' : " checked='checked'") |
| 162 | - . " />\n<label for='nou'>" . _T('info_creer_base') . "</label></p>\n<p>" |
|
| 162 | + . " />\n<label for='nou'>"._T('info_creer_base')."</label></p>\n<p>" |
|
| 163 | 163 | . "\n<input type='text' name='table_new' class='text' value=\"spip\" size='20' /></p></fieldset>\n" |
| 164 | 164 | ) |
| 165 | 165 | |
| 166 | 166 | . ((defined('_INSTALL_TABLE_PREFIX') |
| 167 | 167 | or $GLOBALS['table_prefix'] != 'spip') |
| 168 | - ? '<h3>' . _T('install_table_prefix_hebergeur') . ' <tt>' . $GLOBALS['table_prefix'] . '</tt>' . '</h3>' |
|
| 169 | - : '<fieldset><legend>' . _T('texte_choix_table_prefix') . "</legend>\n" |
|
| 170 | - . "<p><label for='table_prefix'>" . _T('info_table_prefix') . '</label></p><p>' |
|
| 168 | + ? '<h3>'._T('install_table_prefix_hebergeur').' <tt>'.$GLOBALS['table_prefix'].'</tt>'.'</h3>' |
|
| 169 | + : '<fieldset><legend>'._T('texte_choix_table_prefix')."</legend>\n" |
|
| 170 | + . "<p><label for='table_prefix'>"._T('info_table_prefix').'</label></p><p>' |
|
| 171 | 171 | . "\n<input type='text' id='tprefix' name='tprefix' class='text' value='" |
| 172 | 172 | . 'spip' # valeur par defaut |
| 173 | 173 | . "' size='20' /></p></fieldset>" |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $adresse_ldap = filter_var($adresse_ldap, FILTER_SANITIZE_URL) ?: ''; |
| 49 | 49 | |
| 50 | 50 | $ldap_link = ldap_connect($adresse_ldap, $port_ldap); |
| 51 | - $erreur = 'ldap_connect(' . spip_htmlspecialchars($adresse_ldap) . ', ' . spip_htmlspecialchars($port_ldap) . ')'; |
|
| 51 | + $erreur = 'ldap_connect('.spip_htmlspecialchars($adresse_ldap).', '.spip_htmlspecialchars($port_ldap).')'; |
|
| 52 | 52 | |
| 53 | 53 | if ($ldap_link) { |
| 54 | 54 | if (!ldap_set_option($ldap_link, LDAP_OPT_PROTOCOL_VERSION, $protocole_ldap)) { |
@@ -57,19 +57,19 @@ discard block |
||
| 57 | 57 | } |
| 58 | 58 | if ($tls === true) { |
| 59 | 59 | if (!ldap_start_tls($ldap_link)) { |
| 60 | - $erreur = 'ldap_start_tls(' . spip_htmlspecialchars($ldap_link) |
|
| 61 | - . ' ' . spip_htmlspecialchars($adresse_ldap) |
|
| 62 | - . ', ' . spip_htmlspecialchars($port_ldap) . ')'; |
|
| 60 | + $erreur = 'ldap_start_tls('.spip_htmlspecialchars($ldap_link) |
|
| 61 | + . ' '.spip_htmlspecialchars($adresse_ldap) |
|
| 62 | + . ', '.spip_htmlspecialchars($port_ldap).')'; |
|
| 63 | 63 | $ldap_link = false; |
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | if ($ldap_link) { |
| 67 | 67 | $ldap_link = ldap_bind($ldap_link, $login_ldap, $pass_ldap); |
| 68 | - $erreur = "ldap_bind('" . spip_htmlspecialchars($ldap_link) |
|
| 69 | - . "', '" . spip_htmlspecialchars($login_ldap) |
|
| 70 | - . "', '" . spip_htmlspecialchars($pass_ldap) |
|
| 71 | - . "'): " . spip_htmlspecialchars($adresse_ldap) |
|
| 72 | - . ', ' . spip_htmlspecialchars($port_ldap); |
|
| 68 | + $erreur = "ldap_bind('".spip_htmlspecialchars($ldap_link) |
|
| 69 | + . "', '".spip_htmlspecialchars($login_ldap) |
|
| 70 | + . "', '".spip_htmlspecialchars($pass_ldap) |
|
| 71 | + . "'): ".spip_htmlspecialchars($adresse_ldap) |
|
| 72 | + . ', '.spip_htmlspecialchars($port_ldap); |
|
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
@@ -77,22 +77,22 @@ discard block |
||
| 77 | 77 | echo info_etape( |
| 78 | 78 | _T('titre_connexion_ldap'), |
| 79 | 79 | info_progression_etape(2, 'etape_ldap', 'install/') |
| 80 | - ), _T('info_connexion_ldap_ok'); |
|
| 80 | + ), _T('info_connexion_ldap_ok'); |
|
| 81 | 81 | echo generer_form_ecrire('install', ( |
| 82 | 82 | "\n<input type='hidden' name='etape' value='ldap3' />" |
| 83 | - . "\n<input type='hidden' name='adresse_ldap' value=\"" . spip_htmlspecialchars($adresse_ldap) . '" />' |
|
| 84 | - . "\n<input type='hidden' name='port_ldap' value=\"" . spip_htmlspecialchars($port_ldap) . '" />' |
|
| 85 | - . "\n<input type='hidden' name='login_ldap' value=\"" . spip_htmlspecialchars($login_ldap) . '" />' |
|
| 86 | - . "\n<input type='hidden' name='pass_ldap' value=\"" . spip_htmlspecialchars($pass_ldap) . '" />' |
|
| 87 | - . "\n<input type='hidden' name='protocole_ldap' value=\"" . spip_htmlspecialchars($protocole_ldap) . '" />' |
|
| 88 | - . "\n<input type='hidden' name='tls_ldap' value=\"" . spip_htmlspecialchars($tls_ldap) . '" />' |
|
| 83 | + . "\n<input type='hidden' name='adresse_ldap' value=\"".spip_htmlspecialchars($adresse_ldap).'" />' |
|
| 84 | + . "\n<input type='hidden' name='port_ldap' value=\"".spip_htmlspecialchars($port_ldap).'" />' |
|
| 85 | + . "\n<input type='hidden' name='login_ldap' value=\"".spip_htmlspecialchars($login_ldap).'" />' |
|
| 86 | + . "\n<input type='hidden' name='pass_ldap' value=\"".spip_htmlspecialchars($pass_ldap).'" />' |
|
| 87 | + . "\n<input type='hidden' name='protocole_ldap' value=\"".spip_htmlspecialchars($protocole_ldap).'" />' |
|
| 88 | + . "\n<input type='hidden' name='tls_ldap' value=\"".spip_htmlspecialchars($tls_ldap).'" />' |
|
| 89 | 89 | . bouton_suivant())); |
| 90 | 90 | } else { |
| 91 | 91 | echo info_etape(_T('titre_connexion_ldap')), info_progression_etape(1, 'etape_ldap', 'install/', true), |
| 92 | - "<div class='error'><p>" . _T('avis_connexion_ldap_echec_1') . '</p>', |
|
| 93 | - '<p>' . _T('avis_connexion_ldap_echec_2') . |
|
| 94 | - "<br />\n" . _T('avis_connexion_ldap_echec_3') . |
|
| 95 | - '<br /><br />' . $erreur . '<b> ?</b></p></div>'; |
|
| 92 | + "<div class='error'><p>"._T('avis_connexion_ldap_echec_1').'</p>', |
|
| 93 | + '<p>'._T('avis_connexion_ldap_echec_2'). |
|
| 94 | + "<br />\n"._T('avis_connexion_ldap_echec_3'). |
|
| 95 | + '<br /><br />'.$erreur.'<b> ?</b></p></div>'; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | echo $minipage->installFinPage(); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | // creer le repertoire cache, qui sert partout ! |
| 44 | 44 | // deja fait en etape 4 en principe, on garde au cas ou |
| 45 | 45 | if (!@file_exists(_DIR_CACHE)) { |
| 46 | - $rep = preg_replace(',' . _DIR_TMP . ',', '', _DIR_CACHE); |
|
| 46 | + $rep = preg_replace(','._DIR_TMP.',', '', _DIR_CACHE); |
|
| 47 | 47 | $rep = sous_repertoire(_DIR_TMP, $rep, true, true); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $cible = _T('public:accueil_site'); |
| 55 | 55 | $cible = generer_form_ecrire('accueil', '', '', $cible); |
| 56 | 56 | $minipage = new Spip\Afficher\Minipage\Installation(); |
| 57 | - echo $minipage->page($msg . $cible); |
|
| 57 | + echo $minipage->page($msg.$cible); |
|
| 58 | 58 | // ok, deboucher dans l'espace prive |
| 59 | 59 | } else { |
| 60 | 60 | redirige_url_ecrire('accueil'); |
@@ -75,9 +75,9 @@ discard block |
||
| 75 | 75 | $averti = _T( |
| 76 | 76 | 'htaccess_a_simuler', |
| 77 | 77 | [ |
| 78 | - 'htaccess' => '<tt>' . _ACCESS_FILE_NAME . '</tt>', |
|
| 78 | + 'htaccess' => '<tt>'._ACCESS_FILE_NAME.'</tt>', |
|
| 79 | 79 | 'constantes' => '<tt>_DIR_TMP & _DIR_CONNECT</tt>', |
| 80 | - 'document_root' => '<tt>' . $_SERVER['DOCUMENT_ROOT'] . '</tt>' |
|
| 80 | + 'document_root' => '<tt>'.$_SERVER['DOCUMENT_ROOT'].'</tt>' |
|
| 81 | 81 | ] |
| 82 | 82 | ); |
| 83 | 83 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $texte = $intro; |
| 87 | 87 | } else { |
| 88 | 88 | if ( |
| 89 | - strpos("\n" . $texte, "\n|") === false |
|
| 89 | + strpos("\n".$texte, "\n|") === false |
|
| 90 | 90 | and strlen($texte) > 2.5 * $longueur |
| 91 | 91 | ) { |
| 92 | 92 | if (strpos($texte, '<multi') !== false) { |
@@ -170,12 +170,12 @@ discard block |
||
| 170 | 170 | if ($pas < 1) { |
| 171 | 171 | return ''; |
| 172 | 172 | } |
| 173 | - $ancre = 'pagination' . $nom; // #pagination_articles |
|
| 174 | - $debut = 'debut' . $nom; // 'debut_articles' |
|
| 173 | + $ancre = 'pagination'.$nom; // #pagination_articles |
|
| 174 | + $debut = 'debut'.$nom; // 'debut_articles' |
|
| 175 | 175 | |
| 176 | 176 | // n'afficher l'ancre qu'une fois |
| 177 | 177 | if (!isset($ancres[$ancre])) { |
| 178 | - $bloc_ancre = $ancres[$ancre] = "<a id='" . $ancre . "' class='pagination_ancre'></a>"; |
|
| 178 | + $bloc_ancre = $ancres[$ancre] = "<a id='".$ancre."' class='pagination_ancre'></a>"; |
|
| 179 | 179 | } else { |
| 180 | 180 | $bloc_ancre = ''; |
| 181 | 181 | } |
@@ -207,8 +207,8 @@ discard block |
||
| 207 | 207 | |
| 208 | 208 | if ($modele) { |
| 209 | 209 | $pagination['type_pagination'] = $modele; |
| 210 | - if (trouver_fond('pagination_' . $modele, 'modeles')) { |
|
| 211 | - $modele = '_' . $modele; |
|
| 210 | + if (trouver_fond('pagination_'.$modele, 'modeles')) { |
|
| 211 | + $modele = '_'.$modele; |
|
| 212 | 212 | } |
| 213 | 213 | else { |
| 214 | 214 | $modele = ''; |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | function lister_objets_avec_logos($type) { |
| 294 | 294 | |
| 295 | 295 | $objet = objet_type($type); |
| 296 | - $ids = sql_allfetsel('L.id_objet', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', 'D.mode=' . sql_quote('logoon') . ' AND L.objet=' . sql_quote($objet)); |
|
| 296 | + $ids = sql_allfetsel('L.id_objet', 'spip_documents AS D JOIN spip_documents_liens AS L ON L.id_document=D.id_document', 'D.mode='.sql_quote('logoon').' AND L.objet='.sql_quote($objet)); |
|
| 297 | 297 | if ($ids) { |
| 298 | 298 | $ids = array_column($ids, 'id_objet'); |
| 299 | 299 | return implode(',', $ids); |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | |
| 487 | 487 | // Classes : on indique le sens de tri et l'item exposé |
| 488 | 488 | if (!$is_sens_fixe) { |
| 489 | - $classe .= ' item-tri item-tri_' . ($tri_sens_actuel === 1 ? 'asc' : 'desc'); |
|
| 489 | + $classe .= ' item-tri item-tri_'.($tri_sens_actuel === 1 ? 'asc' : 'desc'); |
|
| 490 | 490 | } |
| 491 | 491 | if ($champ_ou_sens === $tri_champ) { |
| 492 | 492 | $classe .= ' item-tri_actif'; |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | */ |
| 526 | 526 | function tri_champ_order($t, $from = null, $senstri = '') { |
| 527 | 527 | if (strncmp($t, 'multi ', 6) == 0) { |
| 528 | - return 'multi' . $senstri; |
|
| 528 | + return 'multi'.$senstri; |
|
| 529 | 529 | } |
| 530 | 530 | |
| 531 | 531 | $champ = $t; |
@@ -559,7 +559,7 @@ discard block |
||
| 559 | 559 | case 'sinum ': |
| 560 | 560 | return "CASE( 0+$champ ) WHEN 0 THEN 1 ELSE 0 END{$senstri}"; |
| 561 | 561 | default: |
| 562 | - return $champ . $senstri; |
|
| 562 | + return $champ.$senstri; |
|
| 563 | 563 | } |
| 564 | 564 | } |
| 565 | 565 | |
@@ -653,7 +653,7 @@ discard block |
||
| 653 | 653 | * @param ...$dummy |
| 654 | 654 | * @return string |
| 655 | 655 | */ |
| 656 | -function filtre_styles_inline_page_login_pass_dist(&$Pile,...$dummy) { |
|
| 656 | +function filtre_styles_inline_page_login_pass_dist(&$Pile, ...$dummy) { |
|
| 657 | 657 | $styles = ''; |
| 658 | 658 | include_spip('inc/config'); |
| 659 | 659 | if ($couleur = lire_config('couleur_login')) { |
@@ -662,7 +662,7 @@ discard block |
||
| 662 | 662 | $l = couleur_hex_to_hsl($couleur, 'l'); |
| 663 | 663 | $styles .= ":root {--spip-login-color-theme--hs: {$hs};--spip-login-color-theme--l: {$l};}\n"; |
| 664 | 664 | } |
| 665 | - $logo_bg = _DIR_IMG . "spip_fond_login.jpg"; |
|
| 665 | + $logo_bg = _DIR_IMG."spip_fond_login.jpg"; |
|
| 666 | 666 | if (file_exists($logo_bg)) { |
| 667 | 667 | include_spip('inc/filtres_images_mini'); |
| 668 | 668 | $logo_mini = image_reduire($logo_bg, 64, 64); |
@@ -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) ? strval($suivant) : ''); |
|
| 233 | + $id = 'suivant'.(($suivant > 0) ? strval($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 = count($liste); |
| 247 | 247 | |
@@ -276,8 +276,8 @@ discard block |
||
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | $aff_etapes .= "<li class='$class'><div class='fond'>"; |
| 279 | - $aff_etapes .= '<em>' . _T('etape') . " </em><span class='numero_etape'>$debut</span><em> : </em>"; |
|
| 280 | - $aff_etapes .= '<'.(($debut == $en_cours) ? 'strong' : 'span').' class="label_etape">' . $intitule_etat["$phase"][$debut] . '</'.(($debut == $en_cours) ? 'strong' : 'span').'>'; |
|
| 279 | + $aff_etapes .= '<em>'._T('etape')." </em><span class='numero_etape'>$debut</span><em> : </em>"; |
|
| 280 | + $aff_etapes .= '<'.(($debut == $en_cours) ? 'strong' : 'span').' class="label_etape">'.$intitule_etat["$phase"][$debut].'</'.(($debut == $en_cours) ? 'strong' : 'span').'>'; |
|
| 281 | 281 | $aff_etapes .= '</div></li>'; |
| 282 | 282 | } |
| 283 | 283 | $debut++; |
@@ -289,11 +289,11 @@ discard block |
||
| 289 | 289 | |
| 290 | 290 | |
| 291 | 291 | function fieldset($legend, $champs = [], $apres = '', $avant = '') { |
| 292 | - return "<fieldset>\n" . |
|
| 293 | - $avant . |
|
| 294 | - ($legend ? '<legend>' . $legend . "</legend>\n" : '') . |
|
| 295 | - fieldset_champs($champs) . |
|
| 296 | - $apres . |
|
| 292 | + return "<fieldset>\n". |
|
| 293 | + $avant. |
|
| 294 | + ($legend ? '<legend>'.$legend."</legend>\n" : ''). |
|
| 295 | + fieldset_champs($champs). |
|
| 296 | + $apres. |
|
| 297 | 297 | "</fieldset>\n"; |
| 298 | 298 | } |
| 299 | 299 | |
@@ -303,18 +303,18 @@ discard block |
||
| 303 | 303 | $type = isset($contenu['hidden']) ? 'hidden' : (preg_match(',^pass,', $nom) ? 'password' : 'text'); |
| 304 | 304 | $class = isset($contenu['hidden']) ? '' : "class='formo' size='40' "; |
| 305 | 305 | if (isset($contenu['alternatives'])) { |
| 306 | - $fieldset .= $contenu['label'] . "\n"; |
|
| 306 | + $fieldset .= $contenu['label']."\n"; |
|
| 307 | 307 | foreach ($contenu['alternatives'] as $valeur => $label) { |
| 308 | - $fieldset .= "<input type='radio' name='" . $nom . |
|
| 308 | + $fieldset .= "<input type='radio' name='".$nom. |
|
| 309 | 309 | "' id='$nom-$valeur' value='$valeur'" |
| 310 | 310 | . (($valeur == $contenu['valeur']) ? "\nchecked='checked'" : '') |
| 311 | 311 | . "/>\n"; |
| 312 | - $fieldset .= "<label for='$nom-$valeur'>" . $label . "</label>\n"; |
|
| 312 | + $fieldset .= "<label for='$nom-$valeur'>".$label."</label>\n"; |
|
| 313 | 313 | } |
| 314 | 314 | $fieldset .= "<br />\n"; |
| 315 | 315 | } else { |
| 316 | - $fieldset .= "<label for='" . $nom . "'>" . $contenu['label'] . "</label>\n"; |
|
| 317 | - $fieldset .= '<input ' . $class . "type='" . $type . "' id='" . $nom . "' name='" . $nom . "'\nvalue='" . $contenu['valeur'] . "'" |
|
| 316 | + $fieldset .= "<label for='".$nom."'>".$contenu['label']."</label>\n"; |
|
| 317 | + $fieldset .= '<input '.$class."type='".$type."' id='".$nom."' name='".$nom."'\nvalue='".$contenu['valeur']."'" |
|
| 318 | 318 | . (preg_match(',^(pass|login),', $nom) ? " autocomplete='off'" : '') |
| 319 | 319 | . ((isset($contenu['required']) and $contenu['required']) ? " required='required'" : '') |
| 320 | 320 | . " />\n"; |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | |
| 327 | 327 | function install_select_serveur() { |
| 328 | 328 | $options = []; |
| 329 | - $dir = _DIR_RESTREINT . 'req/'; |
|
| 329 | + $dir = _DIR_RESTREINT.'req/'; |
|
| 330 | 330 | $d = opendir($dir); |
| 331 | 331 | if (!$d) { |
| 332 | 332 | return []; |
@@ -334,17 +334,17 @@ discard block |
||
| 334 | 334 | while (($f = readdir($d)) !== false) { |
| 335 | 335 | if ( |
| 336 | 336 | (preg_match('/^(.*)[.]php$/', $f, $s)) |
| 337 | - and is_readable($f = $dir . $f) |
|
| 337 | + and is_readable($f = $dir.$f) |
|
| 338 | 338 | ) { |
| 339 | 339 | require_once($f); |
| 340 | 340 | $s = $s[1]; |
| 341 | - $v = 'spip_versions_' . $s; |
|
| 341 | + $v = 'spip_versions_'.$s; |
|
| 342 | 342 | if (function_exists($v) and $v()) { |
| 343 | 343 | $titre = _T("install_select_type_$s"); |
| 344 | 344 | // proposer mysql par defaut si dispo |
| 345 | 345 | $checked = ($s == 'mysql' ? " checked='checked'" : ''); |
| 346 | 346 | $options[$s] = "<li><input type='radio' id='$s' value='$s' name='server_db'$checked>" |
| 347 | - . "<label for='$s'>" . ($titre ?: $s) . '</label></li>'; |
|
| 347 | + . "<label for='$s'>".($titre ?: $s).'</label></li>'; |
|
| 348 | 348 | } else { |
| 349 | 349 | spip_log("$s: portage indisponible"); |
| 350 | 350 | } |
@@ -362,8 +362,8 @@ discard block |
||
| 362 | 362 | "\n<input type='hidden' name='etape' value='$etape' />" |
| 363 | 363 | . $hidden |
| 364 | 364 | . (_request('echec') ? |
| 365 | - ('<p><b>' . _T('avis_connexion_echec_1') . |
|
| 366 | - '</b></p><p>' . _T('avis_connexion_echec_2') . "</p><p style='font-size: small;'>" . _T('avis_connexion_echec_3') . '</p>') |
|
| 365 | + ('<p><b>'._T('avis_connexion_echec_1'). |
|
| 366 | + '</b></p><p>'._T('avis_connexion_echec_2')."</p><p style='font-size: small;'>"._T('avis_connexion_echec_3').'</p>') |
|
| 367 | 367 | : '') |
| 368 | 368 | |
| 369 | 369 | . ($jquery ? http_script('', 'jquery.js') : '') |
@@ -401,9 +401,9 @@ discard block |
||
| 401 | 401 | });') |
| 402 | 402 | |
| 403 | 403 | . ($server_db |
| 404 | - ? '<input type="hidden" name="server_db" value="' . $server_db . '" />' |
|
| 404 | + ? '<input type="hidden" name="server_db" value="'.$server_db.'" />' |
|
| 405 | 405 | . (($predef[0]) |
| 406 | - ? ('<h3>' . _T('install_serveur_hebergeur') . '</h3>') |
|
| 406 | + ? ('<h3>'._T('install_serveur_hebergeur').'</h3>') |
|
| 407 | 407 | : '') |
| 408 | 408 | : ('<fieldset><legend>' |
| 409 | 409 | . _T('install_select_type_db') |
@@ -418,9 +418,9 @@ discard block |
||
| 418 | 418 | . "\n</ul>\n</div></fieldset>") |
| 419 | 419 | ) |
| 420 | 420 | . '<div id="install_adresse_base_hebergeur">' |
| 421 | - . '<p>' . _T('texte_connexion_mysql') . '</p>' |
|
| 421 | + . '<p>'._T('texte_connexion_mysql').'</p>' |
|
| 422 | 422 | . ($predef[1] |
| 423 | - ? '<h3>' . _T('install_adresse_base_hebergeur') . '</h3>' |
|
| 423 | + ? '<h3>'._T('install_adresse_base_hebergeur').'</h3>' |
|
| 424 | 424 | : fieldset( |
| 425 | 425 | _T('entree_base_donnee_1'), |
| 426 | 426 | [ |
@@ -435,7 +435,7 @@ discard block |
||
| 435 | 435 | |
| 436 | 436 | . '<div id="install_login_base_hebergeur">' |
| 437 | 437 | . ($predef[2] |
| 438 | - ? '<h3>' . _T('install_login_base_hebergeur') . '</h3>' |
|
| 438 | + ? '<h3>'._T('install_login_base_hebergeur').'</h3>' |
|
| 439 | 439 | : fieldset( |
| 440 | 440 | _T('entree_login_connexion_1'), |
| 441 | 441 | [ |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | |
| 451 | 451 | . '<div id="install_pass_base_hebergeur">' |
| 452 | 452 | . ($predef[3] |
| 453 | - ? '<h3>' . _T('install_pass_base_hebergeur') . '</h3>' |
|
| 453 | + ? '<h3>'._T('install_pass_base_hebergeur').'</h3>' |
|
| 454 | 454 | : fieldset( |
| 455 | 455 | _T('entree_mot_passe_1'), |
| 456 | 456 | [ |
@@ -472,20 +472,20 @@ discard block |
||
| 472 | 472 | function predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db) { |
| 473 | 473 | return ((defined('_INSTALL_HOST_DB')) |
| 474 | 474 | ? '' |
| 475 | - : "\n<input type='hidden' name='adresse_db' value=\"" . spip_htmlspecialchars($adresse_db) . '" />' |
|
| 475 | + : "\n<input type='hidden' name='adresse_db' value=\"".spip_htmlspecialchars($adresse_db).'" />' |
|
| 476 | 476 | ) |
| 477 | 477 | . ((defined('_INSTALL_USER_DB')) |
| 478 | 478 | ? '' |
| 479 | - : "\n<input type='hidden' name='login_db' value=\"" . spip_htmlspecialchars($login_db) . '" />' |
|
| 479 | + : "\n<input type='hidden' name='login_db' value=\"".spip_htmlspecialchars($login_db).'" />' |
|
| 480 | 480 | ) |
| 481 | 481 | . ((defined('_INSTALL_PASS_DB')) |
| 482 | 482 | ? '' |
| 483 | - : "\n<input type='hidden' name='pass_db' value=\"" . spip_htmlspecialchars($pass_db) . '" />' |
|
| 483 | + : "\n<input type='hidden' name='pass_db' value=\"".spip_htmlspecialchars($pass_db).'" />' |
|
| 484 | 484 | ) |
| 485 | 485 | |
| 486 | 486 | . ((defined('_INSTALL_SERVER_DB')) |
| 487 | 487 | ? '' |
| 488 | - : "\n<input type='hidden' name='server_db' value=\"" . spip_htmlspecialchars($server_db) . '" />' |
|
| 488 | + : "\n<input type='hidden' name='server_db' value=\"".spip_htmlspecialchars($server_db).'" />' |
|
| 489 | 489 | ); |
| 490 | 490 | } |
| 491 | 491 | |
@@ -63,17 +63,17 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | $page_title = (isset($options['page_title']) ? $options['page_title'] : $GLOBALS['meta']['nom_site']); |
| 65 | 65 | $doctype = (isset($options['doctype']) ? $options['doctype'] : "<!DOCTYPE html>"); |
| 66 | - $doctype = trim($doctype) . "\n"; |
|
| 66 | + $doctype = trim($doctype)."\n"; |
|
| 67 | 67 | $charset = (isset($options['charset']) ? $options['charset'] : "utf-8"); |
| 68 | 68 | $all_inline = (isset($options['all_inline']) ? $options['all_inline'] : true); |
| 69 | 69 | $onLoad = (isset($options['onLoad']) ? $options['onLoad'] : ''); |
| 70 | 70 | if ($onLoad) { |
| 71 | - $onLoad = ' onload="' . attribut_html($onLoad) . '"'; |
|
| 71 | + $onLoad = ' onload="'.attribut_html($onLoad).'"'; |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | # envoyer le charset |
| 75 | 75 | if (!headers_sent()) { |
| 76 | - header('Content-Type: text/html; charset=' . $charset); |
|
| 76 | + header('Content-Type: text/html; charset='.$charset); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | $css = ''; |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | . "--minipage-color-theme--s: $s;" |
| 95 | 95 | . "--minipage-color-theme--l: $l;}"; |
| 96 | 96 | $vars = file_get_contents(find_in_theme('minipage.vars.css')); |
| 97 | - $inline .= "\n" . trim($vars); |
|
| 97 | + $inline .= "\n".trim($vars); |
|
| 98 | 98 | if (function_exists('minifier')) { |
| 99 | 99 | $inline = minifier($inline, 'css'); |
| 100 | 100 | } |
@@ -121,31 +121,31 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | $css = "$inline\n$css"; |
| 123 | 123 | if (!empty($options['css'])) { |
| 124 | - $css .= "\n" . $options['css']; |
|
| 124 | + $css .= "\n".$options['css']; |
|
| 125 | 125 | } |
| 126 | 126 | $css = "<style type='text/css'>$css</style>"; |
| 127 | 127 | } else { |
| 128 | 128 | $css = "<style type='text/css'>$inline</style>"; |
| 129 | 129 | foreach ($files as $name) { |
| 130 | 130 | $file = timestamp(direction_css($name)); |
| 131 | - $css .= "<link rel='stylesheet' href='" . attribut_html($file) . "' type='text/css' />\n"; |
|
| 131 | + $css .= "<link rel='stylesheet' href='".attribut_html($file)."' type='text/css' />\n"; |
|
| 132 | 132 | } |
| 133 | 133 | if (!empty($options['css'])) { |
| 134 | - $css .= "<style type='text/css'>" . $options['css'] . "</style>"; |
|
| 134 | + $css .= "<style type='text/css'>".$options['css']."</style>"; |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - return $doctype . |
|
| 139 | - html_lang_attributes() . |
|
| 140 | - "<head>\n" . |
|
| 141 | - '<title>' . |
|
| 142 | - textebrut($page_title) . |
|
| 143 | - "</title>\n" . |
|
| 144 | - "<meta name=\"viewport\" content=\"width=device-width\" />\n" . |
|
| 145 | - $css . |
|
| 146 | - (empty($options['head']) ? "" : $options['head']) . |
|
| 147 | - "</head>\n" . |
|
| 148 | - "<body{$onLoad} class=\"minipage" . ($this::TYPE ? ' minipage--' . $this::TYPE : '') . "\">\n" . |
|
| 138 | + return $doctype. |
|
| 139 | + html_lang_attributes(). |
|
| 140 | + "<head>\n". |
|
| 141 | + '<title>'. |
|
| 142 | + textebrut($page_title). |
|
| 143 | + "</title>\n". |
|
| 144 | + "<meta name=\"viewport\" content=\"width=device-width\" />\n". |
|
| 145 | + $css. |
|
| 146 | + (empty($options['head']) ? "" : $options['head']). |
|
| 147 | + "</head>\n". |
|
| 148 | + "<body{$onLoad} class=\"minipage".($this::TYPE ? ' minipage--'.$this::TYPE : '')."\">\n". |
|
| 149 | 149 | "\t<div class=\"minipage-bloc\">\n"; |
| 150 | 150 | } |
| 151 | 151 | |
@@ -156,16 +156,16 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | protected function ouvreCorps($options = []) { |
| 158 | 158 | $url_site = url_de_base(); |
| 159 | - $header = "<header>\n" . |
|
| 160 | - "<h1><a href=\"" . attribut_html($url_site) . "\">" . interdire_scripts($GLOBALS['meta']['nom_site'] ?? '') . "</a></h1>\n"; |
|
| 159 | + $header = "<header>\n". |
|
| 160 | + "<h1><a href=\"".attribut_html($url_site)."\">".interdire_scripts($GLOBALS['meta']['nom_site'] ?? '')."</a></h1>\n"; |
|
| 161 | 161 | |
| 162 | 162 | $titre = (isset($options['titre']) ? $options['titre'] : ''); |
| 163 | 163 | if ($titre) { |
| 164 | - $header .= "<h2>" . interdire_scripts($titre) . "</h2>"; |
|
| 164 | + $header .= "<h2>".interdire_scripts($titre)."</h2>"; |
|
| 165 | 165 | } |
| 166 | 166 | $header .= "</header>"; |
| 167 | 167 | |
| 168 | - return $header . "<div class='corps'>\n"; |
|
| 168 | + return $header."<div class='corps'>\n"; |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
@@ -179,13 +179,13 @@ discard block |
||
| 179 | 179 | if (isset($options['footer'])) { |
| 180 | 180 | $footer = $options['footer']; |
| 181 | 181 | } else { |
| 182 | - $footer = "<a href=\"" . attribut_html($url_site) . "\">" . _T('retour') . "</a>\n"; |
|
| 182 | + $footer = "<a href=\"".attribut_html($url_site)."\">"._T('retour')."</a>\n"; |
|
| 183 | 183 | } |
| 184 | 184 | if (!empty($footer)) { |
| 185 | 185 | $footer = "<footer>\n{$footer}</footer>"; |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | - return "</div>\n" . $footer; |
|
| 188 | + return "</div>\n".$footer; |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | $titre = ($titre == 'install') |
| 106 | 106 | ? _T('avis_espace_interdit') |
| 107 | - : $titre . ' : ' . _T('info_acces_interdit'); |
|
| 107 | + : $titre.' : '._T('info_acces_interdit'); |
|
| 108 | 108 | |
| 109 | 109 | $statut = $GLOBALS['visiteur_session']['statut'] ?? ''; |
| 110 | 110 | $nom = $GLOBALS['visiteur_session']['nom'] ?? ''; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | $footer = bouton_action(_T('public:accueil_site'), $GLOBALS['meta']['adresse_site'] ?? ''); |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - spip_log($nom . " $titre " . $_SERVER['REQUEST_URI'], 'minipres'); |
|
| 126 | + spip_log($nom." $titre ".$_SERVER['REQUEST_URI'], 'minipres'); |
|
| 127 | 127 | |
| 128 | 128 | $options['footer'] = $footer; |
| 129 | 129 | if (empty($corps)) { |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | foreach ($_POST as $v => $c) { |
| 155 | 155 | $url = parametre_url($url, $v, $c, '&'); |
| 156 | 156 | } |
| 157 | - ajax_retour('<div>' . $titre . redirige_formulaire($url) . '</div>', false); |
|
| 157 | + ajax_retour('<div>'.$titre.redirige_formulaire($url).'</div>', false); |
|
| 158 | 158 | return ''; |
| 159 | 159 | } |
| 160 | 160 | } |
@@ -28,11 +28,11 @@ discard block |
||
| 28 | 28 | function genie_mise_a_jour_dist($t) { |
| 29 | 29 | include_spip('inc/meta'); |
| 30 | 30 | $maj = info_maj($GLOBALS['spip_version_branche']); |
| 31 | - ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche'] . "|$maj") : '', 'non'); |
|
| 31 | + ecrire_meta('info_maj_spip', $maj ? ($GLOBALS['spip_version_branche']."|$maj") : '', 'non'); |
|
| 32 | 32 | |
| 33 | 33 | mise_a_jour_ecran_securite(); |
| 34 | 34 | |
| 35 | - spip_log('Verification version SPIP : ' . ($maj ?: 'version a jour'), 'verifie_maj'); |
|
| 35 | + spip_log('Verification version SPIP : '.($maj ?: 'version a jour'), 'verifie_maj'); |
|
| 36 | 36 | |
| 37 | 37 | return 1; |
| 38 | 38 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | // si l'ecran n'est pas deja present ou pas updatable, sortir |
| 58 | 58 | if ( |
| 59 | 59 | !_URL_ECRAN_SECURITE |
| 60 | - or !file_exists($filename = _DIR_ETC . 'ecran_securite.php') |
|
| 60 | + or !file_exists($filename = _DIR_ETC.'ecran_securite.php') |
|
| 61 | 61 | or !is_writable($filename) |
| 62 | 62 | or !$last_modified = filemtime($filename) |
| 63 | 63 | or !$md5 = md5_file($filename) |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | include_spip('inc/distant'); |
| 69 | - $tmp_file = _DIR_TMP . 'ecran_securite.php'; |
|
| 69 | + $tmp_file = _DIR_TMP.'ecran_securite.php'; |
|
| 70 | 70 | $url = parametre_url(_URL_ECRAN_SECURITE, 'md5', $md5); |
| 71 | 71 | $url = parametre_url($url, 'vspip', $GLOBALS['spip_version_branche']); |
| 72 | 72 | $res = recuperer_url($url, [ |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | include_once $tmp_file; |
| 86 | 86 | // ok, on le copie a la place de l'ecran existant |
| 87 | 87 | // en backupant l'ecran avant, au cas ou |
| 88 | - @copy($filename, $filename . '-bck-' . date('Y-m-d-His', $last_modified)); |
|
| 88 | + @copy($filename, $filename.'-bck-'.date('Y-m-d-His', $last_modified)); |
|
| 89 | 89 | @rename($tmp_file, $filename); |
| 90 | 90 | } else { |
| 91 | 91 | @unlink($tmp_file); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | $message[] = _T('nouvelle_version_spip_majeure', ['version' => $maj['majeure']]); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | - return '<a class="info_maj_spip" href="https://www.spip.net/fr_update" title="' . $maj['mineure'] . '">' . implode(' | ', $message) . '</a>'; |
|
| 130 | + return '<a class="info_maj_spip" href="https://www.spip.net/fr_update" title="'.$maj['mineure'].'">'.implode(' | ', $message).'</a>'; |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | function info_maj_cache(): ?array { |
| 145 | 145 | $contenu = ''; |
| 146 | 146 | $options = []; |
| 147 | - $nom = _DIR_CACHE . _VERSIONS_LISTE; |
|
| 147 | + $nom = _DIR_CACHE._VERSIONS_LISTE; |
|
| 148 | 148 | if (file_exists($nom)) { |
| 149 | 149 | $contenu = file_get_contents($nom); |
| 150 | 150 | $options['if_modified_since'] = filemtime($nom); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | try { |
| 166 | 166 | $json = json_decode($contenu, true, 512, JSON_THROW_ON_ERROR); |
| 167 | 167 | } catch (JsonException $e) { |
| 168 | - spip_log('Failed to parse Json data : ' . $e->getMessage(), 'verifie_maj'); |
|
| 168 | + spip_log('Failed to parse Json data : '.$e->getMessage(), 'verifie_maj'); |
|
| 169 | 169 | return null; |
| 170 | 170 | } |
| 171 | 171 | |
@@ -197,8 +197,8 @@ discard block |
||
| 197 | 197 | |
| 198 | 198 | foreach ($versions as $v) { |
| 199 | 199 | [$maj2, $min2, $rev2] = explode('.', $v); |
| 200 | - $branche_maj = $maj2 . '.' . $min2; |
|
| 201 | - $version_maj = $maj2 . '.' . $min2 . '.' . $rev2; |
|
| 200 | + $branche_maj = $maj2.'.'.$min2; |
|
| 201 | + $version_maj = $maj2.'.'.$min2.'.'.$rev2; |
|
| 202 | 202 | $is_version_stable = is_numeric($rev2); |
| 203 | 203 | // d'abord les mises à jour de la même branche (version mineure) |
| 204 | 204 | if ( |