@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | return false; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - $row = sql_fetsel('id_article,virtuel', 'spip_articles', 'id_article=' . (int) $id_article); |
|
| 23 | + $row = sql_fetsel('id_article,virtuel', 'spip_articles', 'id_article='.(int) $id_article); |
|
| 24 | 24 | if (!$row['id_article']) { |
| 25 | 25 | return false; |
| 26 | 26 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | function formulaires_rediriger_article_verifier_dist($id_article, $retour = '') { |
| 48 | 48 | $erreurs = []; |
| 49 | 49 | |
| 50 | - if (($redirection = _request('redirection')) == $id_article || $redirection == 'art' . $id_article) { |
|
| 50 | + if (($redirection = _request('redirection')) == $id_article || $redirection == 'art'.$id_article) { |
|
| 51 | 51 | $erreurs['redirection'] = _T('info_redirection_boucle'); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $js = _AJAX ? '<script type="text/javascript">if (window.ajaxReload) ajaxReload("wysiwyg");</script>' : ''; |
| 68 | 68 | |
| 69 | 69 | return [ |
| 70 | - 'message_ok' => ($url ? _T('info_redirection_activee') : _T('info_redirection_desactivee')) . $js, |
|
| 70 | + 'message_ok' => ($url ? _T('info_redirection_activee') : _T('info_redirection_desactivee')).$js, |
|
| 71 | 71 | 'editable' => true |
| 72 | 72 | ]; |
| 73 | 73 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | if ($memo) { |
| 97 | 97 | $on = ($memo['compteur'] <= $debut && ($newcompt > $debut || $newcompt == $debut && $newcompt == $memo['compteur'])); |
| 98 | - $res[] = "<li class='pagination-item'>" . lien_ou_expose($memo['url'], $memo['initiale'], $on ? 'span.pagination-item-label' : '', 'pagination-item-label lien_pagination') . '</li>'; |
|
| 98 | + $res[] = "<li class='pagination-item'>".lien_ou_expose($memo['url'], $memo['initiale'], $on ? 'span.pagination-item-label' : '', 'pagination-item-label lien_pagination').'</li>'; |
|
| 99 | 99 | } |
| 100 | 100 | if ($initiale) { |
| 101 | 101 | $memo = [ |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | if (!$initiale && !$url) { |
| 110 | 110 | if ((is_countable($res) ? count($res) : 0) > 1) { |
| 111 | - $out = "<ul class='pagination-items'>" . implode(' ', $res) . '</ul>'; |
|
| 111 | + $out = "<ul class='pagination-items'>".implode(' ', $res).'</ul>'; |
|
| 112 | 112 | } |
| 113 | 113 | $memo = null; |
| 114 | 114 | $res = []; |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | ) { |
| 150 | 150 | return parametre_url(parametre_url(generer_url_ecrire('message_edit', 'new=oui'), 'to', $id_auteur), 'redirect', self()); |
| 151 | 151 | } elseif (strlen($email) && autoriser('voir', 'auteur', $id_auteur)) { |
| 152 | - return 'mailto:' . $email; |
|
| 152 | + return 'mailto:'.$email; |
|
| 153 | 153 | } else { |
| 154 | 154 | return ''; |
| 155 | 155 | } |
@@ -18,12 +18,12 @@ |
||
| 18 | 18 | $primary = id_table_objet($objet); |
| 19 | 19 | |
| 20 | 20 | $select = "$primary as id,lang"; |
| 21 | - $where = 'id_trad=' . (int) $id_trad; |
|
| 21 | + $where = 'id_trad='.(int) $id_trad; |
|
| 22 | 22 | $trouver_table = charger_fonction('trouver_table', 'base'); |
| 23 | 23 | $desc = $trouver_table($table_objet_sql); |
| 24 | 24 | if (isset($desc['field']['statut'])) { |
| 25 | 25 | $select .= ',statut'; |
| 26 | - $where .= ' AND statut!=' . sql_quote('poubelle'); |
|
| 26 | + $where .= ' AND statut!='.sql_quote('poubelle'); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | $rows = sql_allfetsel($select, $table_objet_sql, $where); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $checked = false; |
| 45 | 45 | $res = ''; |
| 46 | 46 | if (is_array($info) && $info['count'] > 0) { |
| 47 | - $res .= '<p>' . _T('info_selection_chemin_acces') . '</p>'; |
|
| 47 | + $res .= '<p>'._T('info_selection_chemin_acces').'</p>'; |
|
| 48 | 48 | $res .= '<ul>'; |
| 49 | 49 | $n = 0; |
| 50 | 50 | for ($i = 0; $i < $info['count']; $i++) { |
@@ -52,18 +52,18 @@ discard block |
||
| 52 | 52 | if (is_array($names)) { |
| 53 | 53 | for ($j = 0; $j < $names['count']; $j++) { |
| 54 | 54 | $n++; |
| 55 | - $res .= '<li><input name="base_ldap" value="' . spip_htmlspecialchars($names[$j]) . "\" type='radio' id='tab$n'"; |
|
| 55 | + $res .= '<li><input name="base_ldap" value="'.spip_htmlspecialchars($names[$j])."\" type='radio' id='tab$n'"; |
|
| 56 | 56 | if (!$checked) { |
| 57 | 57 | $res .= ' checked="checked"'; |
| 58 | 58 | $checked = true; |
| 59 | 59 | } |
| 60 | 60 | $res .= ' />'; |
| 61 | - $res .= "<label for='tab$n'>" . spip_htmlspecialchars($names[$j]) . "</label></li>\n"; |
|
| 61 | + $res .= "<label for='tab$n'>".spip_htmlspecialchars($names[$j])."</label></li>\n"; |
|
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | $res .= '</ul>'; |
| 66 | - $res .= _T('info_ou') . ' '; |
|
| 66 | + $res .= _T('info_ou').' '; |
|
| 67 | 67 | } |
| 68 | 68 | $res .= "<br />\n<input name=\"base_ldap\" value=\"\" type='radio' id='manuel'"; |
| 69 | 69 | if (!$checked) { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | $res .= ' />' |
| 75 | - . "\n<label for='manuel'>" . _T('entree_chemin_acces') . '</label> ' |
|
| 75 | + . "\n<label for='manuel'>"._T('entree_chemin_acces').'</label> ' |
|
| 76 | 76 | . "\n<fieldset>" |
| 77 | 77 | . "<input type='text' name='base_ldap_text' class='text' value=\"$base_ldap_text\" size='40' />" |
| 78 | 78 | . "\n</fieldset>" |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | if ($fail) { |
| 40 | 40 | echo info_etape(_T('info_chemin_acces_annuaire')), |
| 41 | 41 | info_progression_etape(3, 'etape_ldap', 'install/', true), |
| 42 | - "<div class='error'><p><b>" . _T('avis_operation_echec') . '</b></p><p>' . _T('avis_chemin_invalide_1'), |
|
| 43 | - ' (<tt>' . spip_htmlspecialchars($base_ldap) . '</tt>) ' . _T('avis_chemin_invalide_2') . '</p></div>'; |
|
| 42 | + "<div class='error'><p><b>"._T('avis_operation_echec').'</b></p><p>'._T('avis_chemin_invalide_1'), |
|
| 43 | + ' (<tt>'.spip_htmlspecialchars($base_ldap).'</tt>) '._T('avis_chemin_invalide_2').'</p></div>'; |
|
| 44 | 44 | } else { |
| 45 | 45 | info_etape(_T('info_reglage_ldap')); |
| 46 | 46 | echo info_progression_etape(4, 'etape_ldap', 'install/'); |
@@ -53,12 +53,12 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | $res = install_propager(['adresse_ldap', 'port_ldap', 'login_ldap', 'pass_ldap', 'protocole_ldap', 'tls_ldap']) |
| 55 | 55 | . "<input type='hidden' name='etape' value='ldap5' />" |
| 56 | - . "<input type='hidden' name='base_ldap' value='" . spip_htmlentities($base_ldap) . "' />" |
|
| 56 | + . "<input type='hidden' name='base_ldap' value='".spip_htmlentities($base_ldap)."' />" |
|
| 57 | 57 | . fieldset( |
| 58 | 58 | _T('info_statut_utilisateurs_1'), |
| 59 | 59 | [ |
| 60 | 60 | 'statut_ldap' => [ |
| 61 | - 'label' => _T('info_statut_utilisateurs_2') . '<br />', |
|
| 61 | + 'label' => _T('info_statut_utilisateurs_2').'<br />', |
|
| 62 | 62 | 'valeur' => $statut_ldap, |
| 63 | 63 | 'alternatives' => $statuts |
| 64 | 64 | ] |
@@ -75,9 +75,9 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | function liste_statuts_ldap() { |
| 77 | 77 | $recom = [ |
| 78 | - 'info_administrateurs' => ('<b>' . _T('info_administrateur_1') . '</b> ' . _T('info_administrateur_2') . '<br />'), |
|
| 79 | - 'info_redacteurs' => ('<b>' . _T('info_redacteur_1') . '</b> ' . _T('info_redacteur_2') . '<br />'), |
|
| 80 | - 'info_visiteurs' => ('<b>' . _T('info_visiteur_1') . '</b> ' . _T('info_visiteur_2') . '<br />') |
|
| 78 | + 'info_administrateurs' => ('<b>'._T('info_administrateur_1').'</b> '._T('info_administrateur_2').'<br />'), |
|
| 79 | + 'info_redacteurs' => ('<b>'._T('info_redacteur_1').'</b> '._T('info_redacteur_2').'<br />'), |
|
| 80 | + 'info_visiteurs' => ('<b>'._T('info_visiteur_1').'</b> '._T('info_visiteur_2').'<br />') |
|
| 81 | 81 | ]; |
| 82 | 82 | |
| 83 | 83 | $res = []; |
@@ -93,13 +93,13 @@ discard block |
||
| 93 | 93 | function install_ldap_correspondances() { |
| 94 | 94 | $champs = []; |
| 95 | 95 | foreach (is_array($GLOBALS['ldap_attributes']) ? $GLOBALS['ldap_attributes'] : [] as $champ => $v) { |
| 96 | - $nom = 'ldap_' . $champ; |
|
| 96 | + $nom = 'ldap_'.$champ; |
|
| 97 | 97 | $val = is_array($v) ? implode(',', $v) : (string) $v; |
| 98 | 98 | $champs[$nom] = [ |
| 99 | - 'label' => _T('ldap_correspondance', ['champ' => "<tt>$champ</tt>"]) . '<br />', |
|
| 99 | + 'label' => _T('ldap_correspondance', ['champ' => "<tt>$champ</tt>"]).'<br />', |
|
| 100 | 100 | 'valeur' => $val |
| 101 | 101 | ]; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - return $champs ? fieldset(_T('ldap_correspondance_1'), $champs, '', _T('ldap_correspondance_2') . '<br /><br />') : ''; |
|
| 104 | + return $champs ? fieldset(_T('ldap_correspondance_1'), $champs, '', _T('ldap_correspondance_2').'<br /><br />') : ''; |
|
| 105 | 105 | } |
@@ -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,19 +154,19 @@ 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') || $GLOBALS['table_prefix'] != 'spip') |
| 167 | - ? '<h3>' . _T('install_table_prefix_hebergeur') . ' <tt>' . $GLOBALS['table_prefix'] . '</tt>' . '</h3>' |
|
| 168 | - : '<fieldset><legend>' . _T('texte_choix_table_prefix') . "</legend>\n" |
|
| 169 | - . "<p><label for='table_prefix'>" . _T('info_table_prefix') . '</label></p><p>' |
|
| 167 | + ? '<h3>'._T('install_table_prefix_hebergeur').' <tt>'.$GLOBALS['table_prefix'].'</tt>'.'</h3>' |
|
| 168 | + : '<fieldset><legend>'._T('texte_choix_table_prefix')."</legend>\n" |
|
| 169 | + . "<p><label for='table_prefix'>"._T('info_table_prefix').'</label></p><p>' |
|
| 170 | 170 | . "\n<input type='text' id='tprefix' name='tprefix' class='text' value='" |
| 171 | 171 | . 'spip' # valeur par defaut |
| 172 | 172 | . "' 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)) { |
@@ -56,18 +56,18 @@ discard block |
||
| 56 | 56 | ldap_set_option($ldap_link, LDAP_OPT_PROTOCOL_VERSION, $protocole_ldap); |
| 57 | 57 | } |
| 58 | 58 | if ($tls && !ldap_start_tls($ldap_link)) { |
| 59 | - $erreur = 'ldap_start_tls(' . spip_htmlspecialchars($ldap_link) |
|
| 60 | - . ' ' . spip_htmlspecialchars($adresse_ldap) |
|
| 61 | - . ', ' . spip_htmlspecialchars($port_ldap) . ')'; |
|
| 59 | + $erreur = 'ldap_start_tls('.spip_htmlspecialchars($ldap_link) |
|
| 60 | + . ' '.spip_htmlspecialchars($adresse_ldap) |
|
| 61 | + . ', '.spip_htmlspecialchars($port_ldap).')'; |
|
| 62 | 62 | $ldap_link = false; |
| 63 | 63 | } |
| 64 | 64 | if ($ldap_link) { |
| 65 | 65 | $ldap_link = ldap_bind($ldap_link, $login_ldap, $pass_ldap); |
| 66 | - $erreur = "ldap_bind('" . spip_htmlspecialchars($ldap_link) |
|
| 67 | - . "', '" . spip_htmlspecialchars($login_ldap) |
|
| 68 | - . "', '" . spip_htmlspecialchars($pass_ldap) |
|
| 69 | - . "'): " . spip_htmlspecialchars($adresse_ldap) |
|
| 70 | - . ', ' . spip_htmlspecialchars($port_ldap); |
|
| 66 | + $erreur = "ldap_bind('".spip_htmlspecialchars($ldap_link) |
|
| 67 | + . "', '".spip_htmlspecialchars($login_ldap) |
|
| 68 | + . "', '".spip_htmlspecialchars($pass_ldap) |
|
| 69 | + . "'): ".spip_htmlspecialchars($adresse_ldap) |
|
| 70 | + . ', '.spip_htmlspecialchars($port_ldap); |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | |
@@ -75,22 +75,22 @@ discard block |
||
| 75 | 75 | echo info_etape( |
| 76 | 76 | _T('titre_connexion_ldap'), |
| 77 | 77 | info_progression_etape(2, 'etape_ldap', 'install/') |
| 78 | - ), _T('info_connexion_ldap_ok'); |
|
| 78 | + ), _T('info_connexion_ldap_ok'); |
|
| 79 | 79 | echo generer_form_ecrire('install', ( |
| 80 | 80 | "\n<input type='hidden' name='etape' value='ldap3' />" |
| 81 | - . "\n<input type='hidden' name='adresse_ldap' value=\"" . spip_htmlspecialchars($adresse_ldap) . '" />' |
|
| 82 | - . "\n<input type='hidden' name='port_ldap' value=\"" . spip_htmlspecialchars($port_ldap) . '" />' |
|
| 83 | - . "\n<input type='hidden' name='login_ldap' value=\"" . spip_htmlspecialchars($login_ldap) . '" />' |
|
| 84 | - . "\n<input type='hidden' name='pass_ldap' value=\"" . spip_htmlspecialchars($pass_ldap) . '" />' |
|
| 85 | - . "\n<input type='hidden' name='protocole_ldap' value=\"" . spip_htmlspecialchars($protocole_ldap) . '" />' |
|
| 86 | - . "\n<input type='hidden' name='tls_ldap' value=\"" . spip_htmlspecialchars($tls_ldap) . '" />' |
|
| 81 | + . "\n<input type='hidden' name='adresse_ldap' value=\"".spip_htmlspecialchars($adresse_ldap).'" />' |
|
| 82 | + . "\n<input type='hidden' name='port_ldap' value=\"".spip_htmlspecialchars($port_ldap).'" />' |
|
| 83 | + . "\n<input type='hidden' name='login_ldap' value=\"".spip_htmlspecialchars($login_ldap).'" />' |
|
| 84 | + . "\n<input type='hidden' name='pass_ldap' value=\"".spip_htmlspecialchars($pass_ldap).'" />' |
|
| 85 | + . "\n<input type='hidden' name='protocole_ldap' value=\"".spip_htmlspecialchars($protocole_ldap).'" />' |
|
| 86 | + . "\n<input type='hidden' name='tls_ldap' value=\"".spip_htmlspecialchars($tls_ldap).'" />' |
|
| 87 | 87 | . bouton_suivant())); |
| 88 | 88 | } else { |
| 89 | 89 | echo info_etape(_T('titre_connexion_ldap')), info_progression_etape(1, 'etape_ldap', 'install/', true), |
| 90 | - "<div class='error'><p>" . _T('avis_connexion_ldap_echec_1') . '</p>', |
|
| 91 | - '<p>' . _T('avis_connexion_ldap_echec_2') . |
|
| 92 | - "<br />\n" . _T('avis_connexion_ldap_echec_3') . |
|
| 93 | - '<br /><br />' . $erreur . '<b> ?</b></p></div>'; |
|
| 90 | + "<div class='error'><p>"._T('avis_connexion_ldap_echec_1').'</p>', |
|
| 91 | + '<p>'._T('avis_connexion_ldap_echec_2'). |
|
| 92 | + "<br />\n"._T('avis_connexion_ldap_echec_3'). |
|
| 93 | + '<br /><br />'.$erreur.'<b> ?</b></p></div>'; |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | echo $minipage->installFinPage(); |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | = spip_connect_db($adresse_db, $port, $login_db, $pass_db, '', $server_db); |
| 44 | 44 | |
| 45 | 45 | $GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']] |
| 46 | - = $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']]; |
|
| 46 | + = $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']]; |
|
| 47 | 47 | |
| 48 | 48 | $fquery = sql_serveur('query', $server_db); |
| 49 | 49 | if ($choix_db == 'new_spip') { |
@@ -53,13 +53,13 @@ discard block |
||
| 53 | 53 | if (!$ok) { |
| 54 | 54 | $re = "Impossible de creer la base $re"; |
| 55 | 55 | spip_log($re); |
| 56 | - return '<p>' . _T('avis_connexion_erreur_creer_base') . "</p><!--\n$re\n-->"; |
|
| 56 | + return '<p>'._T('avis_connexion_erreur_creer_base')."</p><!--\n$re\n-->"; |
|
| 57 | 57 | } |
| 58 | 58 | } else { |
| 59 | 59 | $re = "Le nom de la base doit correspondre a $re"; |
| 60 | 60 | spip_log($re); |
| 61 | 61 | |
| 62 | - return '<p>' . _T('avis_connexion_erreur_nom_base') . "</p><!--\n$re\n-->"; |
|
| 62 | + return '<p>'._T('avis_connexion_erreur_nom_base')."</p><!--\n$re\n-->"; |
|
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
@@ -70,14 +70,14 @@ discard block |
||
| 70 | 70 | = spip_connect_db($adresse_db, $port, $login_db, $pass_db, $sel_db, $server_db); |
| 71 | 71 | |
| 72 | 72 | $GLOBALS['connexions'][$server_db][$GLOBALS['spip_sql_version']] |
| 73 | - = $GLOBALS['spip_' . $server_db . '_functions_' . $GLOBALS['spip_sql_version']]; |
|
| 73 | + = $GLOBALS['spip_'.$server_db.'_functions_'.$GLOBALS['spip_sql_version']]; |
|
| 74 | 74 | |
| 75 | 75 | // Completer le tableau decrivant la connexion |
| 76 | 76 | |
| 77 | 77 | $GLOBALS['connexions'][$server_db]['prefixe'] = $table_prefix; |
| 78 | 78 | $GLOBALS['connexions'][$server_db]['db'] = $sel_db; |
| 79 | 79 | |
| 80 | - $old = sql_showbase($table_prefix . '_meta', $server_db); |
|
| 80 | + $old = sql_showbase($table_prefix.'_meta', $server_db); |
|
| 81 | 81 | if ($old) { |
| 82 | 82 | $old = sql_fetch($old, $server_db); |
| 83 | 83 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | $charset['charset']; |
| 97 | 97 | $charsetbase = $charset['charset']; |
| 98 | 98 | } else { |
| 99 | - spip_log(_DEFAULT_CHARSET . ' inconnu du serveur SQL'); |
|
| 99 | + spip_log(_DEFAULT_CHARSET.' inconnu du serveur SQL'); |
|
| 100 | 100 | $charsetbase = 'standard'; |
| 101 | 101 | } |
| 102 | 102 | spip_log("Creation des tables. Codage $charsetbase"); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | if ($r) { |
| 147 | 147 | $r = sql_fetch($r, $server_db); |
| 148 | 148 | } |
| 149 | - $version_installee = $r ? (double)$r['valeur'] : 0; |
|
| 149 | + $version_installee = $r ? (double) $r['valeur'] : 0; |
|
| 150 | 150 | if (!$version_installee || $GLOBALS['spip_version_base'] < $version_installee) { |
| 151 | 151 | $fupdateq( |
| 152 | 152 | 'spip_meta', |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | '', |
| 156 | 156 | $server_db |
| 157 | 157 | ); |
| 158 | - spip_log('nouvelle version installee: ' . $GLOBALS['spip_version_base']); |
|
| 158 | + spip_log('nouvelle version installee: '.$GLOBALS['spip_version_base']); |
|
| 159 | 159 | } |
| 160 | 160 | // eliminer la derniere operation d'admin mal terminee |
| 161 | 161 | // notamment la mise a jour |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | if ($chmod_db) { |
| 183 | 183 | install_fichier_connexion( |
| 184 | 184 | _FILE_CHMOD_TMP, |
| 185 | - "if (!defined('_SPIP_CHMOD')) define('_SPIP_CHMOD', " . sprintf('0%3o', $chmod_db) . ");\n" |
|
| 185 | + "if (!defined('_SPIP_CHMOD')) define('_SPIP_CHMOD', ".sprintf('0%3o', $chmod_db).");\n" |
|
| 186 | 186 | ); |
| 187 | 187 | } |
| 188 | 188 | |
@@ -245,16 +245,16 @@ discard block |
||
| 245 | 245 | |
| 246 | 246 | |
| 247 | 247 | function install_premier_auteur($email, $login, $nom, #[\SensitiveParameter] $pass, $hidden, $auteur_obligatoire) { |
| 248 | - return info_progression_etape(3, 'etape_', 'install/') . |
|
| 248 | + return info_progression_etape(3, 'etape_', 'install/'). |
|
| 249 | 249 | info_etape( |
| 250 | 250 | _T('info_informations_personnelles'), |
| 251 | - '<b>' . _T('texte_informations_personnelles_1') . '</b>' . |
|
| 252 | - aider('install5', true) . |
|
| 253 | - '<p>' . |
|
| 251 | + '<b>'._T('texte_informations_personnelles_1').'</b>'. |
|
| 252 | + aider('install5', true). |
|
| 253 | + '<p>'. |
|
| 254 | 254 | ($auteur_obligatoire ? |
| 255 | 255 | '' |
| 256 | 256 | : |
| 257 | - _T('texte_informations_personnelles_2') . ' ' . _T('info_laisser_champs_vides') |
|
| 257 | + _T('texte_informations_personnelles_2').' '._T('info_laisser_champs_vides') |
|
| 258 | 258 | ) |
| 259 | 259 | ) |
| 260 | 260 | . generer_form_ecrire('install', ( |
@@ -264,12 +264,12 @@ discard block |
||
| 264 | 264 | _T('info_identification_publique'), |
| 265 | 265 | [ |
| 266 | 266 | 'nom' => [ |
| 267 | - 'label' => '<b>' . _T('entree_signature') . "</b><br />\n" . _T('entree_nom_pseudo_1') . "\n", |
|
| 267 | + 'label' => '<b>'._T('entree_signature')."</b><br />\n"._T('entree_nom_pseudo_1')."\n", |
|
| 268 | 268 | 'valeur' => $nom, |
| 269 | 269 | 'required' => $auteur_obligatoire, |
| 270 | 270 | ], |
| 271 | 271 | 'email' => [ |
| 272 | - 'label' => '<b>' . _T('entree_adresse_email') . "</b>\n", |
|
| 272 | + 'label' => '<b>'._T('entree_adresse_email')."</b>\n", |
|
| 273 | 273 | 'valeur' => $email, |
| 274 | 274 | ] |
| 275 | 275 | ] |
@@ -279,23 +279,23 @@ discard block |
||
| 279 | 279 | _T('entree_identifiants_connexion'), |
| 280 | 280 | [ |
| 281 | 281 | 'login' => [ |
| 282 | - 'label' => '<b>' . _T('entree_login') . "</b><br />\n" . _T( |
|
| 282 | + 'label' => '<b>'._T('entree_login')."</b><br />\n"._T( |
|
| 283 | 283 | 'info_login_trop_court_car_pluriel', |
| 284 | 284 | ['nb' => _LOGIN_TROP_COURT] |
| 285 | - ) . "\n", |
|
| 285 | + )."\n", |
|
| 286 | 286 | 'valeur' => $login, |
| 287 | 287 | 'required' => $auteur_obligatoire, |
| 288 | 288 | ], |
| 289 | 289 | 'pass' => [ |
| 290 | - 'label' => '<b>' . _T('entree_mot_passe') . "</b><br />\n" . _T( |
|
| 290 | + 'label' => '<b>'._T('entree_mot_passe')."</b><br />\n"._T( |
|
| 291 | 291 | 'info_passe_trop_court_car_pluriel', |
| 292 | 292 | ['nb' => _PASS_LONGUEUR_MINI] |
| 293 | - ) . "\n", |
|
| 293 | + )."\n", |
|
| 294 | 294 | 'valeur' => $pass, |
| 295 | 295 | 'required' => $auteur_obligatoire, |
| 296 | 296 | ], |
| 297 | 297 | 'pass_verif' => [ |
| 298 | - 'label' => '<b>' . _T('info_confirmer_passe') . "</b><br />\n", |
|
| 298 | + 'label' => '<b>'._T('info_confirmer_passe')."</b><br />\n", |
|
| 299 | 299 | 'valeur' => $pass, |
| 300 | 300 | 'required' => $auteur_obligatoire, |
| 301 | 301 | ] |
@@ -339,9 +339,9 @@ discard block |
||
| 339 | 339 | |
| 340 | 340 | if ($res) { |
| 341 | 341 | $res = info_progression_etape(2, 'etape_', 'install/', true) |
| 342 | - . "<div class='error'><h3>" . _T('avis_operation_echec') . '</h3>' |
|
| 342 | + . "<div class='error'><h3>"._T('avis_operation_echec').'</h3>' |
|
| 343 | 343 | . $res |
| 344 | - . '<p>' . _T('texte_operation_echec') . '</p>' |
|
| 344 | + . '<p>'._T('texte_operation_echec').'</p>' |
|
| 345 | 345 | . '</div>'; |
| 346 | 346 | } |
| 347 | 347 | } else { |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | |
| 366 | 366 | $hidden = predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db) |
| 367 | 367 | . (defined('_INSTALL_NAME_DB') ? '' |
| 368 | - : "\n<input type='hidden' name='sel_db' value=\"" . spip_htmlspecialchars($sel_db) . '" />'); |
|
| 368 | + : "\n<input type='hidden' name='sel_db' value=\"".spip_htmlspecialchars($sel_db).'" />'); |
|
| 369 | 369 | |
| 370 | 370 | $auteur_obligatoire = ($ldap_present ? 0 : !sql_countsel('spip_auteurs', '', '', '', $server_db)); |
| 371 | 371 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | function generer_nom_fichier_cache($contexte, $page) { |
| 27 | 27 | $u = md5(var_export([$contexte, $page], true)); |
| 28 | 28 | |
| 29 | - return $u . '.cache'; |
|
| 29 | + return $u.'.cache'; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | else { |
| 60 | 60 | // en lecture on essaye pas de creer les repertoires, on va au plus vite |
| 61 | - $rep = _DIR_CACHE . "calcul/$d/"; |
|
| 61 | + $rep = _DIR_CACHE."calcul/$d/"; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - return $rep . $u . '.cache'; |
|
| 64 | + return $rep.$u.'.cache'; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | ); |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | - return crc32($GLOBALS['meta']['cache_signature'] . $page['texte']); |
|
| 116 | + return crc32($GLOBALS['meta']['cache_signature'].$page['texte']); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | // "cache sessionne" ; sa date indique la date de validite |
| 264 | 264 | // des caches sessionnes |
| 265 | 265 | if (!$tmp = lire_cache($chemin_cache)) { |
| 266 | - spip_log('Creation cache sessionne ' . $chemin_cache); |
|
| 266 | + spip_log('Creation cache sessionne '.$chemin_cache); |
|
| 267 | 267 | $tmp = [ |
| 268 | 268 | 'invalideurs' => ['session' => ''], |
| 269 | 269 | 'lastmodified' => $_SERVER['REQUEST_TIME'] |
@@ -289,8 +289,8 @@ discard block |
||
| 289 | 289 | // l'enregistrer, compresse ou non... |
| 290 | 290 | $ok = ecrire_cache($chemin_cache, $pagez); |
| 291 | 291 | |
| 292 | - spip_log((_IS_BOT ? 'Bot:' : '') . "Creation du cache $chemin_cache pour " |
|
| 293 | - . $page['entetes']['X-Spip-Cache'] . ' secondes' . ($ok ? '' : ' (erreur!)'), _LOG_INFO); |
|
| 292 | + spip_log((_IS_BOT ? 'Bot:' : '')."Creation du cache $chemin_cache pour " |
|
| 293 | + . $page['entetes']['X-Spip-Cache'].' secondes'.($ok ? '' : ' (erreur!)'), _LOG_INFO); |
|
| 294 | 294 | |
| 295 | 295 | // Inserer ses invalideurs |
| 296 | 296 | include_spip('inc/invalideur'); |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | function nettoyer_petit_cache($prefix, $duree = 300) { |
| 310 | 310 | // determiner le repertoire a purger : 'tmp/CACHE/rech/' |
| 311 | 311 | $dircache = sous_repertoire(_DIR_CACHE, $prefix); |
| 312 | - if (spip_touch($dircache . 'purger_' . $prefix, $duree, true)) { |
|
| 312 | + if (spip_touch($dircache.'purger_'.$prefix, $duree, true)) { |
|
| 313 | 313 | foreach (preg_files($dircache, '[.]txt$') as $f) { |
| 314 | 314 | if ($_SERVER['REQUEST_TIME'] - (@file_exists($f) ? @filemtime($f) : 0) > $duree) { |
| 315 | 315 | spip_unlink($f); |
@@ -402,9 +402,9 @@ discard block |
||
| 402 | 402 | include_spip('inc/invalideur'); |
| 403 | 403 | retire_caches($chemin_cache); |
| 404 | 404 | # API invalideur inutile |
| 405 | - supprimer_fichier(_DIR_CACHE . $chemin_cache); |
|
| 405 | + supprimer_fichier(_DIR_CACHE.$chemin_cache); |
|
| 406 | 406 | if (isset($chemin_cache_session) && $chemin_cache_session) { |
| 407 | - supprimer_fichier(_DIR_CACHE . $chemin_cache_session); |
|
| 407 | + supprimer_fichier(_DIR_CACHE.$chemin_cache_session); |
|
| 408 | 408 | } |
| 409 | 409 | } |
| 410 | 410 | |
@@ -420,9 +420,9 @@ discard block |
||
| 420 | 420 | $page = ['contexte_implicite' => $contexte_implicite]; // ignorer le cache deja lu |
| 421 | 421 | include_spip('inc/invalideur'); |
| 422 | 422 | retire_caches($chemin_cache); # API invalideur inutile |
| 423 | - supprimer_fichier(_DIR_CACHE . $chemin_cache); |
|
| 423 | + supprimer_fichier(_DIR_CACHE.$chemin_cache); |
|
| 424 | 424 | if (isset($chemin_cache_session) && $chemin_cache_session) { |
| 425 | - supprimer_fichier(_DIR_CACHE . $chemin_cache_session); |
|
| 425 | + supprimer_fichier(_DIR_CACHE.$chemin_cache_session); |
|
| 426 | 426 | } |
| 427 | 427 | } |
| 428 | 428 | |