@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | * @package SPIP\Core\Langue |
| 17 | 17 | **/ |
| 18 | 18 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 19 | - return; |
|
| 19 | + return; |
|
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | include_spip('inc/cookie'); |
@@ -30,21 +30,21 @@ discard block |
||
| 30 | 30 | * @return void |
| 31 | 31 | */ |
| 32 | 32 | function action_converser_dist() { |
| 33 | - $update_session = false; |
|
| 34 | - if (_request('arg') and spip_connect()) { |
|
| 35 | - $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 36 | - $securiser_action(); |
|
| 37 | - $update_session = true; |
|
| 38 | - } |
|
| 33 | + $update_session = false; |
|
| 34 | + if (_request('arg') and spip_connect()) { |
|
| 35 | + $securiser_action = charger_fonction('securiser_action', 'inc'); |
|
| 36 | + $securiser_action(); |
|
| 37 | + $update_session = true; |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - $lang = action_converser_changer_langue($update_session); |
|
| 41 | - $redirect = rawurldecode(_request('redirect')); |
|
| 40 | + $lang = action_converser_changer_langue($update_session); |
|
| 41 | + $redirect = rawurldecode(_request('redirect')); |
|
| 42 | 42 | |
| 43 | - if (!$redirect) { |
|
| 44 | - $redirect = _DIR_RESTREINT_ABS; |
|
| 45 | - } |
|
| 46 | - $redirect = parametre_url($redirect, 'lang', $lang, '&'); |
|
| 47 | - redirige_par_entete($redirect, true); |
|
| 43 | + if (!$redirect) { |
|
| 44 | + $redirect = _DIR_RESTREINT_ABS; |
|
| 45 | + } |
|
| 46 | + $redirect = parametre_url($redirect, 'lang', $lang, '&'); |
|
| 47 | + redirige_par_entete($redirect, true); |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
@@ -56,23 +56,23 @@ discard block |
||
| 56 | 56 | * @return string |
| 57 | 57 | */ |
| 58 | 58 | function action_converser_changer_langue($update_session) { |
| 59 | - if ($lang = _request('var_lang')) { |
|
| 60 | - action_converser_post($lang); |
|
| 61 | - } elseif ($lang = _request('var_lang_ecrire')) { |
|
| 62 | - if ($update_session) { |
|
| 63 | - sql_updateq('spip_auteurs', ['lang' => $lang], 'id_auteur = ' . $GLOBALS['visiteur_session']['id_auteur']); |
|
| 64 | - $GLOBALS['visiteur_session']['lang'] = $lang; |
|
| 65 | - $session = charger_fonction('session', 'inc'); |
|
| 66 | - if ($spip_session = $session($GLOBALS['visiteur_session'])) { |
|
| 67 | - spip_setcookie('spip_session', $spip_session, [ |
|
| 68 | - 'expires' => time() + 3600 * 24 * 14 |
|
| 69 | - ]); |
|
| 70 | - } |
|
| 71 | - } |
|
| 72 | - action_converser_post($lang, true); |
|
| 73 | - } |
|
| 59 | + if ($lang = _request('var_lang')) { |
|
| 60 | + action_converser_post($lang); |
|
| 61 | + } elseif ($lang = _request('var_lang_ecrire')) { |
|
| 62 | + if ($update_session) { |
|
| 63 | + sql_updateq('spip_auteurs', ['lang' => $lang], 'id_auteur = ' . $GLOBALS['visiteur_session']['id_auteur']); |
|
| 64 | + $GLOBALS['visiteur_session']['lang'] = $lang; |
|
| 65 | + $session = charger_fonction('session', 'inc'); |
|
| 66 | + if ($spip_session = $session($GLOBALS['visiteur_session'])) { |
|
| 67 | + spip_setcookie('spip_session', $spip_session, [ |
|
| 68 | + 'expires' => time() + 3600 * 24 * 14 |
|
| 69 | + ]); |
|
| 70 | + } |
|
| 71 | + } |
|
| 72 | + action_converser_post($lang, true); |
|
| 73 | + } |
|
| 74 | 74 | |
| 75 | - return $lang; |
|
| 75 | + return $lang; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
@@ -83,17 +83,17 @@ discard block |
||
| 83 | 83 | * @return void |
| 84 | 84 | */ |
| 85 | 85 | function action_converser_post($lang, $ecrire = false) { |
| 86 | - if ($lang) { |
|
| 87 | - include_spip('inc/lang'); |
|
| 88 | - if (changer_langue($lang)) { |
|
| 89 | - spip_setcookie('spip_lang', $_COOKIE['spip_lang'] = $lang, [ |
|
| 90 | - 'expires' => time() + 365 * 24 * 3600 |
|
| 91 | - ]); |
|
| 92 | - if ($ecrire) { |
|
| 93 | - spip_setcookie('spip_lang_ecrire', $_COOKIE['spip_lang_ecrire'] = $lang, [ |
|
| 94 | - 'expires' => time() + 365 * 24 * 3600 |
|
| 95 | - ]); |
|
| 96 | - } |
|
| 97 | - } |
|
| 98 | - } |
|
| 86 | + if ($lang) { |
|
| 87 | + include_spip('inc/lang'); |
|
| 88 | + if (changer_langue($lang)) { |
|
| 89 | + spip_setcookie('spip_lang', $_COOKIE['spip_lang'] = $lang, [ |
|
| 90 | + 'expires' => time() + 365 * 24 * 3600 |
|
| 91 | + ]); |
|
| 92 | + if ($ecrire) { |
|
| 93 | + spip_setcookie('spip_lang_ecrire', $_COOKIE['spip_lang_ecrire'] = $lang, [ |
|
| 94 | + 'expires' => time() + 365 * 24 * 3600 |
|
| 95 | + ]); |
|
| 96 | + } |
|
| 97 | + } |
|
| 98 | + } |
|
| 99 | 99 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | */ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | include_spip('inc/cookie'); |
@@ -34,73 +34,73 @@ discard block |
||
| 34 | 34 | * |
| 35 | 35 | */ |
| 36 | 36 | function action_logout_dist() { |
| 37 | - $logout = _request('logout'); |
|
| 38 | - $url = securiser_redirect_action(_request('url')); |
|
| 39 | - // cas particulier, logout dans l'espace public |
|
| 40 | - if ($logout == 'public' and !$url) { |
|
| 41 | - $url = url_de_base(); |
|
| 42 | - } |
|
| 37 | + $logout = _request('logout'); |
|
| 38 | + $url = securiser_redirect_action(_request('url')); |
|
| 39 | + // cas particulier, logout dans l'espace public |
|
| 40 | + if ($logout == 'public' and !$url) { |
|
| 41 | + $url = url_de_base(); |
|
| 42 | + } |
|
| 43 | 43 | |
| 44 | - // seul le loge peut se deloger (mais id_auteur peut valoir 0 apres une restauration avortee) |
|
| 45 | - if ( |
|
| 46 | - isset($GLOBALS['visiteur_session']['id_auteur']) |
|
| 47 | - and is_numeric($GLOBALS['visiteur_session']['id_auteur']) |
|
| 48 | - // des sessions anonymes avec id_auteur=0 existent, mais elle n'ont pas de statut : double check |
|
| 49 | - and isset($GLOBALS['visiteur_session']['statut']) |
|
| 50 | - ) { |
|
| 51 | - // il faut un jeton pour fermer la session (eviter les CSRF) |
|
| 52 | - if ( |
|
| 53 | - !$jeton = _request('jeton') |
|
| 54 | - or !verifier_jeton_logout($jeton, $GLOBALS['visiteur_session']) |
|
| 55 | - ) { |
|
| 56 | - $jeton = generer_jeton_logout($GLOBALS['visiteur_session']); |
|
| 57 | - $action = generer_url_action('logout', "jeton=$jeton"); |
|
| 58 | - $action = parametre_url($action, 'logout', _request('logout')); |
|
| 59 | - $action = parametre_url($action, 'url', _request('url')); |
|
| 60 | - include_spip('inc/minipres'); |
|
| 61 | - include_spip('inc/filtres'); |
|
| 62 | - $texte = bouton_action(_T('spip:icone_deconnecter'), $action); |
|
| 63 | - $texte = "<div class='boutons'>$texte</div>"; |
|
| 64 | - $texte .= '<script type="text/javascript">document.write("<style>body{visibility:hidden;}</style>");window.document.forms[0].submit();</script>'; |
|
| 65 | - $res = minipres(_T('spip:icone_deconnecter'), $texte, ['all_inline' => true]); |
|
| 66 | - echo $res; |
|
| 44 | + // seul le loge peut se deloger (mais id_auteur peut valoir 0 apres une restauration avortee) |
|
| 45 | + if ( |
|
| 46 | + isset($GLOBALS['visiteur_session']['id_auteur']) |
|
| 47 | + and is_numeric($GLOBALS['visiteur_session']['id_auteur']) |
|
| 48 | + // des sessions anonymes avec id_auteur=0 existent, mais elle n'ont pas de statut : double check |
|
| 49 | + and isset($GLOBALS['visiteur_session']['statut']) |
|
| 50 | + ) { |
|
| 51 | + // il faut un jeton pour fermer la session (eviter les CSRF) |
|
| 52 | + if ( |
|
| 53 | + !$jeton = _request('jeton') |
|
| 54 | + or !verifier_jeton_logout($jeton, $GLOBALS['visiteur_session']) |
|
| 55 | + ) { |
|
| 56 | + $jeton = generer_jeton_logout($GLOBALS['visiteur_session']); |
|
| 57 | + $action = generer_url_action('logout', "jeton=$jeton"); |
|
| 58 | + $action = parametre_url($action, 'logout', _request('logout')); |
|
| 59 | + $action = parametre_url($action, 'url', _request('url')); |
|
| 60 | + include_spip('inc/minipres'); |
|
| 61 | + include_spip('inc/filtres'); |
|
| 62 | + $texte = bouton_action(_T('spip:icone_deconnecter'), $action); |
|
| 63 | + $texte = "<div class='boutons'>$texte</div>"; |
|
| 64 | + $texte .= '<script type="text/javascript">document.write("<style>body{visibility:hidden;}</style>");window.document.forms[0].submit();</script>'; |
|
| 65 | + $res = minipres(_T('spip:icone_deconnecter'), $texte, ['all_inline' => true]); |
|
| 66 | + echo $res; |
|
| 67 | 67 | |
| 68 | - return; |
|
| 69 | - } |
|
| 68 | + return; |
|
| 69 | + } |
|
| 70 | 70 | |
| 71 | - include_spip('inc/auth'); |
|
| 72 | - auth_trace($GLOBALS['visiteur_session'], '0000-00-00 00:00:00'); |
|
| 73 | - // le logout explicite vaut destruction de toutes les sessions |
|
| 74 | - if (isset($_COOKIE['spip_session'])) { |
|
| 75 | - $session = charger_fonction('session', 'inc'); |
|
| 76 | - $session($GLOBALS['visiteur_session']['id_auteur']); |
|
| 77 | - spip_setcookie('spip_session', $_COOKIE['spip_session'], [ |
|
| 78 | - 'expires' => time() - 3600 |
|
| 79 | - ]); |
|
| 80 | - } |
|
| 81 | - // si authentification http, et que la personne est loge, |
|
| 82 | - // pour se deconnecter, il faut proposer un nouveau formulaire de connexion http |
|
| 83 | - if ( |
|
| 84 | - isset($_SERVER['PHP_AUTH_USER']) |
|
| 85 | - and !$GLOBALS['ignore_auth_http'] |
|
| 86 | - and $GLOBALS['auth_can_disconnect'] |
|
| 87 | - ) { |
|
| 88 | - ask_php_auth( |
|
| 89 | - _T('login_deconnexion_ok'), |
|
| 90 | - _T('login_verifiez_navigateur'), |
|
| 91 | - _T('login_retour_public'), |
|
| 92 | - 'redirect=' . _DIR_RESTREINT_ABS, |
|
| 93 | - _T('login_test_navigateur'), |
|
| 94 | - true |
|
| 95 | - ); |
|
| 96 | - } |
|
| 97 | - } |
|
| 71 | + include_spip('inc/auth'); |
|
| 72 | + auth_trace($GLOBALS['visiteur_session'], '0000-00-00 00:00:00'); |
|
| 73 | + // le logout explicite vaut destruction de toutes les sessions |
|
| 74 | + if (isset($_COOKIE['spip_session'])) { |
|
| 75 | + $session = charger_fonction('session', 'inc'); |
|
| 76 | + $session($GLOBALS['visiteur_session']['id_auteur']); |
|
| 77 | + spip_setcookie('spip_session', $_COOKIE['spip_session'], [ |
|
| 78 | + 'expires' => time() - 3600 |
|
| 79 | + ]); |
|
| 80 | + } |
|
| 81 | + // si authentification http, et que la personne est loge, |
|
| 82 | + // pour se deconnecter, il faut proposer un nouveau formulaire de connexion http |
|
| 83 | + if ( |
|
| 84 | + isset($_SERVER['PHP_AUTH_USER']) |
|
| 85 | + and !$GLOBALS['ignore_auth_http'] |
|
| 86 | + and $GLOBALS['auth_can_disconnect'] |
|
| 87 | + ) { |
|
| 88 | + ask_php_auth( |
|
| 89 | + _T('login_deconnexion_ok'), |
|
| 90 | + _T('login_verifiez_navigateur'), |
|
| 91 | + _T('login_retour_public'), |
|
| 92 | + 'redirect=' . _DIR_RESTREINT_ABS, |
|
| 93 | + _T('login_test_navigateur'), |
|
| 94 | + true |
|
| 95 | + ); |
|
| 96 | + } |
|
| 97 | + } |
|
| 98 | 98 | |
| 99 | - // Rediriger en contrant le cache navigateur (Safari3) |
|
| 100 | - include_spip('inc/headers'); |
|
| 101 | - redirige_par_entete($url |
|
| 102 | - ? parametre_url($url, 'var_hasard', uniqid(random_int(0, mt_getrandmax())), '&') |
|
| 103 | - : generer_url_public('login')); |
|
| 99 | + // Rediriger en contrant le cache navigateur (Safari3) |
|
| 100 | + include_spip('inc/headers'); |
|
| 101 | + redirige_par_entete($url |
|
| 102 | + ? parametre_url($url, 'var_hasard', uniqid(random_int(0, mt_getrandmax())), '&') |
|
| 103 | + : generer_url_public('login')); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
@@ -111,17 +111,17 @@ discard block |
||
| 111 | 111 | * @return string |
| 112 | 112 | */ |
| 113 | 113 | function generer_jeton_logout($session, $alea = null) { |
| 114 | - if (is_null($alea)) { |
|
| 115 | - include_spip('inc/acces'); |
|
| 116 | - $alea = charger_aleas(); |
|
| 117 | - } |
|
| 114 | + if (is_null($alea)) { |
|
| 115 | + include_spip('inc/acces'); |
|
| 116 | + $alea = charger_aleas(); |
|
| 117 | + } |
|
| 118 | 118 | |
| 119 | - $jeton = md5($session['date_session'] |
|
| 120 | - . $session['id_auteur'] |
|
| 121 | - . $session['statut'] |
|
| 122 | - . $alea); |
|
| 119 | + $jeton = md5($session['date_session'] |
|
| 120 | + . $session['id_auteur'] |
|
| 121 | + . $session['statut'] |
|
| 122 | + . $alea); |
|
| 123 | 123 | |
| 124 | - return $jeton; |
|
| 124 | + return $jeton; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |
@@ -135,13 +135,13 @@ discard block |
||
| 135 | 135 | * @return bool |
| 136 | 136 | */ |
| 137 | 137 | function verifier_jeton_logout($jeton, $session) { |
| 138 | - if (generer_jeton_logout($session) === $jeton) { |
|
| 139 | - return true; |
|
| 140 | - } |
|
| 138 | + if (generer_jeton_logout($session) === $jeton) { |
|
| 139 | + return true; |
|
| 140 | + } |
|
| 141 | 141 | |
| 142 | - if (generer_jeton_logout($session, $GLOBALS['meta']['alea_ephemere_ancien']) === $jeton) { |
|
| 143 | - return true; |
|
| 144 | - } |
|
| 142 | + if (generer_jeton_logout($session, $GLOBALS['meta']['alea_ephemere_ancien']) === $jeton) { |
|
| 143 | + return true; |
|
| 144 | + } |
|
| 145 | 145 | |
| 146 | - return false; |
|
| 146 | + return false; |
|
| 147 | 147 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -31,43 +31,43 @@ discard block |
||
| 31 | 31 | * @return string |
| 32 | 32 | */ |
| 33 | 33 | function action_instituer_langue_objet_dist($objet, $id, $id_rubrique, $changer_lang, $serveur = '') { |
| 34 | - if ($changer_lang) { |
|
| 35 | - $table_objet_sql = table_objet_sql($objet); |
|
| 36 | - $id_table_objet = id_table_objet($objet); |
|
| 37 | - $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 38 | - $desc = $trouver_table($table_objet_sql, $serveur); |
|
| 34 | + if ($changer_lang) { |
|
| 35 | + $table_objet_sql = table_objet_sql($objet); |
|
| 36 | + $id_table_objet = id_table_objet($objet); |
|
| 37 | + $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 38 | + $desc = $trouver_table($table_objet_sql, $serveur); |
|
| 39 | 39 | |
| 40 | - $set = []; |
|
| 41 | - if (isset($desc['field']['langue_choisie'])) { |
|
| 42 | - $set['langue_choisie'] = 'oui'; |
|
| 43 | - } |
|
| 40 | + $set = []; |
|
| 41 | + if (isset($desc['field']['langue_choisie'])) { |
|
| 42 | + $set['langue_choisie'] = 'oui'; |
|
| 43 | + } |
|
| 44 | 44 | |
| 45 | - if ($changer_lang != 'herit') { |
|
| 46 | - $set['lang'] = $changer_lang; |
|
| 47 | - sql_updateq($table_objet_sql, $set, "$id_table_objet=" . intval($id), [], $serveur); |
|
| 48 | - include_spip('inc/rubriques'); // pour calculer_langues_rubriques et calculer_langues_utilisees |
|
| 49 | - if ($table_objet_sql == 'spip_rubriques') { |
|
| 50 | - calculer_langues_rubriques(); |
|
| 51 | - } |
|
| 52 | - $langues = calculer_langues_utilisees($serveur); |
|
| 53 | - ecrire_meta('langues_utilisees', $langues); |
|
| 54 | - } else { |
|
| 55 | - $langue_parent = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 56 | - if (!$langue_parent) { |
|
| 57 | - $langue_parent = $GLOBALS['meta']['langue_site']; |
|
| 58 | - } |
|
| 59 | - $changer_lang = $langue_parent; |
|
| 60 | - $set['lang'] = $changer_lang; |
|
| 61 | - if (isset($set['langue_choisie'])) { |
|
| 62 | - $set['langue_choisie'] = 'non'; |
|
| 63 | - } |
|
| 64 | - sql_updateq($table_objet_sql, $set, "$id_table_objet=" . intval($id), [], $serveur); |
|
| 65 | - if ($table_objet_sql == 'spip_rubriques') { |
|
| 66 | - include_spip('inc/rubriques'); |
|
| 67 | - calculer_langues_rubriques(); |
|
| 68 | - } |
|
| 69 | - } |
|
| 70 | - } |
|
| 45 | + if ($changer_lang != 'herit') { |
|
| 46 | + $set['lang'] = $changer_lang; |
|
| 47 | + sql_updateq($table_objet_sql, $set, "$id_table_objet=" . intval($id), [], $serveur); |
|
| 48 | + include_spip('inc/rubriques'); // pour calculer_langues_rubriques et calculer_langues_utilisees |
|
| 49 | + if ($table_objet_sql == 'spip_rubriques') { |
|
| 50 | + calculer_langues_rubriques(); |
|
| 51 | + } |
|
| 52 | + $langues = calculer_langues_utilisees($serveur); |
|
| 53 | + ecrire_meta('langues_utilisees', $langues); |
|
| 54 | + } else { |
|
| 55 | + $langue_parent = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 56 | + if (!$langue_parent) { |
|
| 57 | + $langue_parent = $GLOBALS['meta']['langue_site']; |
|
| 58 | + } |
|
| 59 | + $changer_lang = $langue_parent; |
|
| 60 | + $set['lang'] = $changer_lang; |
|
| 61 | + if (isset($set['langue_choisie'])) { |
|
| 62 | + $set['langue_choisie'] = 'non'; |
|
| 63 | + } |
|
| 64 | + sql_updateq($table_objet_sql, $set, "$id_table_objet=" . intval($id), [], $serveur); |
|
| 65 | + if ($table_objet_sql == 'spip_rubriques') { |
|
| 66 | + include_spip('inc/rubriques'); |
|
| 67 | + calculer_langues_rubriques(); |
|
| 68 | + } |
|
| 69 | + } |
|
| 70 | + } |
|
| 71 | 71 | |
| 72 | - return $changer_lang; |
|
| 72 | + return $changer_lang; |
|
| 73 | 73 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | 27 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 28 | - return; |
|
| 28 | + return; |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** Version de l'API SQL */ |
@@ -45,39 +45,39 @@ discard block |
||
| 45 | 45 | * contexte de l'erreur |
| 46 | 46 | **/ |
| 47 | 47 | function sql_error_backtrace($compil_info = false) { |
| 48 | - $trace = debug_backtrace(); |
|
| 49 | - $caller = array_shift($trace); |
|
| 50 | - while (count($trace) and (empty($trace[0]['file']) or $trace[0]['file'] === $caller['file'] or $trace[0]['file'] === __FILE__)) { |
|
| 51 | - array_shift($trace); |
|
| 52 | - } |
|
| 53 | - |
|
| 54 | - if ($compil_info) { |
|
| 55 | - $contexte_compil = [ |
|
| 56 | - $trace[0]['file'],// sourcefile |
|
| 57 | - '', //nom |
|
| 58 | - (isset($trace[1]) ? $trace[1]['function'] . "(){\n" : '') |
|
| 59 | - . $trace[0]['function'] . '();' |
|
| 60 | - . (isset($trace[1]) ? "\n}" : ''), //id_boucle |
|
| 61 | - $trace[0]['line'], // ligne |
|
| 62 | - $GLOBALS['spip_lang'], // lang |
|
| 63 | - ]; |
|
| 64 | - |
|
| 65 | - return $contexte_compil; |
|
| 66 | - } |
|
| 67 | - |
|
| 68 | - $message = count($trace) ? $trace[0]['file'] . ' L' . $trace[0]['line'] : ''; |
|
| 69 | - $f = []; |
|
| 70 | - while (count($trace) and $t = array_shift($trace)) { |
|
| 71 | - if (in_array($t['function'], ['include_once', 'include_spip', 'find_in_path'])) { |
|
| 72 | - break; |
|
| 73 | - } |
|
| 74 | - $f[] = $t['function']; |
|
| 75 | - } |
|
| 76 | - if (count($f)) { |
|
| 77 | - $message .= ' [' . implode('(),', $f) . '()]'; |
|
| 78 | - } |
|
| 79 | - |
|
| 80 | - return $message; |
|
| 48 | + $trace = debug_backtrace(); |
|
| 49 | + $caller = array_shift($trace); |
|
| 50 | + while (count($trace) and (empty($trace[0]['file']) or $trace[0]['file'] === $caller['file'] or $trace[0]['file'] === __FILE__)) { |
|
| 51 | + array_shift($trace); |
|
| 52 | + } |
|
| 53 | + |
|
| 54 | + if ($compil_info) { |
|
| 55 | + $contexte_compil = [ |
|
| 56 | + $trace[0]['file'],// sourcefile |
|
| 57 | + '', //nom |
|
| 58 | + (isset($trace[1]) ? $trace[1]['function'] . "(){\n" : '') |
|
| 59 | + . $trace[0]['function'] . '();' |
|
| 60 | + . (isset($trace[1]) ? "\n}" : ''), //id_boucle |
|
| 61 | + $trace[0]['line'], // ligne |
|
| 62 | + $GLOBALS['spip_lang'], // lang |
|
| 63 | + ]; |
|
| 64 | + |
|
| 65 | + return $contexte_compil; |
|
| 66 | + } |
|
| 67 | + |
|
| 68 | + $message = count($trace) ? $trace[0]['file'] . ' L' . $trace[0]['line'] : ''; |
|
| 69 | + $f = []; |
|
| 70 | + while (count($trace) and $t = array_shift($trace)) { |
|
| 71 | + if (in_array($t['function'], ['include_once', 'include_spip', 'find_in_path'])) { |
|
| 72 | + break; |
|
| 73 | + } |
|
| 74 | + $f[] = $t['function']; |
|
| 75 | + } |
|
| 76 | + if (count($f)) { |
|
| 77 | + $message .= ' [' . implode('(),', $f) . '()]'; |
|
| 78 | + } |
|
| 79 | + |
|
| 80 | + return $message; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | |
@@ -102,16 +102,16 @@ discard block |
||
| 102 | 102 | * |
| 103 | 103 | **/ |
| 104 | 104 | function sql_serveur($ins_sql = '', $serveur = '', $continue = false) { |
| 105 | - static $sql_serveur = []; |
|
| 106 | - if (!isset($sql_serveur[$serveur][$ins_sql])) { |
|
| 107 | - $f = spip_connect_sql(\SQL_ABSTRACT_VERSION, $ins_sql, $serveur, $continue); |
|
| 108 | - if (!is_string($f) or !$f) { |
|
| 109 | - return $f; |
|
| 110 | - } |
|
| 111 | - $sql_serveur[$serveur][$ins_sql] = $f; |
|
| 112 | - } |
|
| 113 | - |
|
| 114 | - return $sql_serveur[$serveur][$ins_sql]; |
|
| 105 | + static $sql_serveur = []; |
|
| 106 | + if (!isset($sql_serveur[$serveur][$ins_sql])) { |
|
| 107 | + $f = spip_connect_sql(\SQL_ABSTRACT_VERSION, $ins_sql, $serveur, $continue); |
|
| 108 | + if (!is_string($f) or !$f) { |
|
| 109 | + return $f; |
|
| 110 | + } |
|
| 111 | + $sql_serveur[$serveur][$ins_sql] = $f; |
|
| 112 | + } |
|
| 113 | + |
|
| 114 | + return $sql_serveur[$serveur][$ins_sql]; |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -133,23 +133,23 @@ discard block |
||
| 133 | 133 | * Retourne le nom du charset si effectivement trouvé, sinon false. |
| 134 | 134 | **/ |
| 135 | 135 | function sql_get_charset($charset, $serveur = '', $option = true) { |
| 136 | - // le nom http du charset differe parfois du nom SQL utf-8 ==> utf8 etc. |
|
| 137 | - $desc = sql_serveur('', $serveur, true); |
|
| 138 | - $desc = $desc[\SQL_ABSTRACT_VERSION]; |
|
| 139 | - $c = $desc['charsets'][$charset]; |
|
| 140 | - if ($c) { |
|
| 141 | - if (function_exists($f = @$desc['get_charset'])) { |
|
| 142 | - if ($f($c, $serveur, $option !== false)) { |
|
| 143 | - return $c; |
|
| 144 | - } |
|
| 145 | - } |
|
| 146 | - } |
|
| 147 | - spip_log( |
|
| 148 | - "SPIP ne connait pas les Charsets disponibles sur le serveur $serveur. Le serveur choisira seul.", |
|
| 149 | - _LOG_AVERTISSEMENT |
|
| 150 | - ); |
|
| 151 | - |
|
| 152 | - return false; |
|
| 136 | + // le nom http du charset differe parfois du nom SQL utf-8 ==> utf8 etc. |
|
| 137 | + $desc = sql_serveur('', $serveur, true); |
|
| 138 | + $desc = $desc[\SQL_ABSTRACT_VERSION]; |
|
| 139 | + $c = $desc['charsets'][$charset]; |
|
| 140 | + if ($c) { |
|
| 141 | + if (function_exists($f = @$desc['get_charset'])) { |
|
| 142 | + if ($f($c, $serveur, $option !== false)) { |
|
| 143 | + return $c; |
|
| 144 | + } |
|
| 145 | + } |
|
| 146 | + } |
|
| 147 | + spip_log( |
|
| 148 | + "SPIP ne connait pas les Charsets disponibles sur le serveur $serveur. Le serveur choisira seul.", |
|
| 149 | + _LOG_AVERTISSEMENT |
|
| 150 | + ); |
|
| 151 | + |
|
| 152 | + return false; |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | |
@@ -175,12 +175,12 @@ discard block |
||
| 175 | 175 | * Retourne true si elle reussie. |
| 176 | 176 | **/ |
| 177 | 177 | function sql_set_charset($charset, $serveur = '', $option = true) { |
| 178 | - $f = sql_serveur('set_charset', $serveur, $option === 'continue' or $option === false); |
|
| 179 | - if (!is_string($f) or !$f) { |
|
| 180 | - return false; |
|
| 181 | - } |
|
| 178 | + $f = sql_serveur('set_charset', $serveur, $option === 'continue' or $option === false); |
|
| 179 | + if (!is_string($f) or !$f) { |
|
| 180 | + return false; |
|
| 181 | + } |
|
| 182 | 182 | |
| 183 | - return $f($charset, $serveur, $option !== false); |
|
| 183 | + return $f($charset, $serveur, $option !== false); |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | |
@@ -231,59 +231,59 @@ discard block |
||
| 231 | 231 | * |
| 232 | 232 | **/ |
| 233 | 233 | function sql_select( |
| 234 | - $select = [], |
|
| 235 | - $from = [], |
|
| 236 | - $where = [], |
|
| 237 | - $groupby = [], |
|
| 238 | - $orderby = [], |
|
| 239 | - $limit = '', |
|
| 240 | - $having = [], |
|
| 241 | - $serveur = '', |
|
| 242 | - $option = true |
|
| 234 | + $select = [], |
|
| 235 | + $from = [], |
|
| 236 | + $where = [], |
|
| 237 | + $groupby = [], |
|
| 238 | + $orderby = [], |
|
| 239 | + $limit = '', |
|
| 240 | + $having = [], |
|
| 241 | + $serveur = '', |
|
| 242 | + $option = true |
|
| 243 | 243 | ) { |
| 244 | - $f = sql_serveur('select', $serveur, $option === 'continue' or $option === false); |
|
| 245 | - if (!is_string($f) or !$f) { |
|
| 246 | - return false; |
|
| 247 | - } |
|
| 248 | - |
|
| 249 | - $debug = (defined('_VAR_MODE') and _VAR_MODE == 'debug'); |
|
| 250 | - if (($option !== false) and !$debug) { |
|
| 251 | - $res = $f( |
|
| 252 | - $select, |
|
| 253 | - $from, |
|
| 254 | - $where, |
|
| 255 | - $groupby, |
|
| 256 | - $orderby, |
|
| 257 | - $limit, |
|
| 258 | - $having, |
|
| 259 | - $serveur, |
|
| 260 | - is_array($option) ? true : $option |
|
| 261 | - ); |
|
| 262 | - } else { |
|
| 263 | - $query = $f($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, false); |
|
| 264 | - if (!$option) { |
|
| 265 | - return $query; |
|
| 266 | - } |
|
| 267 | - // le debug, c'est pour ce qui a ete produit par le compilateur |
|
| 268 | - if (isset($GLOBALS['debug']['aucasou'])) { |
|
| 269 | - [$table, $id, ] = $GLOBALS['debug']['aucasou']; |
|
| 270 | - $nom = $GLOBALS['debug_objets']['courant'] . $id; |
|
| 271 | - $GLOBALS['debug_objets']['requete'][$nom] = $query; |
|
| 272 | - } |
|
| 273 | - $res = $f($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, true); |
|
| 274 | - } |
|
| 275 | - |
|
| 276 | - // en cas d'erreur |
|
| 277 | - if (!is_string($res)) { |
|
| 278 | - return $res; |
|
| 279 | - } |
|
| 280 | - // denoncer l'erreur SQL dans sa version brute |
|
| 281 | - spip_sql_erreur($serveur); |
|
| 282 | - // idem dans sa version squelette (prefixe des tables non substitue) |
|
| 283 | - $contexte_compil = sql_error_backtrace(true); |
|
| 284 | - erreur_squelette([sql_errno($serveur), sql_error($serveur), $res], $contexte_compil); |
|
| 285 | - |
|
| 286 | - return false; |
|
| 244 | + $f = sql_serveur('select', $serveur, $option === 'continue' or $option === false); |
|
| 245 | + if (!is_string($f) or !$f) { |
|
| 246 | + return false; |
|
| 247 | + } |
|
| 248 | + |
|
| 249 | + $debug = (defined('_VAR_MODE') and _VAR_MODE == 'debug'); |
|
| 250 | + if (($option !== false) and !$debug) { |
|
| 251 | + $res = $f( |
|
| 252 | + $select, |
|
| 253 | + $from, |
|
| 254 | + $where, |
|
| 255 | + $groupby, |
|
| 256 | + $orderby, |
|
| 257 | + $limit, |
|
| 258 | + $having, |
|
| 259 | + $serveur, |
|
| 260 | + is_array($option) ? true : $option |
|
| 261 | + ); |
|
| 262 | + } else { |
|
| 263 | + $query = $f($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, false); |
|
| 264 | + if (!$option) { |
|
| 265 | + return $query; |
|
| 266 | + } |
|
| 267 | + // le debug, c'est pour ce qui a ete produit par le compilateur |
|
| 268 | + if (isset($GLOBALS['debug']['aucasou'])) { |
|
| 269 | + [$table, $id, ] = $GLOBALS['debug']['aucasou']; |
|
| 270 | + $nom = $GLOBALS['debug_objets']['courant'] . $id; |
|
| 271 | + $GLOBALS['debug_objets']['requete'][$nom] = $query; |
|
| 272 | + } |
|
| 273 | + $res = $f($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, true); |
|
| 274 | + } |
|
| 275 | + |
|
| 276 | + // en cas d'erreur |
|
| 277 | + if (!is_string($res)) { |
|
| 278 | + return $res; |
|
| 279 | + } |
|
| 280 | + // denoncer l'erreur SQL dans sa version brute |
|
| 281 | + spip_sql_erreur($serveur); |
|
| 282 | + // idem dans sa version squelette (prefixe des tables non substitue) |
|
| 283 | + $contexte_compil = sql_error_backtrace(true); |
|
| 284 | + erreur_squelette([sql_errno($serveur), sql_error($serveur), $res], $contexte_compil); |
|
| 285 | + |
|
| 286 | + return false; |
|
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | |
@@ -320,16 +320,16 @@ discard block |
||
| 320 | 320 | * |
| 321 | 321 | **/ |
| 322 | 322 | function sql_get_select( |
| 323 | - $select = [], |
|
| 324 | - $from = [], |
|
| 325 | - $where = [], |
|
| 326 | - $groupby = [], |
|
| 327 | - $orderby = [], |
|
| 328 | - $limit = '', |
|
| 329 | - $having = [], |
|
| 330 | - $serveur = '' |
|
| 323 | + $select = [], |
|
| 324 | + $from = [], |
|
| 325 | + $where = [], |
|
| 326 | + $groupby = [], |
|
| 327 | + $orderby = [], |
|
| 328 | + $limit = '', |
|
| 329 | + $having = [], |
|
| 330 | + $serveur = '' |
|
| 331 | 331 | ) { |
| 332 | - return sql_select($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, false); |
|
| 332 | + return sql_select($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, false); |
|
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | |
@@ -373,23 +373,23 @@ discard block |
||
| 373 | 373 | * |
| 374 | 374 | **/ |
| 375 | 375 | function sql_countsel( |
| 376 | - $from = [], |
|
| 377 | - $where = [], |
|
| 378 | - $groupby = [], |
|
| 379 | - $having = [], |
|
| 380 | - $serveur = '', |
|
| 381 | - $option = true |
|
| 376 | + $from = [], |
|
| 377 | + $where = [], |
|
| 378 | + $groupby = [], |
|
| 379 | + $having = [], |
|
| 380 | + $serveur = '', |
|
| 381 | + $option = true |
|
| 382 | 382 | ) { |
| 383 | - $f = sql_serveur('countsel', $serveur, $option === 'continue' or $option === false); |
|
| 384 | - if (!is_string($f) or !$f) { |
|
| 385 | - return false; |
|
| 386 | - } |
|
| 387 | - $r = $f($from, $where, $groupby, $having, $serveur, $option !== false); |
|
| 388 | - if ($r === false) { |
|
| 389 | - spip_sql_erreur($serveur); |
|
| 390 | - } |
|
| 391 | - |
|
| 392 | - return $r; |
|
| 383 | + $f = sql_serveur('countsel', $serveur, $option === 'continue' or $option === false); |
|
| 384 | + if (!is_string($f) or !$f) { |
|
| 385 | + return false; |
|
| 386 | + } |
|
| 387 | + $r = $f($from, $where, $groupby, $having, $serveur, $option !== false); |
|
| 388 | + if ($r === false) { |
|
| 389 | + spip_sql_erreur($serveur); |
|
| 390 | + } |
|
| 391 | + |
|
| 392 | + return $r; |
|
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | /** |
@@ -421,16 +421,16 @@ discard block |
||
| 421 | 421 | * Ce retour n'est pas pertinent pour savoir si l'opération est correctement réalisée. |
| 422 | 422 | **/ |
| 423 | 423 | function sql_alter($q, $serveur = '', $option = true) { |
| 424 | - $f = sql_serveur('alter', $serveur, $option === 'continue' or $option === false); |
|
| 425 | - if (!is_string($f) or !$f) { |
|
| 426 | - return false; |
|
| 427 | - } |
|
| 428 | - $r = $f($q, $serveur, $option !== false); |
|
| 429 | - if ($r === false) { |
|
| 430 | - spip_sql_erreur($serveur); |
|
| 431 | - } |
|
| 432 | - |
|
| 433 | - return $r; |
|
| 424 | + $f = sql_serveur('alter', $serveur, $option === 'continue' or $option === false); |
|
| 425 | + if (!is_string($f) or !$f) { |
|
| 426 | + return false; |
|
| 427 | + } |
|
| 428 | + $r = $f($q, $serveur, $option !== false); |
|
| 429 | + if ($r === false) { |
|
| 430 | + spip_sql_erreur($serveur); |
|
| 431 | + } |
|
| 432 | + |
|
| 433 | + return $r; |
|
| 434 | 434 | } |
| 435 | 435 | |
| 436 | 436 | /** |
@@ -453,12 +453,12 @@ discard block |
||
| 453 | 453 | * presentant une ligne de resultat d'une selection |
| 454 | 454 | */ |
| 455 | 455 | function sql_fetch($res, $serveur = '', $option = true) { |
| 456 | - $f = sql_serveur('fetch', $serveur, $option === 'continue' or $option === false); |
|
| 457 | - if (!is_string($f) or !$f) { |
|
| 458 | - return false; |
|
| 459 | - } |
|
| 456 | + $f = sql_serveur('fetch', $serveur, $option === 'continue' or $option === false); |
|
| 457 | + if (!is_string($f) or !$f) { |
|
| 458 | + return false; |
|
| 459 | + } |
|
| 460 | 460 | |
| 461 | - return $f($res, null, $serveur, $option !== false); |
|
| 461 | + return $f($res, null, $serveur, $option !== false); |
|
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | |
@@ -485,20 +485,20 @@ discard block |
||
| 485 | 485 | * presentant une ligne de resultat d'une selection |
| 486 | 486 | */ |
| 487 | 487 | function sql_fetch_all($res, $serveur = '', $option = true) { |
| 488 | - $rows = []; |
|
| 489 | - if (!$res) { |
|
| 490 | - return $rows; |
|
| 491 | - } |
|
| 492 | - $f = sql_serveur('fetch', $serveur, $option === 'continue' or $option === false); |
|
| 493 | - if (!is_string($f) or !$f) { |
|
| 494 | - return []; |
|
| 495 | - } |
|
| 496 | - while ($r = $f($res, null, $serveur, $option !== false)) { |
|
| 497 | - $rows[] = $r; |
|
| 498 | - } |
|
| 499 | - sql_free($res, $serveur); |
|
| 500 | - |
|
| 501 | - return $rows; |
|
| 488 | + $rows = []; |
|
| 489 | + if (!$res) { |
|
| 490 | + return $rows; |
|
| 491 | + } |
|
| 492 | + $f = sql_serveur('fetch', $serveur, $option === 'continue' or $option === false); |
|
| 493 | + if (!is_string($f) or !$f) { |
|
| 494 | + return []; |
|
| 495 | + } |
|
| 496 | + while ($r = $f($res, null, $serveur, $option !== false)) { |
|
| 497 | + $rows[] = $r; |
|
| 498 | + } |
|
| 499 | + sql_free($res, $serveur); |
|
| 500 | + |
|
| 501 | + return $rows; |
|
| 502 | 502 | } |
| 503 | 503 | |
| 504 | 504 | /** |
@@ -526,16 +526,16 @@ discard block |
||
| 526 | 526 | * Operation effectuée (true), sinon false. |
| 527 | 527 | **/ |
| 528 | 528 | function sql_seek($res, $row_number, $serveur = '', $option = true) { |
| 529 | - $f = sql_serveur('seek', $serveur, $option === 'continue' or $option === false); |
|
| 530 | - if (!is_string($f) or !$f) { |
|
| 531 | - return false; |
|
| 532 | - } |
|
| 533 | - $r = $f($res, $row_number, $serveur, $option !== false); |
|
| 534 | - if ($r === false) { |
|
| 535 | - spip_sql_erreur($serveur); |
|
| 536 | - } |
|
| 537 | - |
|
| 538 | - return $r; |
|
| 529 | + $f = sql_serveur('seek', $serveur, $option === 'continue' or $option === false); |
|
| 530 | + if (!is_string($f) or !$f) { |
|
| 531 | + return false; |
|
| 532 | + } |
|
| 533 | + $r = $f($res, $row_number, $serveur, $option !== false); |
|
| 534 | + if ($r === false) { |
|
| 535 | + spip_sql_erreur($serveur); |
|
| 536 | + } |
|
| 537 | + |
|
| 538 | + return $r; |
|
| 539 | 539 | } |
| 540 | 540 | |
| 541 | 541 | |
@@ -560,16 +560,16 @@ discard block |
||
| 560 | 560 | * False en cas d'erreur. |
| 561 | 561 | **/ |
| 562 | 562 | function sql_listdbs($serveur = '', $option = true) { |
| 563 | - $f = sql_serveur('listdbs', $serveur, $option === 'continue' or $option === false); |
|
| 564 | - if (!is_string($f) or !$f) { |
|
| 565 | - return false; |
|
| 566 | - } |
|
| 567 | - $r = $f($serveur); |
|
| 568 | - if ($r === false) { |
|
| 569 | - spip_sql_erreur($serveur); |
|
| 570 | - } |
|
| 571 | - |
|
| 572 | - return $r; |
|
| 563 | + $f = sql_serveur('listdbs', $serveur, $option === 'continue' or $option === false); |
|
| 564 | + if (!is_string($f) or !$f) { |
|
| 565 | + return false; |
|
| 566 | + } |
|
| 567 | + $r = $f($serveur); |
|
| 568 | + if ($r === false) { |
|
| 569 | + spip_sql_erreur($serveur); |
|
| 570 | + } |
|
| 571 | + |
|
| 572 | + return $r; |
|
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | |
@@ -592,16 +592,16 @@ discard block |
||
| 592 | 592 | * - False en cas d'erreur. |
| 593 | 593 | **/ |
| 594 | 594 | function sql_selectdb($nom, $serveur = '', $option = true) { |
| 595 | - $f = sql_serveur('selectdb', $serveur, $option === 'continue' or $option === false); |
|
| 596 | - if (!is_string($f) or !$f) { |
|
| 597 | - return false; |
|
| 598 | - } |
|
| 599 | - $r = $f($nom, $serveur, $option !== false); |
|
| 600 | - if ($r === false) { |
|
| 601 | - spip_sql_erreur($serveur); |
|
| 602 | - } |
|
| 603 | - |
|
| 604 | - return $r; |
|
| 595 | + $f = sql_serveur('selectdb', $serveur, $option === 'continue' or $option === false); |
|
| 596 | + if (!is_string($f) or !$f) { |
|
| 597 | + return false; |
|
| 598 | + } |
|
| 599 | + $r = $f($nom, $serveur, $option !== false); |
|
| 600 | + if ($r === false) { |
|
| 601 | + spip_sql_erreur($serveur); |
|
| 602 | + } |
|
| 603 | + |
|
| 604 | + return $r; |
|
| 605 | 605 | } |
| 606 | 606 | |
| 607 | 607 | /** |
@@ -626,16 +626,16 @@ discard block |
||
| 626 | 626 | * - false en cas d'erreur. |
| 627 | 627 | **/ |
| 628 | 628 | function sql_count($res, $serveur = '', $option = true) { |
| 629 | - $f = sql_serveur('count', $serveur, $option === 'continue' or $option === false); |
|
| 630 | - if (!is_string($f) or !$f) { |
|
| 631 | - return false; |
|
| 632 | - } |
|
| 633 | - $r = $f($res, $serveur, $option !== false); |
|
| 634 | - if ($r === false) { |
|
| 635 | - spip_sql_erreur($serveur); |
|
| 636 | - } |
|
| 637 | - |
|
| 638 | - return $r; |
|
| 629 | + $f = sql_serveur('count', $serveur, $option === 'continue' or $option === false); |
|
| 630 | + if (!is_string($f) or !$f) { |
|
| 631 | + return false; |
|
| 632 | + } |
|
| 633 | + $r = $f($res, $serveur, $option !== false); |
|
| 634 | + if ($r === false) { |
|
| 635 | + spip_sql_erreur($serveur); |
|
| 636 | + } |
|
| 637 | + |
|
| 638 | + return $r; |
|
| 639 | 639 | } |
| 640 | 640 | |
| 641 | 641 | /** |
@@ -657,12 +657,12 @@ discard block |
||
| 657 | 657 | * True si réussi |
| 658 | 658 | */ |
| 659 | 659 | function sql_free($res, $serveur = '', $option = true) { |
| 660 | - $f = sql_serveur('free', $serveur, $option === 'continue' or $option === false); |
|
| 661 | - if (!is_string($f) or !$f) { |
|
| 662 | - return false; |
|
| 663 | - } |
|
| 660 | + $f = sql_serveur('free', $serveur, $option === 'continue' or $option === false); |
|
| 661 | + if (!is_string($f) or !$f) { |
|
| 662 | + return false; |
|
| 663 | + } |
|
| 664 | 664 | |
| 665 | - return $f($res); |
|
| 665 | + return $f($res); |
|
| 666 | 666 | } |
| 667 | 667 | |
| 668 | 668 | |
@@ -700,17 +700,17 @@ discard block |
||
| 700 | 700 | * - False en cas d'erreur. |
| 701 | 701 | **/ |
| 702 | 702 | function sql_insert($table, $noms, $valeurs, $desc = [], $serveur = '', $option = true) { |
| 703 | - $f = sql_serveur('insert', $serveur, $option === 'continue' or $option === false); |
|
| 704 | - if (!is_string($f) or !$f) { |
|
| 705 | - return false; |
|
| 706 | - } |
|
| 707 | - $r = $f($table, $noms, $valeurs, $desc, $serveur, $option !== false); |
|
| 708 | - if ($r === false or $r === null) { |
|
| 709 | - spip_sql_erreur($serveur); |
|
| 710 | - $r = false; |
|
| 711 | - } |
|
| 712 | - |
|
| 713 | - return $r; |
|
| 703 | + $f = sql_serveur('insert', $serveur, $option === 'continue' or $option === false); |
|
| 704 | + if (!is_string($f) or !$f) { |
|
| 705 | + return false; |
|
| 706 | + } |
|
| 707 | + $r = $f($table, $noms, $valeurs, $desc, $serveur, $option !== false); |
|
| 708 | + if ($r === false or $r === null) { |
|
| 709 | + spip_sql_erreur($serveur); |
|
| 710 | + $r = false; |
|
| 711 | + } |
|
| 712 | + |
|
| 713 | + return $r; |
|
| 714 | 714 | } |
| 715 | 715 | |
| 716 | 716 | /** |
@@ -751,17 +751,17 @@ discard block |
||
| 751 | 751 | * - False en cas d'erreur. |
| 752 | 752 | **/ |
| 753 | 753 | function sql_insertq($table, $couples = [], $desc = [], $serveur = '', $option = true) { |
| 754 | - $f = sql_serveur('insertq', $serveur, $option === 'continue' or $option === false); |
|
| 755 | - if (!is_string($f) or !$f) { |
|
| 756 | - return false; |
|
| 757 | - } |
|
| 758 | - $r = $f($table, $couples, $desc, $serveur, $option !== false); |
|
| 759 | - if ($r === false or $r === null) { |
|
| 760 | - spip_sql_erreur($serveur); |
|
| 761 | - $r = false; |
|
| 762 | - } |
|
| 763 | - |
|
| 764 | - return $r; |
|
| 754 | + $f = sql_serveur('insertq', $serveur, $option === 'continue' or $option === false); |
|
| 755 | + if (!is_string($f) or !$f) { |
|
| 756 | + return false; |
|
| 757 | + } |
|
| 758 | + $r = $f($table, $couples, $desc, $serveur, $option !== false); |
|
| 759 | + if ($r === false or $r === null) { |
|
| 760 | + spip_sql_erreur($serveur); |
|
| 761 | + $r = false; |
|
| 762 | + } |
|
| 763 | + |
|
| 764 | + return $r; |
|
| 765 | 765 | } |
| 766 | 766 | |
| 767 | 767 | /** |
@@ -796,17 +796,17 @@ discard block |
||
| 796 | 796 | * - False en cas d'erreur. |
| 797 | 797 | **/ |
| 798 | 798 | function sql_insertq_multi($table, $couples = [], $desc = [], $serveur = '', $option = true) { |
| 799 | - $f = sql_serveur('insertq_multi', $serveur, $option === 'continue' or $option === false); |
|
| 800 | - if (!is_string($f) or !$f) { |
|
| 801 | - return false; |
|
| 802 | - } |
|
| 803 | - $r = $f($table, $couples, $desc, $serveur, $option !== false); |
|
| 804 | - if ($r === false or $r === null) { |
|
| 805 | - spip_sql_erreur($serveur); |
|
| 806 | - $r = false; |
|
| 807 | - } |
|
| 808 | - |
|
| 809 | - return $r; |
|
| 799 | + $f = sql_serveur('insertq_multi', $serveur, $option === 'continue' or $option === false); |
|
| 800 | + if (!is_string($f) or !$f) { |
|
| 801 | + return false; |
|
| 802 | + } |
|
| 803 | + $r = $f($table, $couples, $desc, $serveur, $option !== false); |
|
| 804 | + if ($r === false or $r === null) { |
|
| 805 | + spip_sql_erreur($serveur); |
|
| 806 | + $r = false; |
|
| 807 | + } |
|
| 808 | + |
|
| 809 | + return $r; |
|
| 810 | 810 | } |
| 811 | 811 | |
| 812 | 812 | /** |
@@ -846,16 +846,16 @@ discard block |
||
| 846 | 846 | * - array Tableau décrivant la requête et son temps d'exécution si var_profile est actif |
| 847 | 847 | */ |
| 848 | 848 | function sql_update($table, $exp, $where = '', $desc = [], $serveur = '', $option = true) { |
| 849 | - $f = sql_serveur('update', $serveur, $option === 'continue' or $option === false); |
|
| 850 | - if (!is_string($f) or !$f) { |
|
| 851 | - return false; |
|
| 852 | - } |
|
| 853 | - $r = $f($table, $exp, $where, $desc, $serveur, $option !== false); |
|
| 854 | - if ($r === false) { |
|
| 855 | - spip_sql_erreur($serveur); |
|
| 856 | - } |
|
| 857 | - |
|
| 858 | - return $r; |
|
| 849 | + $f = sql_serveur('update', $serveur, $option === 'continue' or $option === false); |
|
| 850 | + if (!is_string($f) or !$f) { |
|
| 851 | + return false; |
|
| 852 | + } |
|
| 853 | + $r = $f($table, $exp, $where, $desc, $serveur, $option !== false); |
|
| 854 | + if ($r === false) { |
|
| 855 | + spip_sql_erreur($serveur); |
|
| 856 | + } |
|
| 857 | + |
|
| 858 | + return $r; |
|
| 859 | 859 | } |
| 860 | 860 | |
| 861 | 861 | |
@@ -901,16 +901,16 @@ discard block |
||
| 901 | 901 | * - False en cas d'erreur. |
| 902 | 902 | **/ |
| 903 | 903 | function sql_updateq($table, $exp, $where = '', $desc = [], $serveur = '', $option = true) { |
| 904 | - $f = sql_serveur('updateq', $serveur, $option === 'continue' or $option === false); |
|
| 905 | - if (!is_string($f) or !$f) { |
|
| 906 | - return false; |
|
| 907 | - } |
|
| 908 | - $r = $f($table, $exp, $where, $desc, $serveur, $option !== false); |
|
| 909 | - if ($r === false) { |
|
| 910 | - spip_sql_erreur($serveur); |
|
| 911 | - } |
|
| 912 | - |
|
| 913 | - return $r; |
|
| 904 | + $f = sql_serveur('updateq', $serveur, $option === 'continue' or $option === false); |
|
| 905 | + if (!is_string($f) or !$f) { |
|
| 906 | + return false; |
|
| 907 | + } |
|
| 908 | + $r = $f($table, $exp, $where, $desc, $serveur, $option !== false); |
|
| 909 | + if ($r === false) { |
|
| 910 | + spip_sql_erreur($serveur); |
|
| 911 | + } |
|
| 912 | + |
|
| 913 | + return $r; |
|
| 914 | 914 | } |
| 915 | 915 | |
| 916 | 916 | /** |
@@ -941,16 +941,16 @@ discard block |
||
| 941 | 941 | * - False en cas d'erreur. |
| 942 | 942 | **/ |
| 943 | 943 | function sql_delete($table, $where = '', $serveur = '', $option = true) { |
| 944 | - $f = sql_serveur('delete', $serveur, $option === 'continue' or $option === false); |
|
| 945 | - if (!is_string($f) or !$f) { |
|
| 946 | - return false; |
|
| 947 | - } |
|
| 948 | - $r = $f($table, $where, $serveur, $option !== false); |
|
| 949 | - if ($r === false) { |
|
| 950 | - spip_sql_erreur($serveur); |
|
| 951 | - } |
|
| 952 | - |
|
| 953 | - return $r; |
|
| 944 | + $f = sql_serveur('delete', $serveur, $option === 'continue' or $option === false); |
|
| 945 | + if (!is_string($f) or !$f) { |
|
| 946 | + return false; |
|
| 947 | + } |
|
| 948 | + $r = $f($table, $where, $serveur, $option !== false); |
|
| 949 | + if ($r === false) { |
|
| 950 | + spip_sql_erreur($serveur); |
|
| 951 | + } |
|
| 952 | + |
|
| 953 | + return $r; |
|
| 954 | 954 | } |
| 955 | 955 | |
| 956 | 956 | /** |
@@ -986,16 +986,16 @@ discard block |
||
| 986 | 986 | * - False en cas d'erreur. |
| 987 | 987 | **/ |
| 988 | 988 | function sql_replace($table, $couples, $desc = [], $serveur = '', $option = true) { |
| 989 | - $f = sql_serveur('replace', $serveur, $option === 'continue' or $option === false); |
|
| 990 | - if (!is_string($f) or !$f) { |
|
| 991 | - return false; |
|
| 992 | - } |
|
| 993 | - $r = $f($table, $couples, $desc, $serveur, $option !== false); |
|
| 994 | - if ($r === false) { |
|
| 995 | - spip_sql_erreur($serveur); |
|
| 996 | - } |
|
| 997 | - |
|
| 998 | - return $r; |
|
| 989 | + $f = sql_serveur('replace', $serveur, $option === 'continue' or $option === false); |
|
| 990 | + if (!is_string($f) or !$f) { |
|
| 991 | + return false; |
|
| 992 | + } |
|
| 993 | + $r = $f($table, $couples, $desc, $serveur, $option !== false); |
|
| 994 | + if ($r === false) { |
|
| 995 | + spip_sql_erreur($serveur); |
|
| 996 | + } |
|
| 997 | + |
|
| 998 | + return $r; |
|
| 999 | 999 | } |
| 1000 | 1000 | |
| 1001 | 1001 | |
@@ -1033,16 +1033,16 @@ discard block |
||
| 1033 | 1033 | * - False en cas d'erreur. |
| 1034 | 1034 | **/ |
| 1035 | 1035 | function sql_replace_multi($table, $tab_couples, $desc = [], $serveur = '', $option = true) { |
| 1036 | - $f = sql_serveur('replace_multi', $serveur, $option === 'continue' or $option === false); |
|
| 1037 | - if (!is_string($f) or !$f) { |
|
| 1038 | - return false; |
|
| 1039 | - } |
|
| 1040 | - $r = $f($table, $tab_couples, $desc, $serveur, $option !== false); |
|
| 1041 | - if ($r === false) { |
|
| 1042 | - spip_sql_erreur($serveur); |
|
| 1043 | - } |
|
| 1044 | - |
|
| 1045 | - return $r; |
|
| 1036 | + $f = sql_serveur('replace_multi', $serveur, $option === 'continue' or $option === false); |
|
| 1037 | + if (!is_string($f) or !$f) { |
|
| 1038 | + return false; |
|
| 1039 | + } |
|
| 1040 | + $r = $f($table, $tab_couples, $desc, $serveur, $option !== false); |
|
| 1041 | + if ($r === false) { |
|
| 1042 | + spip_sql_erreur($serveur); |
|
| 1043 | + } |
|
| 1044 | + |
|
| 1045 | + return $r; |
|
| 1046 | 1046 | } |
| 1047 | 1047 | |
| 1048 | 1048 | /** |
@@ -1070,16 +1070,16 @@ discard block |
||
| 1070 | 1070 | * - False en cas d'erreur. |
| 1071 | 1071 | **/ |
| 1072 | 1072 | function sql_drop_table($table, $exist = '', $serveur = '', $option = true) { |
| 1073 | - $f = sql_serveur('drop_table', $serveur, $option === 'continue' or $option === false); |
|
| 1074 | - if (!is_string($f) or !$f) { |
|
| 1075 | - return false; |
|
| 1076 | - } |
|
| 1077 | - $r = $f($table, $exist, $serveur, $option !== false); |
|
| 1078 | - if ($r === false) { |
|
| 1079 | - spip_sql_erreur($serveur); |
|
| 1080 | - } |
|
| 1081 | - |
|
| 1082 | - return $r; |
|
| 1073 | + $f = sql_serveur('drop_table', $serveur, $option === 'continue' or $option === false); |
|
| 1074 | + if (!is_string($f) or !$f) { |
|
| 1075 | + return false; |
|
| 1076 | + } |
|
| 1077 | + $r = $f($table, $exist, $serveur, $option !== false); |
|
| 1078 | + if ($r === false) { |
|
| 1079 | + spip_sql_erreur($serveur); |
|
| 1080 | + } |
|
| 1081 | + |
|
| 1082 | + return $r; |
|
| 1083 | 1083 | } |
| 1084 | 1084 | |
| 1085 | 1085 | /** |
@@ -1103,16 +1103,16 @@ discard block |
||
| 1103 | 1103 | * - true si la requête a réussie, false sinon |
| 1104 | 1104 | */ |
| 1105 | 1105 | function sql_drop_view($table, $exist = '', $serveur = '', $option = true) { |
| 1106 | - $f = sql_serveur('drop_view', $serveur, $option === 'continue' or $option === false); |
|
| 1107 | - if (!is_string($f) or !$f) { |
|
| 1108 | - return false; |
|
| 1109 | - } |
|
| 1110 | - $r = $f($table, $exist, $serveur, $option !== false); |
|
| 1111 | - if ($r === false) { |
|
| 1112 | - spip_sql_erreur($serveur); |
|
| 1113 | - } |
|
| 1114 | - |
|
| 1115 | - return $r; |
|
| 1106 | + $f = sql_serveur('drop_view', $serveur, $option === 'continue' or $option === false); |
|
| 1107 | + if (!is_string($f) or !$f) { |
|
| 1108 | + return false; |
|
| 1109 | + } |
|
| 1110 | + $r = $f($table, $exist, $serveur, $option !== false); |
|
| 1111 | + if ($r === false) { |
|
| 1112 | + spip_sql_erreur($serveur); |
|
| 1113 | + } |
|
| 1114 | + |
|
| 1115 | + return $r; |
|
| 1116 | 1116 | } |
| 1117 | 1117 | |
| 1118 | 1118 | /** |
@@ -1136,18 +1136,18 @@ discard block |
||
| 1136 | 1136 | * Ressource à utiliser avec sql_fetch() |
| 1137 | 1137 | **/ |
| 1138 | 1138 | function sql_showbase($spip = null, $serveur = '', $option = true) { |
| 1139 | - $f = sql_serveur('showbase', $serveur, $option === 'continue' or $option === false); |
|
| 1140 | - if (!is_string($f) or !$f) { |
|
| 1141 | - return false; |
|
| 1142 | - } |
|
| 1143 | - |
|
| 1144 | - // la globale n'est remplie qu'apres l'appel de sql_serveur. |
|
| 1145 | - if ($spip == null) { |
|
| 1146 | - $connexion = $GLOBALS['connexions'][$serveur ? strtolower($serveur) : 0]; |
|
| 1147 | - $spip = $connexion['prefixe'] . '\_%'; |
|
| 1148 | - } |
|
| 1149 | - |
|
| 1150 | - return $f($spip, $serveur, $option !== false); |
|
| 1139 | + $f = sql_serveur('showbase', $serveur, $option === 'continue' or $option === false); |
|
| 1140 | + if (!is_string($f) or !$f) { |
|
| 1141 | + return false; |
|
| 1142 | + } |
|
| 1143 | + |
|
| 1144 | + // la globale n'est remplie qu'apres l'appel de sql_serveur. |
|
| 1145 | + if ($spip == null) { |
|
| 1146 | + $connexion = $GLOBALS['connexions'][$serveur ? strtolower($serveur) : 0]; |
|
| 1147 | + $spip = $connexion['prefixe'] . '\_%'; |
|
| 1148 | + } |
|
| 1149 | + |
|
| 1150 | + return $f($spip, $serveur, $option !== false); |
|
| 1151 | 1151 | } |
| 1152 | 1152 | |
| 1153 | 1153 | /** |
@@ -1170,15 +1170,15 @@ discard block |
||
| 1170 | 1170 | * Liste des tables SQL |
| 1171 | 1171 | **/ |
| 1172 | 1172 | function sql_alltable($spip = null, $serveur = '', $option = true) { |
| 1173 | - $q = sql_showbase($spip, $serveur, $option); |
|
| 1174 | - $r = []; |
|
| 1175 | - if ($q) { |
|
| 1176 | - while ($t = sql_fetch($q, $serveur)) { |
|
| 1177 | - $r[] = array_shift($t); |
|
| 1178 | - } |
|
| 1179 | - } |
|
| 1180 | - |
|
| 1181 | - return $r; |
|
| 1173 | + $q = sql_showbase($spip, $serveur, $option); |
|
| 1174 | + $r = []; |
|
| 1175 | + if ($q) { |
|
| 1176 | + while ($t = sql_fetch($q, $serveur)) { |
|
| 1177 | + $r[] = array_shift($t); |
|
| 1178 | + } |
|
| 1179 | + } |
|
| 1180 | + |
|
| 1181 | + return $r; |
|
| 1182 | 1182 | } |
| 1183 | 1183 | |
| 1184 | 1184 | /** |
@@ -1211,31 +1211,31 @@ discard block |
||
| 1211 | 1211 | * - 'join' => array() // jointures, si déclarées. |
| 1212 | 1212 | **/ |
| 1213 | 1213 | function sql_showtable($table, $table_spip = false, $serveur = '', $option = true) { |
| 1214 | - $f = sql_serveur('showtable', $serveur, $option === 'continue' or $option === false); |
|
| 1215 | - if (!is_string($f) or !$f) { |
|
| 1216 | - return false; |
|
| 1217 | - } |
|
| 1218 | - |
|
| 1219 | - // la globale n'est remplie qu'apres l'appel de sql_serveur. |
|
| 1220 | - if ($table_spip) { |
|
| 1221 | - $connexion = $GLOBALS['connexions'][$serveur ? strtolower($serveur) : 0]; |
|
| 1222 | - $prefixe = $connexion['prefixe']; |
|
| 1223 | - $vraie_table = prefixer_table_spip($table, $prefixe); |
|
| 1224 | - } else { |
|
| 1225 | - $vraie_table = $table; |
|
| 1226 | - } |
|
| 1227 | - |
|
| 1228 | - $f = $f($vraie_table, $serveur, $option !== false); |
|
| 1229 | - if (!$f) { |
|
| 1230 | - return []; |
|
| 1231 | - } |
|
| 1232 | - if (isset($GLOBALS['tables_principales'][$table]['join'])) { |
|
| 1233 | - $f['join'] = $GLOBALS['tables_principales'][$table]['join']; |
|
| 1234 | - } elseif (isset($GLOBALS['tables_auxiliaires'][$table]['join'])) { |
|
| 1235 | - $f['join'] = $GLOBALS['tables_auxiliaires'][$table]['join']; |
|
| 1236 | - } |
|
| 1237 | - |
|
| 1238 | - return $f; |
|
| 1214 | + $f = sql_serveur('showtable', $serveur, $option === 'continue' or $option === false); |
|
| 1215 | + if (!is_string($f) or !$f) { |
|
| 1216 | + return false; |
|
| 1217 | + } |
|
| 1218 | + |
|
| 1219 | + // la globale n'est remplie qu'apres l'appel de sql_serveur. |
|
| 1220 | + if ($table_spip) { |
|
| 1221 | + $connexion = $GLOBALS['connexions'][$serveur ? strtolower($serveur) : 0]; |
|
| 1222 | + $prefixe = $connexion['prefixe']; |
|
| 1223 | + $vraie_table = prefixer_table_spip($table, $prefixe); |
|
| 1224 | + } else { |
|
| 1225 | + $vraie_table = $table; |
|
| 1226 | + } |
|
| 1227 | + |
|
| 1228 | + $f = $f($vraie_table, $serveur, $option !== false); |
|
| 1229 | + if (!$f) { |
|
| 1230 | + return []; |
|
| 1231 | + } |
|
| 1232 | + if (isset($GLOBALS['tables_principales'][$table]['join'])) { |
|
| 1233 | + $f['join'] = $GLOBALS['tables_principales'][$table]['join']; |
|
| 1234 | + } elseif (isset($GLOBALS['tables_auxiliaires'][$table]['join'])) { |
|
| 1235 | + $f['join'] = $GLOBALS['tables_auxiliaires'][$table]['join']; |
|
| 1236 | + } |
|
| 1237 | + |
|
| 1238 | + return $f; |
|
| 1239 | 1239 | } |
| 1240 | 1240 | |
| 1241 | 1241 | |
@@ -1263,21 +1263,21 @@ discard block |
||
| 1263 | 1263 | * - False en cas d'erreur. |
| 1264 | 1264 | **/ |
| 1265 | 1265 | function sql_table_exists(string $table, bool $table_spip = true, $serveur = '', $option = true) { |
| 1266 | - $f = sql_serveur('table_exists', $serveur, $option === 'continue' or $option === false); |
|
| 1267 | - if (!is_string($f) or !$f) { |
|
| 1268 | - return false; |
|
| 1269 | - } |
|
| 1270 | - |
|
| 1271 | - // la globale n'est remplie qu'apres l'appel de sql_serveur. |
|
| 1272 | - if ($table_spip) { |
|
| 1273 | - $connexion = $GLOBALS['connexions'][$serveur ? strtolower($serveur) : 0]; |
|
| 1274 | - $prefixe = $connexion['prefixe']; |
|
| 1275 | - $vraie_table = prefixer_table_spip($table, $prefixe); |
|
| 1276 | - } else { |
|
| 1277 | - $vraie_table = $table; |
|
| 1278 | - } |
|
| 1279 | - |
|
| 1280 | - return $f($vraie_table, $serveur, $option !== false); |
|
| 1266 | + $f = sql_serveur('table_exists', $serveur, $option === 'continue' or $option === false); |
|
| 1267 | + if (!is_string($f) or !$f) { |
|
| 1268 | + return false; |
|
| 1269 | + } |
|
| 1270 | + |
|
| 1271 | + // la globale n'est remplie qu'apres l'appel de sql_serveur. |
|
| 1272 | + if ($table_spip) { |
|
| 1273 | + $connexion = $GLOBALS['connexions'][$serveur ? strtolower($serveur) : 0]; |
|
| 1274 | + $prefixe = $connexion['prefixe']; |
|
| 1275 | + $vraie_table = prefixer_table_spip($table, $prefixe); |
|
| 1276 | + } else { |
|
| 1277 | + $vraie_table = $table; |
|
| 1278 | + } |
|
| 1279 | + |
|
| 1280 | + return $f($vraie_table, $serveur, $option !== false); |
|
| 1281 | 1281 | } |
| 1282 | 1282 | |
| 1283 | 1283 | |
@@ -1323,24 +1323,24 @@ discard block |
||
| 1323 | 1323 | * true si succès, false en cas d'echec |
| 1324 | 1324 | **/ |
| 1325 | 1325 | function sql_create( |
| 1326 | - $nom, |
|
| 1327 | - $champs, |
|
| 1328 | - $cles = [], |
|
| 1329 | - $autoinc = false, |
|
| 1330 | - $temporary = false, |
|
| 1331 | - $serveur = '', |
|
| 1332 | - $option = true |
|
| 1326 | + $nom, |
|
| 1327 | + $champs, |
|
| 1328 | + $cles = [], |
|
| 1329 | + $autoinc = false, |
|
| 1330 | + $temporary = false, |
|
| 1331 | + $serveur = '', |
|
| 1332 | + $option = true |
|
| 1333 | 1333 | ) { |
| 1334 | - $f = sql_serveur('create', $serveur, $option === 'continue' or $option === false); |
|
| 1335 | - if (!is_string($f) or !$f) { |
|
| 1336 | - return false; |
|
| 1337 | - } |
|
| 1338 | - $r = $f($nom, $champs, $cles, $autoinc, $temporary, $serveur, $option !== false); |
|
| 1339 | - if ($r === false) { |
|
| 1340 | - spip_sql_erreur($serveur); |
|
| 1341 | - } |
|
| 1342 | - |
|
| 1343 | - return $r; |
|
| 1334 | + $f = sql_serveur('create', $serveur, $option === 'continue' or $option === false); |
|
| 1335 | + if (!is_string($f) or !$f) { |
|
| 1336 | + return false; |
|
| 1337 | + } |
|
| 1338 | + $r = $f($nom, $champs, $cles, $autoinc, $temporary, $serveur, $option !== false); |
|
| 1339 | + if ($r === false) { |
|
| 1340 | + spip_sql_erreur($serveur); |
|
| 1341 | + } |
|
| 1342 | + |
|
| 1343 | + return $r; |
|
| 1344 | 1344 | } |
| 1345 | 1345 | |
| 1346 | 1346 | /** |
@@ -1358,16 +1358,16 @@ discard block |
||
| 1358 | 1358 | * @return bool true si la base est créee. |
| 1359 | 1359 | **/ |
| 1360 | 1360 | function sql_create_base($nom, $serveur = '', $option = true) { |
| 1361 | - $f = sql_serveur('create_base', $serveur, $option === 'continue' or $option === false); |
|
| 1362 | - if (!is_string($f) or !$f) { |
|
| 1363 | - return false; |
|
| 1364 | - } |
|
| 1365 | - $r = $f($nom, $serveur, $option !== false); |
|
| 1366 | - if ($r === false) { |
|
| 1367 | - spip_sql_erreur($serveur); |
|
| 1368 | - } |
|
| 1369 | - |
|
| 1370 | - return $r; |
|
| 1361 | + $f = sql_serveur('create_base', $serveur, $option === 'continue' or $option === false); |
|
| 1362 | + if (!is_string($f) or !$f) { |
|
| 1363 | + return false; |
|
| 1364 | + } |
|
| 1365 | + $r = $f($nom, $serveur, $option !== false); |
|
| 1366 | + if ($r === false) { |
|
| 1367 | + spip_sql_erreur($serveur); |
|
| 1368 | + } |
|
| 1369 | + |
|
| 1370 | + return $r; |
|
| 1371 | 1371 | } |
| 1372 | 1372 | |
| 1373 | 1373 | |
@@ -1397,16 +1397,16 @@ discard block |
||
| 1397 | 1397 | * - false en cas d'échec. |
| 1398 | 1398 | **/ |
| 1399 | 1399 | function sql_create_view($nom, $select_query, $serveur = '', $option = true) { |
| 1400 | - $f = sql_serveur('create_view', $serveur, $option === 'continue' or $option === false); |
|
| 1401 | - if (!is_string($f) or !$f) { |
|
| 1402 | - return false; |
|
| 1403 | - } |
|
| 1404 | - $r = $f($nom, $select_query, $serveur, $option !== false); |
|
| 1405 | - if ($r === false) { |
|
| 1406 | - spip_sql_erreur($serveur); |
|
| 1407 | - } |
|
| 1408 | - |
|
| 1409 | - return $r; |
|
| 1400 | + $f = sql_serveur('create_view', $serveur, $option === 'continue' or $option === false); |
|
| 1401 | + if (!is_string($f) or !$f) { |
|
| 1402 | + return false; |
|
| 1403 | + } |
|
| 1404 | + $r = $f($nom, $select_query, $serveur, $option !== false); |
|
| 1405 | + if ($r === false) { |
|
| 1406 | + spip_sql_erreur($serveur); |
|
| 1407 | + } |
|
| 1408 | + |
|
| 1409 | + return $r; |
|
| 1410 | 1410 | } |
| 1411 | 1411 | |
| 1412 | 1412 | /** |
@@ -1435,12 +1435,12 @@ discard block |
||
| 1435 | 1435 | * Texte de sélection pour la requête |
| 1436 | 1436 | */ |
| 1437 | 1437 | function sql_multi($sel, $lang, $serveur = '', $option = true) { |
| 1438 | - $f = sql_serveur('multi', $serveur, $option === 'continue' or $option === false); |
|
| 1439 | - if (!is_string($f) or !$f) { |
|
| 1440 | - return false; |
|
| 1441 | - } |
|
| 1438 | + $f = sql_serveur('multi', $serveur, $option === 'continue' or $option === false); |
|
| 1439 | + if (!is_string($f) or !$f) { |
|
| 1440 | + return false; |
|
| 1441 | + } |
|
| 1442 | 1442 | |
| 1443 | - return $f($sel, $lang); |
|
| 1443 | + return $f($sel, $lang); |
|
| 1444 | 1444 | } |
| 1445 | 1445 | |
| 1446 | 1446 | |
@@ -1455,12 +1455,12 @@ discard block |
||
| 1455 | 1455 | * False si le serveur est indisponible |
| 1456 | 1456 | */ |
| 1457 | 1457 | function sql_error($serveur = '') { |
| 1458 | - $f = sql_serveur('error', $serveur, true); |
|
| 1459 | - if (!is_string($f) or !$f) { |
|
| 1460 | - return false; |
|
| 1461 | - } |
|
| 1458 | + $f = sql_serveur('error', $serveur, true); |
|
| 1459 | + if (!is_string($f) or !$f) { |
|
| 1460 | + return false; |
|
| 1461 | + } |
|
| 1462 | 1462 | |
| 1463 | - return $f('query inconnue', $serveur); |
|
| 1463 | + return $f('query inconnue', $serveur); |
|
| 1464 | 1464 | } |
| 1465 | 1465 | |
| 1466 | 1466 | /** |
@@ -1474,12 +1474,12 @@ discard block |
||
| 1474 | 1474 | * False si le serveur est indisponible |
| 1475 | 1475 | */ |
| 1476 | 1476 | function sql_errno($serveur = '') { |
| 1477 | - $f = sql_serveur('errno', $serveur, true); |
|
| 1478 | - if (!is_string($f) or !$f) { |
|
| 1479 | - return false; |
|
| 1480 | - } |
|
| 1477 | + $f = sql_serveur('errno', $serveur, true); |
|
| 1478 | + if (!is_string($f) or !$f) { |
|
| 1479 | + return false; |
|
| 1480 | + } |
|
| 1481 | 1481 | |
| 1482 | - return $f($serveur); |
|
| 1482 | + return $f($serveur); |
|
| 1483 | 1483 | } |
| 1484 | 1484 | |
| 1485 | 1485 | /** |
@@ -1497,16 +1497,16 @@ discard block |
||
| 1497 | 1497 | * @return array|false Tableau de l'explication |
| 1498 | 1498 | */ |
| 1499 | 1499 | function sql_explain($q, $serveur = '', $option = true) { |
| 1500 | - $f = sql_serveur('explain', $serveur, true); |
|
| 1501 | - if (!is_string($f) or !$f) { |
|
| 1502 | - return false; |
|
| 1503 | - } |
|
| 1504 | - $r = $f($q, $serveur, $option !== false); |
|
| 1505 | - if ($r === false) { |
|
| 1506 | - spip_sql_erreur($serveur); |
|
| 1507 | - } |
|
| 1508 | - |
|
| 1509 | - return $r; |
|
| 1500 | + $f = sql_serveur('explain', $serveur, true); |
|
| 1501 | + if (!is_string($f) or !$f) { |
|
| 1502 | + return false; |
|
| 1503 | + } |
|
| 1504 | + $r = $f($q, $serveur, $option !== false); |
|
| 1505 | + if ($r === false) { |
|
| 1506 | + spip_sql_erreur($serveur); |
|
| 1507 | + } |
|
| 1508 | + |
|
| 1509 | + return $r; |
|
| 1510 | 1510 | } |
| 1511 | 1511 | |
| 1512 | 1512 | /** |
@@ -1524,16 +1524,16 @@ discard block |
||
| 1524 | 1524 | * @return bool Toujours true |
| 1525 | 1525 | */ |
| 1526 | 1526 | function sql_optimize($table, $serveur = '', $option = true) { |
| 1527 | - $f = sql_serveur('optimize', $serveur, $option === 'continue' or $option === false); |
|
| 1528 | - if (!is_string($f) or !$f) { |
|
| 1529 | - return false; |
|
| 1530 | - } |
|
| 1531 | - $r = $f($table, $serveur, $option !== false); |
|
| 1532 | - if ($r === false) { |
|
| 1533 | - spip_sql_erreur($serveur); |
|
| 1534 | - } |
|
| 1535 | - |
|
| 1536 | - return $r; |
|
| 1527 | + $f = sql_serveur('optimize', $serveur, $option === 'continue' or $option === false); |
|
| 1528 | + if (!is_string($f) or !$f) { |
|
| 1529 | + return false; |
|
| 1530 | + } |
|
| 1531 | + $r = $f($table, $serveur, $option !== false); |
|
| 1532 | + if ($r === false) { |
|
| 1533 | + spip_sql_erreur($serveur); |
|
| 1534 | + } |
|
| 1535 | + |
|
| 1536 | + return $r; |
|
| 1537 | 1537 | } |
| 1538 | 1538 | |
| 1539 | 1539 | /** |
@@ -1553,16 +1553,16 @@ discard block |
||
| 1553 | 1553 | * - true si la requête a réussie, false sinon |
| 1554 | 1554 | */ |
| 1555 | 1555 | function sql_repair($table, $serveur = '', $option = true) { |
| 1556 | - $f = sql_serveur('repair', $serveur, $option === 'continue' or $option === false); |
|
| 1557 | - if (!is_string($f) or !$f) { |
|
| 1558 | - return false; |
|
| 1559 | - } |
|
| 1560 | - $r = $f($table, $serveur, $option !== false); |
|
| 1561 | - if ($r === false) { |
|
| 1562 | - spip_sql_erreur($serveur); |
|
| 1563 | - } |
|
| 1564 | - |
|
| 1565 | - return $r; |
|
| 1556 | + $f = sql_serveur('repair', $serveur, $option === 'continue' or $option === false); |
|
| 1557 | + if (!is_string($f) or !$f) { |
|
| 1558 | + return false; |
|
| 1559 | + } |
|
| 1560 | + $r = $f($table, $serveur, $option !== false); |
|
| 1561 | + if ($r === false) { |
|
| 1562 | + spip_sql_erreur($serveur); |
|
| 1563 | + } |
|
| 1564 | + |
|
| 1565 | + return $r; |
|
| 1566 | 1566 | } |
| 1567 | 1567 | |
| 1568 | 1568 | |
@@ -1587,16 +1587,16 @@ discard block |
||
| 1587 | 1587 | * - array : Tableau décrivant requête et temps d'exécution si var_profile actif pour tracer. |
| 1588 | 1588 | */ |
| 1589 | 1589 | function sql_query($ins, $serveur = '', $option = true) { |
| 1590 | - $f = sql_serveur('query', $serveur, $option === 'continue' or $option === false); |
|
| 1591 | - if (!is_string($f) or !$f) { |
|
| 1592 | - return false; |
|
| 1593 | - } |
|
| 1594 | - $r = $f($ins, $serveur, $option !== false); |
|
| 1595 | - if ($r === false) { |
|
| 1596 | - spip_sql_erreur($serveur); |
|
| 1597 | - } |
|
| 1598 | - |
|
| 1599 | - return $r; |
|
| 1590 | + $f = sql_serveur('query', $serveur, $option === 'continue' or $option === false); |
|
| 1591 | + if (!is_string($f) or !$f) { |
|
| 1592 | + return false; |
|
| 1593 | + } |
|
| 1594 | + $r = $f($ins, $serveur, $option !== false); |
|
| 1595 | + if ($r === false) { |
|
| 1596 | + spip_sql_erreur($serveur); |
|
| 1597 | + } |
|
| 1598 | + |
|
| 1599 | + return $r; |
|
| 1600 | 1600 | } |
| 1601 | 1601 | |
| 1602 | 1602 | /** |
@@ -1644,27 +1644,27 @@ discard block |
||
| 1644 | 1644 | * |
| 1645 | 1645 | **/ |
| 1646 | 1646 | function sql_fetsel( |
| 1647 | - $select = [], |
|
| 1648 | - $from = [], |
|
| 1649 | - $where = [], |
|
| 1650 | - $groupby = [], |
|
| 1651 | - $orderby = [], |
|
| 1652 | - $limit = '', |
|
| 1653 | - $having = [], |
|
| 1654 | - $serveur = '', |
|
| 1655 | - $option = true |
|
| 1647 | + $select = [], |
|
| 1648 | + $from = [], |
|
| 1649 | + $where = [], |
|
| 1650 | + $groupby = [], |
|
| 1651 | + $orderby = [], |
|
| 1652 | + $limit = '', |
|
| 1653 | + $having = [], |
|
| 1654 | + $serveur = '', |
|
| 1655 | + $option = true |
|
| 1656 | 1656 | ) { |
| 1657 | - $q = sql_select($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, $option); |
|
| 1658 | - if ($option === false) { |
|
| 1659 | - return $q; |
|
| 1660 | - } |
|
| 1661 | - if (!$q) { |
|
| 1662 | - return []; |
|
| 1663 | - } |
|
| 1664 | - $r = sql_fetch($q, $serveur, $option); |
|
| 1665 | - sql_free($q, $serveur, $option); |
|
| 1666 | - |
|
| 1667 | - return $r; |
|
| 1657 | + $q = sql_select($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, $option); |
|
| 1658 | + if ($option === false) { |
|
| 1659 | + return $q; |
|
| 1660 | + } |
|
| 1661 | + if (!$q) { |
|
| 1662 | + return []; |
|
| 1663 | + } |
|
| 1664 | + $r = sql_fetch($q, $serveur, $option); |
|
| 1665 | + sql_free($q, $serveur, $option); |
|
| 1666 | + |
|
| 1667 | + return $r; |
|
| 1668 | 1668 | } |
| 1669 | 1669 | |
| 1670 | 1670 | |
@@ -1721,22 +1721,22 @@ discard block |
||
| 1721 | 1721 | * |
| 1722 | 1722 | **/ |
| 1723 | 1723 | function sql_allfetsel( |
| 1724 | - $select = [], |
|
| 1725 | - $from = [], |
|
| 1726 | - $where = [], |
|
| 1727 | - $groupby = [], |
|
| 1728 | - $orderby = [], |
|
| 1729 | - $limit = '', |
|
| 1730 | - $having = [], |
|
| 1731 | - $serveur = '', |
|
| 1732 | - $option = true |
|
| 1724 | + $select = [], |
|
| 1725 | + $from = [], |
|
| 1726 | + $where = [], |
|
| 1727 | + $groupby = [], |
|
| 1728 | + $orderby = [], |
|
| 1729 | + $limit = '', |
|
| 1730 | + $having = [], |
|
| 1731 | + $serveur = '', |
|
| 1732 | + $option = true |
|
| 1733 | 1733 | ) { |
| 1734 | - $q = sql_select($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, $option); |
|
| 1735 | - if ($option === false) { |
|
| 1736 | - return $q; |
|
| 1737 | - } |
|
| 1734 | + $q = sql_select($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, $option); |
|
| 1735 | + if ($option === false) { |
|
| 1736 | + return $q; |
|
| 1737 | + } |
|
| 1738 | 1738 | |
| 1739 | - return sql_fetch_all($q, $serveur, $option); |
|
| 1739 | + return sql_fetch_all($q, $serveur, $option); |
|
| 1740 | 1740 | } |
| 1741 | 1741 | |
| 1742 | 1742 | |
@@ -1783,33 +1783,33 @@ discard block |
||
| 1783 | 1783 | * |
| 1784 | 1784 | **/ |
| 1785 | 1785 | function sql_getfetsel( |
| 1786 | - $select, |
|
| 1787 | - $from = [], |
|
| 1788 | - $where = [], |
|
| 1789 | - $groupby = [], |
|
| 1790 | - $orderby = [], |
|
| 1791 | - $limit = '', |
|
| 1792 | - $having = [], |
|
| 1793 | - $serveur = '', |
|
| 1794 | - $option = true |
|
| 1786 | + $select, |
|
| 1787 | + $from = [], |
|
| 1788 | + $where = [], |
|
| 1789 | + $groupby = [], |
|
| 1790 | + $orderby = [], |
|
| 1791 | + $limit = '', |
|
| 1792 | + $having = [], |
|
| 1793 | + $serveur = '', |
|
| 1794 | + $option = true |
|
| 1795 | 1795 | ) { |
| 1796 | - if (preg_match('/\s+as\s+(\w+)$/i', $select, $c)) { |
|
| 1797 | - $id = $c[1]; |
|
| 1798 | - } elseif (!preg_match('/\W/', $select)) { |
|
| 1799 | - $id = $select; |
|
| 1800 | - } else { |
|
| 1801 | - $id = 'n'; |
|
| 1802 | - $select .= ' AS n'; |
|
| 1803 | - } |
|
| 1804 | - $r = sql_fetsel($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, $option); |
|
| 1805 | - if ($option === false) { |
|
| 1806 | - return $r; |
|
| 1807 | - } |
|
| 1808 | - if (!$r) { |
|
| 1809 | - return null; |
|
| 1810 | - } |
|
| 1811 | - |
|
| 1812 | - return $r[$id]; |
|
| 1796 | + if (preg_match('/\s+as\s+(\w+)$/i', $select, $c)) { |
|
| 1797 | + $id = $c[1]; |
|
| 1798 | + } elseif (!preg_match('/\W/', $select)) { |
|
| 1799 | + $id = $select; |
|
| 1800 | + } else { |
|
| 1801 | + $id = 'n'; |
|
| 1802 | + $select .= ' AS n'; |
|
| 1803 | + } |
|
| 1804 | + $r = sql_fetsel($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, $option); |
|
| 1805 | + if ($option === false) { |
|
| 1806 | + return $r; |
|
| 1807 | + } |
|
| 1808 | + if (!$r) { |
|
| 1809 | + return null; |
|
| 1810 | + } |
|
| 1811 | + |
|
| 1812 | + return $r[$id]; |
|
| 1813 | 1813 | } |
| 1814 | 1814 | |
| 1815 | 1815 | /** |
@@ -1827,9 +1827,9 @@ discard block |
||
| 1827 | 1827 | * Numero de version du serveur SQL |
| 1828 | 1828 | **/ |
| 1829 | 1829 | function sql_version($serveur = '', $option = true) { |
| 1830 | - $row = sql_fetsel('version() AS n', '', '', '', '', '', '', $serveur); |
|
| 1830 | + $row = sql_fetsel('version() AS n', '', '', '', '', '', '', $serveur); |
|
| 1831 | 1831 | |
| 1832 | - return ($row['n']); |
|
| 1832 | + return ($row['n']); |
|
| 1833 | 1833 | } |
| 1834 | 1834 | |
| 1835 | 1835 | /** |
@@ -1865,16 +1865,16 @@ discard block |
||
| 1865 | 1865 | * Le serveur SQL prefere t'il des transactions pour les insertions multiples ? |
| 1866 | 1866 | **/ |
| 1867 | 1867 | function sql_preferer_transaction($serveur = '', $option = true) { |
| 1868 | - $f = sql_serveur('preferer_transaction', $serveur, true); |
|
| 1869 | - if (!is_string($f) or !$f) { |
|
| 1870 | - return false; |
|
| 1871 | - } |
|
| 1872 | - $r = $f($serveur, $option !== false); |
|
| 1873 | - if ($r === false) { |
|
| 1874 | - spip_sql_erreur($serveur); |
|
| 1875 | - } |
|
| 1876 | - |
|
| 1877 | - return $r; |
|
| 1868 | + $f = sql_serveur('preferer_transaction', $serveur, true); |
|
| 1869 | + if (!is_string($f) or !$f) { |
|
| 1870 | + return false; |
|
| 1871 | + } |
|
| 1872 | + $r = $f($serveur, $option !== false); |
|
| 1873 | + if ($r === false) { |
|
| 1874 | + spip_sql_erreur($serveur); |
|
| 1875 | + } |
|
| 1876 | + |
|
| 1877 | + return $r; |
|
| 1878 | 1878 | } |
| 1879 | 1879 | |
| 1880 | 1880 | ; |
@@ -1899,16 +1899,16 @@ discard block |
||
| 1899 | 1899 | * false en cas d'erreur |
| 1900 | 1900 | **/ |
| 1901 | 1901 | function sql_demarrer_transaction($serveur = '', $option = true) { |
| 1902 | - $f = sql_serveur('demarrer_transaction', $serveur, true); |
|
| 1903 | - if (!is_string($f) or !$f) { |
|
| 1904 | - return false; |
|
| 1905 | - } |
|
| 1906 | - $r = $f($serveur, $option !== false); |
|
| 1907 | - if ($r === false) { |
|
| 1908 | - spip_sql_erreur($serveur); |
|
| 1909 | - } |
|
| 1910 | - |
|
| 1911 | - return $r; |
|
| 1902 | + $f = sql_serveur('demarrer_transaction', $serveur, true); |
|
| 1903 | + if (!is_string($f) or !$f) { |
|
| 1904 | + return false; |
|
| 1905 | + } |
|
| 1906 | + $r = $f($serveur, $option !== false); |
|
| 1907 | + if ($r === false) { |
|
| 1908 | + spip_sql_erreur($serveur); |
|
| 1909 | + } |
|
| 1910 | + |
|
| 1911 | + return $r; |
|
| 1912 | 1912 | } |
| 1913 | 1913 | |
| 1914 | 1914 | ; |
@@ -1933,16 +1933,16 @@ discard block |
||
| 1933 | 1933 | * false en cas d'erreur |
| 1934 | 1934 | **/ |
| 1935 | 1935 | function sql_terminer_transaction($serveur = '', $option = true) { |
| 1936 | - $f = sql_serveur('terminer_transaction', $serveur, true); |
|
| 1937 | - if (!is_string($f) or !$f) { |
|
| 1938 | - return false; |
|
| 1939 | - } |
|
| 1940 | - $r = $f($serveur, $option !== false); |
|
| 1941 | - if ($r === false) { |
|
| 1942 | - spip_sql_erreur($serveur); |
|
| 1943 | - } |
|
| 1944 | - |
|
| 1945 | - return $r; |
|
| 1936 | + $f = sql_serveur('terminer_transaction', $serveur, true); |
|
| 1937 | + if (!is_string($f) or !$f) { |
|
| 1938 | + return false; |
|
| 1939 | + } |
|
| 1940 | + $r = $f($serveur, $option !== false); |
|
| 1941 | + if ($r === false) { |
|
| 1942 | + spip_sql_erreur($serveur); |
|
| 1943 | + } |
|
| 1944 | + |
|
| 1945 | + return $r; |
|
| 1946 | 1946 | } |
| 1947 | 1947 | |
| 1948 | 1948 | ; |
@@ -1969,12 +1969,12 @@ discard block |
||
| 1969 | 1969 | * Valeur hexadécimale attendue par le serveur SQL |
| 1970 | 1970 | **/ |
| 1971 | 1971 | function sql_hex($val, $serveur = '', $option = true) { |
| 1972 | - $f = sql_serveur('hex', $serveur, $option === 'continue' or $option === false); |
|
| 1973 | - if (!is_string($f) or !$f) { |
|
| 1974 | - return false; |
|
| 1975 | - } |
|
| 1972 | + $f = sql_serveur('hex', $serveur, $option === 'continue' or $option === false); |
|
| 1973 | + if (!is_string($f) or !$f) { |
|
| 1974 | + return false; |
|
| 1975 | + } |
|
| 1976 | 1976 | |
| 1977 | - return $f($val); |
|
| 1977 | + return $f($val); |
|
| 1978 | 1978 | } |
| 1979 | 1979 | |
| 1980 | 1980 | /** |
@@ -2000,12 +2000,12 @@ discard block |
||
| 2000 | 2000 | * La chaine echappee |
| 2001 | 2001 | **/ |
| 2002 | 2002 | function sql_quote($val, $serveur = '', $type = '') { |
| 2003 | - $f = sql_serveur('quote', $serveur, true); |
|
| 2004 | - if (!is_string($f) or !$f) { |
|
| 2005 | - $f = '_q'; |
|
| 2006 | - } |
|
| 2003 | + $f = sql_serveur('quote', $serveur, true); |
|
| 2004 | + if (!is_string($f) or !$f) { |
|
| 2005 | + $f = '_q'; |
|
| 2006 | + } |
|
| 2007 | 2007 | |
| 2008 | - return $f($val, $type); |
|
| 2008 | + return $f($val, $type); |
|
| 2009 | 2009 | } |
| 2010 | 2010 | |
| 2011 | 2011 | /** |
@@ -2030,12 +2030,12 @@ discard block |
||
| 2030 | 2030 | * - false si le serveur SQL est indisponible |
| 2031 | 2031 | **/ |
| 2032 | 2032 | function sql_date_proche($champ, $interval, $unite, $serveur = '', $option = true) { |
| 2033 | - $f = sql_serveur('date_proche', $serveur, true); |
|
| 2034 | - if (!is_string($f) or !$f) { |
|
| 2035 | - return false; |
|
| 2036 | - } |
|
| 2033 | + $f = sql_serveur('date_proche', $serveur, true); |
|
| 2034 | + if (!is_string($f) or !$f) { |
|
| 2035 | + return false; |
|
| 2036 | + } |
|
| 2037 | 2037 | |
| 2038 | - return $f($champ, $interval, $unite); |
|
| 2038 | + return $f($champ, $interval, $unite); |
|
| 2039 | 2039 | } |
| 2040 | 2040 | |
| 2041 | 2041 | /** |
@@ -2071,26 +2071,26 @@ discard block |
||
| 2071 | 2071 | * Expression de requête SQL |
| 2072 | 2072 | **/ |
| 2073 | 2073 | function sql_in_quote($champ, $valeurs, $not = '', $serveur = '', $type = '', $option = true) { |
| 2074 | - $quote = sql_serveur('quote', $serveur, true); |
|
| 2075 | - if (!is_string($quote) or !$quote) { |
|
| 2076 | - return false; |
|
| 2077 | - } |
|
| 2078 | - |
|
| 2079 | - // sql_quote produit une chaine dans tous les cas |
|
| 2080 | - $valeurs = array_filter($valeurs, fn($v) => !is_array($v)); |
|
| 2081 | - $valeurs = array_unique($valeurs); |
|
| 2082 | - $valeurs = $quote($valeurs, $type); |
|
| 2083 | - |
|
| 2084 | - if (!strlen(trim($valeurs))) { |
|
| 2085 | - return ($not ? '0=0' : '0=1'); |
|
| 2086 | - } |
|
| 2087 | - |
|
| 2088 | - $f = sql_serveur('in', $serveur, $option === 'continue' or $option === false); |
|
| 2089 | - if (!is_string($f) or !$f) { |
|
| 2090 | - return false; |
|
| 2091 | - } |
|
| 2092 | - |
|
| 2093 | - return $f($champ, $valeurs, $not ? 'NOT' : '', $serveur, $option !== false); |
|
| 2074 | + $quote = sql_serveur('quote', $serveur, true); |
|
| 2075 | + if (!is_string($quote) or !$quote) { |
|
| 2076 | + return false; |
|
| 2077 | + } |
|
| 2078 | + |
|
| 2079 | + // sql_quote produit une chaine dans tous les cas |
|
| 2080 | + $valeurs = array_filter($valeurs, fn($v) => !is_array($v)); |
|
| 2081 | + $valeurs = array_unique($valeurs); |
|
| 2082 | + $valeurs = $quote($valeurs, $type); |
|
| 2083 | + |
|
| 2084 | + if (!strlen(trim($valeurs))) { |
|
| 2085 | + return ($not ? '0=0' : '0=1'); |
|
| 2086 | + } |
|
| 2087 | + |
|
| 2088 | + $f = sql_serveur('in', $serveur, $option === 'continue' or $option === false); |
|
| 2089 | + if (!is_string($f) or !$f) { |
|
| 2090 | + return false; |
|
| 2091 | + } |
|
| 2092 | + |
|
| 2093 | + return $f($champ, $valeurs, $not ? 'NOT' : '', $serveur, $option !== false); |
|
| 2094 | 2094 | } |
| 2095 | 2095 | |
| 2096 | 2096 | /** |
@@ -2107,19 +2107,19 @@ discard block |
||
| 2107 | 2107 | * @param bool $option |
| 2108 | 2108 | */ |
| 2109 | 2109 | function sql_in($champ, $valeurs, $not = '', $serveur = '', $option = true) { |
| 2110 | - $type = ''; |
|
| 2111 | - if (!is_array($valeurs)) { |
|
| 2112 | - $valeurs = strval($valeurs); |
|
| 2113 | - if (isset($valeurs[0]) and $valeurs[0] === ',') { |
|
| 2114 | - $valeurs = substr($valeurs, 1); |
|
| 2115 | - } |
|
| 2116 | - // on explode en tableau pour pouvoir securiser le contenu |
|
| 2117 | - $valeurs = explode(',', $valeurs); |
|
| 2118 | - // et on force un cast de type int donc |
|
| 2119 | - $type = 'int'; |
|
| 2120 | - } |
|
| 2121 | - |
|
| 2122 | - return sql_in_quote($champ, $valeurs, $not, $serveur, $type, $option); |
|
| 2110 | + $type = ''; |
|
| 2111 | + if (!is_array($valeurs)) { |
|
| 2112 | + $valeurs = strval($valeurs); |
|
| 2113 | + if (isset($valeurs[0]) and $valeurs[0] === ',') { |
|
| 2114 | + $valeurs = substr($valeurs, 1); |
|
| 2115 | + } |
|
| 2116 | + // on explode en tableau pour pouvoir securiser le contenu |
|
| 2117 | + $valeurs = explode(',', $valeurs); |
|
| 2118 | + // et on force un cast de type int donc |
|
| 2119 | + $type = 'int'; |
|
| 2120 | + } |
|
| 2121 | + |
|
| 2122 | + return sql_in_quote($champ, $valeurs, $not, $serveur, $type, $option); |
|
| 2123 | 2123 | } |
| 2124 | 2124 | |
| 2125 | 2125 | |
@@ -2160,24 +2160,24 @@ discard block |
||
| 2160 | 2160 | * Expression de requête SQL |
| 2161 | 2161 | **/ |
| 2162 | 2162 | function sql_in_select( |
| 2163 | - $in, |
|
| 2164 | - $select, |
|
| 2165 | - $from = [], |
|
| 2166 | - $where = [], |
|
| 2167 | - $groupby = [], |
|
| 2168 | - $orderby = [], |
|
| 2169 | - $limit = '', |
|
| 2170 | - $having = [], |
|
| 2171 | - $serveur = '' |
|
| 2163 | + $in, |
|
| 2164 | + $select, |
|
| 2165 | + $from = [], |
|
| 2166 | + $where = [], |
|
| 2167 | + $groupby = [], |
|
| 2168 | + $orderby = [], |
|
| 2169 | + $limit = '', |
|
| 2170 | + $having = [], |
|
| 2171 | + $serveur = '' |
|
| 2172 | 2172 | ) { |
| 2173 | - $liste = []; |
|
| 2174 | - $res = sql_select($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur); |
|
| 2175 | - while ($r = sql_fetch($res)) { |
|
| 2176 | - $liste[] = array_shift($r); |
|
| 2177 | - } |
|
| 2178 | - sql_free($res); |
|
| 2179 | - |
|
| 2180 | - return sql_in($in, $liste); |
|
| 2173 | + $liste = []; |
|
| 2174 | + $res = sql_select($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur); |
|
| 2175 | + while ($r = sql_fetch($res)) { |
|
| 2176 | + $liste[] = array_shift($r); |
|
| 2177 | + } |
|
| 2178 | + sql_free($res); |
|
| 2179 | + |
|
| 2180 | + return sql_in($in, $liste); |
|
| 2181 | 2181 | } |
| 2182 | 2182 | |
| 2183 | 2183 | /** |
@@ -2209,29 +2209,29 @@ discard block |
||
| 2209 | 2209 | * Position apres le saut. |
| 2210 | 2210 | */ |
| 2211 | 2211 | function sql_skip($res, $pos, $saut, $count, $serveur = '', $option = true) { |
| 2212 | - // pas de saut en arriere qu'on ne sait pas faire sans sql_seek |
|
| 2213 | - if (($saut = intval($saut)) <= 0) { |
|
| 2214 | - return $pos; |
|
| 2215 | - } |
|
| 2216 | - |
|
| 2217 | - $seek = $pos + $saut; |
|
| 2218 | - // si le saut fait depasser le maxi, on libere la resource |
|
| 2219 | - // et on sort |
|
| 2220 | - if ($seek >= $count) { |
|
| 2221 | - sql_free($res, $serveur, $option); |
|
| 2222 | - |
|
| 2223 | - return $count; |
|
| 2224 | - } |
|
| 2225 | - |
|
| 2226 | - if (sql_seek($res, $seek)) { |
|
| 2227 | - $pos = $seek; |
|
| 2228 | - } else { |
|
| 2229 | - while ($pos < $seek and sql_fetch($res, $serveur, $option)) { |
|
| 2230 | - $pos++; |
|
| 2231 | - } |
|
| 2232 | - } |
|
| 2233 | - |
|
| 2234 | - return $pos; |
|
| 2212 | + // pas de saut en arriere qu'on ne sait pas faire sans sql_seek |
|
| 2213 | + if (($saut = intval($saut)) <= 0) { |
|
| 2214 | + return $pos; |
|
| 2215 | + } |
|
| 2216 | + |
|
| 2217 | + $seek = $pos + $saut; |
|
| 2218 | + // si le saut fait depasser le maxi, on libere la resource |
|
| 2219 | + // et on sort |
|
| 2220 | + if ($seek >= $count) { |
|
| 2221 | + sql_free($res, $serveur, $option); |
|
| 2222 | + |
|
| 2223 | + return $count; |
|
| 2224 | + } |
|
| 2225 | + |
|
| 2226 | + if (sql_seek($res, $seek)) { |
|
| 2227 | + $pos = $seek; |
|
| 2228 | + } else { |
|
| 2229 | + while ($pos < $seek and sql_fetch($res, $serveur, $option)) { |
|
| 2230 | + $pos++; |
|
| 2231 | + } |
|
| 2232 | + } |
|
| 2233 | + |
|
| 2234 | + return $pos; |
|
| 2235 | 2235 | } |
| 2236 | 2236 | |
| 2237 | 2237 | |
@@ -2251,7 +2251,7 @@ discard block |
||
| 2251 | 2251 | * True si le champ est de type entier |
| 2252 | 2252 | */ |
| 2253 | 2253 | function sql_test_int($type, $serveur = '', $option = true) { |
| 2254 | - return preg_match('/^(TINYINT|SMALLINT|MEDIUMINT|INT|INTEGER|BIGINT)/i', trim($type)); |
|
| 2254 | + return preg_match('/^(TINYINT|SMALLINT|MEDIUMINT|INT|INTEGER|BIGINT)/i', trim($type)); |
|
| 2255 | 2255 | } |
| 2256 | 2256 | |
| 2257 | 2257 | /** |
@@ -2270,7 +2270,7 @@ discard block |
||
| 2270 | 2270 | * True si le champ est de type entier |
| 2271 | 2271 | */ |
| 2272 | 2272 | function sql_test_date($type, $serveur = '', $option = true) { |
| 2273 | - return preg_match('/^(DATE|DATETIME|TIMESTAMP|TIME)/i', trim($type)); |
|
| 2273 | + return preg_match('/^(DATE|DATETIME|TIMESTAMP|TIME)/i', trim($type)); |
|
| 2274 | 2274 | } |
| 2275 | 2275 | |
| 2276 | 2276 | /** |
@@ -2292,19 +2292,19 @@ discard block |
||
| 2292 | 2292 | * La date formatee |
| 2293 | 2293 | */ |
| 2294 | 2294 | function sql_format_date($annee = 0, $mois = 0, $jour = 0, $h = 0, $m = 0, $s = 0, $serveur = '') { |
| 2295 | - $annee = sprintf('%04s', $annee); |
|
| 2296 | - $mois = sprintf('%02s', $mois); |
|
| 2297 | - |
|
| 2298 | - if ($annee == '0000') { |
|
| 2299 | - $mois = 0; |
|
| 2300 | - } |
|
| 2301 | - if ($mois == '00') { |
|
| 2302 | - $jour = 0; |
|
| 2303 | - } |
|
| 2304 | - |
|
| 2305 | - return sprintf('%04u', $annee) . '-' . sprintf('%02u', $mois) . '-' |
|
| 2306 | - . sprintf('%02u', $jour) . ' ' . sprintf('%02u', $h) . ':' |
|
| 2307 | - . sprintf('%02u', $m) . ':' . sprintf('%02u', $s); |
|
| 2295 | + $annee = sprintf('%04s', $annee); |
|
| 2296 | + $mois = sprintf('%02s', $mois); |
|
| 2297 | + |
|
| 2298 | + if ($annee == '0000') { |
|
| 2299 | + $mois = 0; |
|
| 2300 | + } |
|
| 2301 | + if ($mois == '00') { |
|
| 2302 | + $jour = 0; |
|
| 2303 | + } |
|
| 2304 | + |
|
| 2305 | + return sprintf('%04u', $annee) . '-' . sprintf('%02u', $mois) . '-' |
|
| 2306 | + . sprintf('%02u', $jour) . ' ' . sprintf('%02u', $h) . ':' |
|
| 2307 | + . sprintf('%02u', $m) . ':' . sprintf('%02u', $s); |
|
| 2308 | 2308 | } |
| 2309 | 2309 | |
| 2310 | 2310 | |
@@ -2327,32 +2327,32 @@ discard block |
||
| 2327 | 2327 | **/ |
| 2328 | 2328 | function description_table($nom, $serveur = '') { |
| 2329 | 2329 | |
| 2330 | - static $trouver_table; |
|
| 2330 | + static $trouver_table; |
|
| 2331 | 2331 | |
| 2332 | - /* toujours utiliser trouver_table |
|
| 2332 | + /* toujours utiliser trouver_table |
|
| 2333 | 2333 | qui renverra la description theorique |
| 2334 | 2334 | car sinon on va se comporter differement selon que la table est declaree |
| 2335 | 2335 | ou non |
| 2336 | 2336 | */ |
| 2337 | - if (!$trouver_table) { |
|
| 2338 | - $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 2339 | - } |
|
| 2340 | - if ($desc = $trouver_table($nom, $serveur)) { |
|
| 2341 | - return $desc; |
|
| 2342 | - } |
|
| 2343 | - |
|
| 2344 | - // sauf a l'installation : |
|
| 2345 | - include_spip('base/serial'); |
|
| 2346 | - if (isset($GLOBALS['tables_principales'][$nom])) { |
|
| 2347 | - return $GLOBALS['tables_principales'][$nom]; |
|
| 2348 | - } |
|
| 2349 | - |
|
| 2350 | - include_spip('base/auxiliaires'); |
|
| 2351 | - if (isset($GLOBALS['tables_auxiliaires'][$nom])) { |
|
| 2352 | - return $GLOBALS['tables_auxiliaires'][$nom]; |
|
| 2353 | - } |
|
| 2354 | - |
|
| 2355 | - return false; |
|
| 2337 | + if (!$trouver_table) { |
|
| 2338 | + $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 2339 | + } |
|
| 2340 | + if ($desc = $trouver_table($nom, $serveur)) { |
|
| 2341 | + return $desc; |
|
| 2342 | + } |
|
| 2343 | + |
|
| 2344 | + // sauf a l'installation : |
|
| 2345 | + include_spip('base/serial'); |
|
| 2346 | + if (isset($GLOBALS['tables_principales'][$nom])) { |
|
| 2347 | + return $GLOBALS['tables_principales'][$nom]; |
|
| 2348 | + } |
|
| 2349 | + |
|
| 2350 | + include_spip('base/auxiliaires'); |
|
| 2351 | + if (isset($GLOBALS['tables_auxiliaires'][$nom])) { |
|
| 2352 | + return $GLOBALS['tables_auxiliaires'][$nom]; |
|
| 2353 | + } |
|
| 2354 | + |
|
| 2355 | + return false; |
|
| 2356 | 2356 | } |
| 2357 | 2357 | |
| 2358 | 2358 | /** |
@@ -2365,8 +2365,8 @@ discard block |
||
| 2365 | 2365 | * @return string Table sql éventuellement renommée |
| 2366 | 2366 | */ |
| 2367 | 2367 | function prefixer_table_spip($table, $prefixe) { |
| 2368 | - if ($prefixe) { |
|
| 2369 | - $table = preg_replace('/^spip_/', $prefixe . '_', $table); |
|
| 2370 | - } |
|
| 2371 | - return $table; |
|
| 2368 | + if ($prefixe) { |
|
| 2369 | + $table = preg_replace('/^spip_/', $prefixe . '_', $table); |
|
| 2370 | + } |
|
| 2371 | + return $table; |
|
| 2372 | 2372 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * Pile complétée du code compilé |
| 38 | 38 | **/ |
| 39 | 39 | function balise_MENU_LANG($p) { |
| 40 | - return calculer_balise_dynamique($p, 'MENU_LANG', ['lang']); |
|
| 40 | + return calculer_balise_dynamique($p, 'MENU_LANG', ['lang']); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -56,11 +56,11 @@ discard block |
||
| 56 | 56 | * string: (vide) si pas de multilinguisme |
| 57 | 57 | */ |
| 58 | 58 | function balise_MENU_LANG_stat($args, $context_compil) { |
| 59 | - if (strpos($GLOBALS['meta']['langues_multilingue'], ',') === false) { |
|
| 60 | - return ''; |
|
| 61 | - } |
|
| 59 | + if (strpos($GLOBALS['meta']['langues_multilingue'], ',') === false) { |
|
| 60 | + return ''; |
|
| 61 | + } |
|
| 62 | 62 | |
| 63 | - return $args; |
|
| 63 | + return $args; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * Liste : Chemin du squelette, durée du cache, contexte |
| 77 | 77 | **/ |
| 78 | 78 | function balise_MENU_LANG_dyn($opt) { |
| 79 | - include_spip('balise/menu_lang_ecrire'); |
|
| 79 | + include_spip('balise/menu_lang_ecrire'); |
|
| 80 | 80 | |
| 81 | - return menu_lang_pour_tous('var_lang', $opt); |
|
| 81 | + return menu_lang_pour_tous('var_lang', $opt); |
|
| 82 | 82 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | // Authentifie via LDAP et retourne la ligne SQL decrivant l'utilisateur si ok |
@@ -25,12 +25,12 @@ discard block |
||
| 25 | 25 | // Attributs LDAP correspondants a ceux de SPIP, notamment pour le login |
| 26 | 26 | // ne pas ecraser une definition perso dans mes_options |
| 27 | 27 | if (!isset($GLOBALS['ldap_attributes']) or !is_array($GLOBALS['ldap_attributes'])) { |
| 28 | - $GLOBALS['ldap_attributes'] = [ |
|
| 29 | - 'login' => ['sAMAccountName', 'uid', 'login', 'userid', 'cn', 'sn'], |
|
| 30 | - 'nom' => 'cn', |
|
| 31 | - 'email' => 'mail', |
|
| 32 | - 'bio' => 'description' |
|
| 33 | - ]; |
|
| 28 | + $GLOBALS['ldap_attributes'] = [ |
|
| 29 | + 'login' => ['sAMAccountName', 'uid', 'login', 'userid', 'cn', 'sn'], |
|
| 30 | + 'nom' => 'cn', |
|
| 31 | + 'email' => 'mail', |
|
| 32 | + 'bio' => 'description' |
|
| 33 | + ]; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
@@ -56,50 +56,50 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | function auth_ldap_dist($login, $pass, $serveur = '', $phpauth = false) { |
| 58 | 58 | |
| 59 | - #spip_log("ldap $login " . ($pass ? "mdp fourni" : "mdp absent")); |
|
| 60 | - |
|
| 61 | - // Utilisateur connu ? |
|
| 62 | - // si http auth, inutile de reauthentifier: cela |
|
| 63 | - // ne marchera pas avec auth http autre que basic. |
|
| 64 | - $checkpass = isset($_SERVER['REMOTE_USER']) ? false : true; |
|
| 65 | - if (!($dn = auth_ldap_search($login, $pass, $checkpass, $serveur))) { |
|
| 66 | - return []; |
|
| 67 | - } |
|
| 68 | - $credentials_ldap = ['ldap_dn' => $dn, 'ldap_password' => $pass]; |
|
| 69 | - |
|
| 70 | - // Si l'utilisateur figure deja dans la base, y recuperer les infos |
|
| 71 | - $r = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login) . " AND source='ldap'", '', '', '', '', $serveur); |
|
| 72 | - |
|
| 73 | - if ($r) { |
|
| 74 | - return array_merge($r, $credentials_ldap); |
|
| 75 | - } |
|
| 76 | - |
|
| 77 | - // sinon importer les infos depuis LDAP, |
|
| 78 | - |
|
| 79 | - if ( |
|
| 80 | - $GLOBALS['meta']['ldap_statut_import'] |
|
| 81 | - and $desc = auth_ldap_retrouver($dn, [], $serveur) |
|
| 82 | - ) { |
|
| 83 | - // rajouter le statut indique a l'install |
|
| 84 | - $desc['statut'] = $GLOBALS['meta']['ldap_statut_import']; |
|
| 85 | - $desc['login'] = $login; |
|
| 86 | - $desc['source'] = 'ldap'; |
|
| 87 | - $desc['pass'] = ''; |
|
| 88 | - |
|
| 89 | - $r = sql_insertq('spip_auteurs', $desc, [], $serveur); |
|
| 90 | - } |
|
| 91 | - |
|
| 92 | - if ($r) { |
|
| 93 | - return array_merge( |
|
| 94 | - $credentials_ldap, |
|
| 95 | - sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($r), '', '', '', '', $serveur) |
|
| 96 | - ); |
|
| 97 | - } |
|
| 98 | - |
|
| 99 | - // sinon echec |
|
| 100 | - spip_log("Creation de l'auteur '$login' impossible"); |
|
| 101 | - |
|
| 102 | - return []; |
|
| 59 | + #spip_log("ldap $login " . ($pass ? "mdp fourni" : "mdp absent")); |
|
| 60 | + |
|
| 61 | + // Utilisateur connu ? |
|
| 62 | + // si http auth, inutile de reauthentifier: cela |
|
| 63 | + // ne marchera pas avec auth http autre que basic. |
|
| 64 | + $checkpass = isset($_SERVER['REMOTE_USER']) ? false : true; |
|
| 65 | + if (!($dn = auth_ldap_search($login, $pass, $checkpass, $serveur))) { |
|
| 66 | + return []; |
|
| 67 | + } |
|
| 68 | + $credentials_ldap = ['ldap_dn' => $dn, 'ldap_password' => $pass]; |
|
| 69 | + |
|
| 70 | + // Si l'utilisateur figure deja dans la base, y recuperer les infos |
|
| 71 | + $r = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login) . " AND source='ldap'", '', '', '', '', $serveur); |
|
| 72 | + |
|
| 73 | + if ($r) { |
|
| 74 | + return array_merge($r, $credentials_ldap); |
|
| 75 | + } |
|
| 76 | + |
|
| 77 | + // sinon importer les infos depuis LDAP, |
|
| 78 | + |
|
| 79 | + if ( |
|
| 80 | + $GLOBALS['meta']['ldap_statut_import'] |
|
| 81 | + and $desc = auth_ldap_retrouver($dn, [], $serveur) |
|
| 82 | + ) { |
|
| 83 | + // rajouter le statut indique a l'install |
|
| 84 | + $desc['statut'] = $GLOBALS['meta']['ldap_statut_import']; |
|
| 85 | + $desc['login'] = $login; |
|
| 86 | + $desc['source'] = 'ldap'; |
|
| 87 | + $desc['pass'] = ''; |
|
| 88 | + |
|
| 89 | + $r = sql_insertq('spip_auteurs', $desc, [], $serveur); |
|
| 90 | + } |
|
| 91 | + |
|
| 92 | + if ($r) { |
|
| 93 | + return array_merge( |
|
| 94 | + $credentials_ldap, |
|
| 95 | + sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . intval($r), '', '', '', '', $serveur) |
|
| 96 | + ); |
|
| 97 | + } |
|
| 98 | + |
|
| 99 | + // sinon echec |
|
| 100 | + spip_log("Creation de l'auteur '$login' impossible"); |
|
| 101 | + |
|
| 102 | + return []; |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
@@ -113,36 +113,36 @@ discard block |
||
| 113 | 113 | * @return array |
| 114 | 114 | */ |
| 115 | 115 | function auth_ldap_connect($serveur = '') { |
| 116 | - include_spip('base/connect_sql'); |
|
| 117 | - static $connexions_ldap = []; |
|
| 118 | - if (isset($connexions_ldap[$serveur])) { |
|
| 119 | - return $connexions_ldap[$serveur]; |
|
| 120 | - } |
|
| 121 | - $connexion = spip_connect($serveur); |
|
| 122 | - if (!is_array($connexion['ldap'])) { |
|
| 123 | - if ($connexion['authentification']['ldap']) { |
|
| 124 | - $f = _DIR_CONNECT . $connexion['authentification']['ldap']; |
|
| 125 | - unset($GLOBALS['ldap_link']); |
|
| 126 | - if (is_readable($f)) { |
|
| 127 | - include_once($f); |
|
| 128 | - }; |
|
| 129 | - if (isset($GLOBALS['ldap_link'])) { |
|
| 130 | - $connexion['ldap'] = [ |
|
| 131 | - 'link' => $GLOBALS['ldap_link'], |
|
| 132 | - 'base' => $GLOBALS['ldap_base'] |
|
| 133 | - ]; |
|
| 134 | - } else { |
|
| 135 | - spip_log("connection LDAP $serveur mal definie dans $f"); |
|
| 136 | - } |
|
| 137 | - if (isset($GLOBALS['ldap_champs'])) { |
|
| 138 | - $connexion['ldap']['attributes'] = $GLOBALS['ldap_champs']; |
|
| 139 | - } |
|
| 140 | - } else { |
|
| 141 | - spip_log("connection LDAP $serveur inconnue"); |
|
| 142 | - } |
|
| 143 | - } |
|
| 144 | - |
|
| 145 | - return $connexions_ldap[$serveur] = $connexion['ldap']; |
|
| 116 | + include_spip('base/connect_sql'); |
|
| 117 | + static $connexions_ldap = []; |
|
| 118 | + if (isset($connexions_ldap[$serveur])) { |
|
| 119 | + return $connexions_ldap[$serveur]; |
|
| 120 | + } |
|
| 121 | + $connexion = spip_connect($serveur); |
|
| 122 | + if (!is_array($connexion['ldap'])) { |
|
| 123 | + if ($connexion['authentification']['ldap']) { |
|
| 124 | + $f = _DIR_CONNECT . $connexion['authentification']['ldap']; |
|
| 125 | + unset($GLOBALS['ldap_link']); |
|
| 126 | + if (is_readable($f)) { |
|
| 127 | + include_once($f); |
|
| 128 | + }; |
|
| 129 | + if (isset($GLOBALS['ldap_link'])) { |
|
| 130 | + $connexion['ldap'] = [ |
|
| 131 | + 'link' => $GLOBALS['ldap_link'], |
|
| 132 | + 'base' => $GLOBALS['ldap_base'] |
|
| 133 | + ]; |
|
| 134 | + } else { |
|
| 135 | + spip_log("connection LDAP $serveur mal definie dans $f"); |
|
| 136 | + } |
|
| 137 | + if (isset($GLOBALS['ldap_champs'])) { |
|
| 138 | + $connexion['ldap']['attributes'] = $GLOBALS['ldap_champs']; |
|
| 139 | + } |
|
| 140 | + } else { |
|
| 141 | + spip_log("connection LDAP $serveur inconnue"); |
|
| 142 | + } |
|
| 143 | + } |
|
| 144 | + |
|
| 145 | + return $connexions_ldap[$serveur] = $connexion['ldap']; |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /** |
@@ -156,52 +156,52 @@ discard block |
||
| 156 | 156 | * Le login trouvé ou chaine vide si non trouvé |
| 157 | 157 | */ |
| 158 | 158 | function auth_ldap_search($login, $pass, $checkpass = true, $serveur = '') { |
| 159 | - // Securite anti-injection et contre un serveur LDAP laxiste |
|
| 160 | - $login_search = preg_replace('/[^-@._\s\d\w]/', '', $login); |
|
| 161 | - if (!strlen($login_search) or ($checkpass and !strlen($pass))) { |
|
| 162 | - return ''; |
|
| 163 | - } |
|
| 164 | - |
|
| 165 | - // verifier la connexion |
|
| 166 | - if (!$ldap = auth_ldap_connect($serveur)) { |
|
| 167 | - return ''; |
|
| 168 | - } |
|
| 169 | - |
|
| 170 | - $ldap_link = $ldap['link'] ?? null; |
|
| 171 | - $ldap_base = $ldap['base'] ?? null; |
|
| 172 | - $desc = !empty($ldap['attributes']) ? $ldap['attributes'] : $GLOBALS['ldap_attributes']; |
|
| 173 | - |
|
| 174 | - $logins = is_array($desc['login']) ? $desc['login'] : [$desc['login']]; |
|
| 175 | - |
|
| 176 | - // Tenter une recherche pour essayer de retrouver le DN |
|
| 177 | - foreach ($logins as $att) { |
|
| 178 | - $result = @ldap_search($ldap_link, $ldap_base, "$att=$login_search", ['dn']); |
|
| 179 | - $info = @ldap_get_entries($ldap_link, $result); |
|
| 180 | - // Ne pas accepter les resultats si plus d'une entree |
|
| 181 | - // (on veut un attribut unique) |
|
| 182 | - |
|
| 183 | - if (is_array($info) and $info['count'] == 1) { |
|
| 184 | - $dn = $info[0]['dn']; |
|
| 185 | - if (!$checkpass) { |
|
| 186 | - return $dn; |
|
| 187 | - } |
|
| 188 | - if (@ldap_bind($ldap_link, $dn, $pass)) { |
|
| 189 | - return $dn; |
|
| 190 | - } |
|
| 191 | - } |
|
| 192 | - } |
|
| 193 | - |
|
| 194 | - if ($checkpass and !isset($dn)) { |
|
| 195 | - // Si echec, essayer de deviner le DN |
|
| 196 | - foreach ($logins as $att) { |
|
| 197 | - $dn = "$att=$login_search, $ldap_base"; |
|
| 198 | - if (@ldap_bind($ldap_link, $dn, $pass)) { |
|
| 199 | - return "$att=$login_search, $ldap_base"; |
|
| 200 | - } |
|
| 201 | - } |
|
| 202 | - } |
|
| 203 | - |
|
| 204 | - return ''; |
|
| 159 | + // Securite anti-injection et contre un serveur LDAP laxiste |
|
| 160 | + $login_search = preg_replace('/[^-@._\s\d\w]/', '', $login); |
|
| 161 | + if (!strlen($login_search) or ($checkpass and !strlen($pass))) { |
|
| 162 | + return ''; |
|
| 163 | + } |
|
| 164 | + |
|
| 165 | + // verifier la connexion |
|
| 166 | + if (!$ldap = auth_ldap_connect($serveur)) { |
|
| 167 | + return ''; |
|
| 168 | + } |
|
| 169 | + |
|
| 170 | + $ldap_link = $ldap['link'] ?? null; |
|
| 171 | + $ldap_base = $ldap['base'] ?? null; |
|
| 172 | + $desc = !empty($ldap['attributes']) ? $ldap['attributes'] : $GLOBALS['ldap_attributes']; |
|
| 173 | + |
|
| 174 | + $logins = is_array($desc['login']) ? $desc['login'] : [$desc['login']]; |
|
| 175 | + |
|
| 176 | + // Tenter une recherche pour essayer de retrouver le DN |
|
| 177 | + foreach ($logins as $att) { |
|
| 178 | + $result = @ldap_search($ldap_link, $ldap_base, "$att=$login_search", ['dn']); |
|
| 179 | + $info = @ldap_get_entries($ldap_link, $result); |
|
| 180 | + // Ne pas accepter les resultats si plus d'une entree |
|
| 181 | + // (on veut un attribut unique) |
|
| 182 | + |
|
| 183 | + if (is_array($info) and $info['count'] == 1) { |
|
| 184 | + $dn = $info[0]['dn']; |
|
| 185 | + if (!$checkpass) { |
|
| 186 | + return $dn; |
|
| 187 | + } |
|
| 188 | + if (@ldap_bind($ldap_link, $dn, $pass)) { |
|
| 189 | + return $dn; |
|
| 190 | + } |
|
| 191 | + } |
|
| 192 | + } |
|
| 193 | + |
|
| 194 | + if ($checkpass and !isset($dn)) { |
|
| 195 | + // Si echec, essayer de deviner le DN |
|
| 196 | + foreach ($logins as $att) { |
|
| 197 | + $dn = "$att=$login_search, $ldap_base"; |
|
| 198 | + if (@ldap_bind($ldap_link, $dn, $pass)) { |
|
| 199 | + return "$att=$login_search, $ldap_base"; |
|
| 200 | + } |
|
| 201 | + } |
|
| 202 | + } |
|
| 203 | + |
|
| 204 | + return ''; |
|
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | /** |
@@ -213,40 +213,40 @@ discard block |
||
| 213 | 213 | * @return array |
| 214 | 214 | */ |
| 215 | 215 | function auth_ldap_retrouver($dn, $desc = [], $serveur = '') { |
| 216 | - // Lire les infos sur l'utilisateur a partir de son DN depuis LDAP |
|
| 216 | + // Lire les infos sur l'utilisateur a partir de son DN depuis LDAP |
|
| 217 | 217 | |
| 218 | - if (!$ldap = auth_ldap_connect($serveur)) { |
|
| 219 | - spip_log("ldap $serveur injoignable"); |
|
| 218 | + if (!$ldap = auth_ldap_connect($serveur)) { |
|
| 219 | + spip_log("ldap $serveur injoignable"); |
|
| 220 | 220 | |
| 221 | - return []; |
|
| 222 | - } |
|
| 221 | + return []; |
|
| 222 | + } |
|
| 223 | 223 | |
| 224 | - $ldap_link = $ldap['link']; |
|
| 225 | - if (!$desc) { |
|
| 226 | - $desc = $ldap['attributes'] ?: $GLOBALS['ldap_attributes']; |
|
| 227 | - unset($desc['login']); |
|
| 228 | - } |
|
| 229 | - $result = @ldap_read($ldap_link, $dn, 'objectClass=*', array_values($desc)); |
|
| 224 | + $ldap_link = $ldap['link']; |
|
| 225 | + if (!$desc) { |
|
| 226 | + $desc = $ldap['attributes'] ?: $GLOBALS['ldap_attributes']; |
|
| 227 | + unset($desc['login']); |
|
| 228 | + } |
|
| 229 | + $result = @ldap_read($ldap_link, $dn, 'objectClass=*', array_values($desc)); |
|
| 230 | 230 | |
| 231 | - if (!$result) { |
|
| 232 | - return []; |
|
| 233 | - } |
|
| 231 | + if (!$result) { |
|
| 232 | + return []; |
|
| 233 | + } |
|
| 234 | 234 | |
| 235 | - // Recuperer les donnees du premier (unique?) compte de l'auteur |
|
| 236 | - $val = @ldap_get_entries($ldap_link, $result); |
|
| 237 | - if (!is_array($val) or !is_array($val[0])) { |
|
| 238 | - return []; |
|
| 239 | - } |
|
| 240 | - $val = $val[0]; |
|
| 235 | + // Recuperer les donnees du premier (unique?) compte de l'auteur |
|
| 236 | + $val = @ldap_get_entries($ldap_link, $result); |
|
| 237 | + if (!is_array($val) or !is_array($val[0])) { |
|
| 238 | + return []; |
|
| 239 | + } |
|
| 240 | + $val = $val[0]; |
|
| 241 | 241 | |
| 242 | - // Convertir depuis UTF-8 (jeu de caracteres par defaut) |
|
| 243 | - include_spip('inc/charsets'); |
|
| 242 | + // Convertir depuis UTF-8 (jeu de caracteres par defaut) |
|
| 243 | + include_spip('inc/charsets'); |
|
| 244 | 244 | |
| 245 | - foreach ($desc as $k => $v) { |
|
| 246 | - $desc[$k] = importer_charset($val[strtolower($v)][0], 'utf-8'); |
|
| 247 | - } |
|
| 245 | + foreach ($desc as $k => $v) { |
|
| 246 | + $desc[$k] = importer_charset($val[strtolower($v)][0], 'utf-8'); |
|
| 247 | + } |
|
| 248 | 248 | |
| 249 | - return $desc; |
|
| 249 | + return $desc; |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | * @return string |
| 259 | 259 | */ |
| 260 | 260 | function auth_ldap_retrouver_login($login, $serveur = '') { |
| 261 | - return auth_ldap_search($login, '', false, $serveur) ? $login : ''; |
|
| 261 | + return auth_ldap_search($login, '', false, $serveur) ? $login : ''; |
|
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | /** |
@@ -278,9 +278,9 @@ discard block |
||
| 278 | 278 | * Message d'erreur si login non valide, chaîne vide sinon |
| 279 | 279 | */ |
| 280 | 280 | function auth_ldap_verifier_pass($login, $new_pass, $id_auteur = 0, $serveur = '') { |
| 281 | - include_spip('auth/spip'); |
|
| 281 | + include_spip('auth/spip'); |
|
| 282 | 282 | |
| 283 | - return auth_spip_verifier_pass($login, $new_pass, $id_auteur, $serveur); |
|
| 283 | + return auth_spip_verifier_pass($login, $new_pass, $id_auteur, $serveur); |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | /** |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | * ``` |
| 302 | 302 | */ |
| 303 | 303 | function auth_ldap_autoriser_modifier_pass($serveur = '') { |
| 304 | - return true; |
|
| 304 | + return true; |
|
| 305 | 305 | } |
| 306 | 306 | |
| 307 | 307 | /** |
@@ -319,23 +319,23 @@ discard block |
||
| 319 | 319 | * Informe du succès ou de l'echec du changement du mot de passe |
| 320 | 320 | */ |
| 321 | 321 | function auth_ldap_modifier_pass($login, $new_pass, $id_auteur, $serveur = '') { |
| 322 | - if (is_null($new_pass) or auth_ldap_verifier_pass($login, $new_pass, $id_auteur, $serveur) != '') { |
|
| 323 | - return false; |
|
| 324 | - } |
|
| 325 | - if (!$ldap = auth_ldap_connect($serveur)) { |
|
| 326 | - return false; |
|
| 327 | - } |
|
| 328 | - $link = $ldap['link']; |
|
| 329 | - include_spip('inc/session'); |
|
| 330 | - $dn = session_get('ldap_dn'); |
|
| 331 | - if ('' == $dn) { |
|
| 332 | - return false; |
|
| 333 | - } |
|
| 334 | - if (!ldap_bind($link, $dn, session_get('ldap_password'))) { |
|
| 335 | - return false; |
|
| 336 | - } |
|
| 337 | - $encoded_pass = '{MD5}' . base64_encode(pack('H*', md5($new_pass))); |
|
| 338 | - $success = ldap_mod_replace($link, $dn, ['userPassword' => $encoded_pass]); |
|
| 339 | - |
|
| 340 | - return $success; |
|
| 322 | + if (is_null($new_pass) or auth_ldap_verifier_pass($login, $new_pass, $id_auteur, $serveur) != '') { |
|
| 323 | + return false; |
|
| 324 | + } |
|
| 325 | + if (!$ldap = auth_ldap_connect($serveur)) { |
|
| 326 | + return false; |
|
| 327 | + } |
|
| 328 | + $link = $ldap['link']; |
|
| 329 | + include_spip('inc/session'); |
|
| 330 | + $dn = session_get('ldap_dn'); |
|
| 331 | + if ('' == $dn) { |
|
| 332 | + return false; |
|
| 333 | + } |
|
| 334 | + if (!ldap_bind($link, $dn, session_get('ldap_password'))) { |
|
| 335 | + return false; |
|
| 336 | + } |
|
| 337 | + $encoded_pass = '{MD5}' . base64_encode(pack('H*', md5($new_pass))); |
|
| 338 | + $success = ldap_mod_replace($link, $dn, ['userPassword' => $encoded_pass]); |
|
| 339 | + |
|
| 340 | + return $success; |
|
| 341 | 341 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | **/ |
| 18 | 18 | |
| 19 | 19 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 20 | - return; |
|
| 20 | + return; |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | /** |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * Pile complétée du code compilé |
| 38 | 38 | **/ |
| 39 | 39 | function balise_MENU_LANG_ECRIRE($p) { |
| 40 | - return calculer_balise_dynamique($p, 'MENU_LANG_ECRIRE', ['lang']); |
|
| 40 | + return calculer_balise_dynamique($p, 'MENU_LANG_ECRIRE', ['lang']); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -56,12 +56,12 @@ discard block |
||
| 56 | 56 | * - string: Si pas de multilinguisme |
| 57 | 57 | */ |
| 58 | 58 | function balise_MENU_LANG_ECRIRE_stat($args, $context_compil) { |
| 59 | - include_spip('inc/lang'); |
|
| 60 | - if (strpos($GLOBALS['meta']['langues_proposees'], ',') === false) { |
|
| 61 | - return ''; |
|
| 62 | - } |
|
| 59 | + include_spip('inc/lang'); |
|
| 60 | + if (strpos($GLOBALS['meta']['langues_proposees'], ',') === false) { |
|
| 61 | + return ''; |
|
| 62 | + } |
|
| 63 | 63 | |
| 64 | - return $args; |
|
| 64 | + return $args; |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * Liste : Chemin du squelette, durée du cache, contexte |
| 78 | 78 | **/ |
| 79 | 79 | function balise_MENU_LANG_ECRIRE_dyn($opt) { |
| 80 | - return menu_lang_pour_tous('var_lang_ecrire', $opt); |
|
| 80 | + return menu_lang_pour_tous('var_lang_ecrire', $opt); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
@@ -97,30 +97,30 @@ discard block |
||
| 97 | 97 | * Liste : Chemin du squelette, durée du cache, contexte |
| 98 | 98 | **/ |
| 99 | 99 | function menu_lang_pour_tous($nom, $default) { |
| 100 | - include_spip('inc/lang'); |
|
| 100 | + include_spip('inc/lang'); |
|
| 101 | 101 | |
| 102 | - if ($GLOBALS['spip_lang'] <> $default) { |
|
| 103 | - $opt = lang_select($default); # et remplace |
|
| 104 | - if ($GLOBALS['spip_lang'] <> $default) { |
|
| 105 | - $default = ''; # annule tout choix par defaut |
|
| 106 | - if ($opt) { |
|
| 107 | - lang_select(); |
|
| 108 | - } |
|
| 109 | - } |
|
| 110 | - } |
|
| 102 | + if ($GLOBALS['spip_lang'] <> $default) { |
|
| 103 | + $opt = lang_select($default); # et remplace |
|
| 104 | + if ($GLOBALS['spip_lang'] <> $default) { |
|
| 105 | + $default = ''; # annule tout choix par defaut |
|
| 106 | + if ($opt) { |
|
| 107 | + lang_select(); |
|
| 108 | + } |
|
| 109 | + } |
|
| 110 | + } |
|
| 111 | 111 | |
| 112 | - # lien a partir de / |
|
| 113 | - $cible = parametre_url(self(), 'lang', '', '&'); |
|
| 114 | - $post = generer_url_action('converser', 'redirect=' . rawurlencode($cible), true); |
|
| 112 | + # lien a partir de / |
|
| 113 | + $cible = parametre_url(self(), 'lang', '', '&'); |
|
| 114 | + $post = generer_url_action('converser', 'redirect=' . rawurlencode($cible), true); |
|
| 115 | 115 | |
| 116 | - return [ |
|
| 117 | - 'formulaires/menu_lang', |
|
| 118 | - 3600, |
|
| 119 | - [ |
|
| 120 | - 'nom' => $nom, |
|
| 121 | - 'url' => $post, |
|
| 122 | - 'name' => $nom, |
|
| 123 | - 'default' => $default, |
|
| 124 | - ] |
|
| 125 | - ]; |
|
| 116 | + return [ |
|
| 117 | + 'formulaires/menu_lang', |
|
| 118 | + 3600, |
|
| 119 | + [ |
|
| 120 | + 'nom' => $nom, |
|
| 121 | + 'url' => $post, |
|
| 122 | + 'name' => $nom, |
|
| 123 | + 'default' => $default, |
|
| 124 | + ] |
|
| 125 | + ]; |
|
| 126 | 126 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | **/ |
| 23 | 23 | |
| 24 | 24 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 25 | - return; |
|
| 25 | + return; |
|
| 26 | 26 | } |
| 27 | 27 | include_spip('inc/filtres'); |
| 28 | 28 | |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | * @return string Rien. |
| 40 | 40 | **/ |
| 41 | 41 | function filtre_image_dist($t) { |
| 42 | - return ''; |
|
| 42 | + return ''; |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * @return string Rien. |
| 53 | 53 | **/ |
| 54 | 54 | function filtre_audio_dist($t) { |
| 55 | - return ''; |
|
| 55 | + return ''; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @return string Rien. |
| 66 | 66 | **/ |
| 67 | 67 | function filtre_video_dist($t) { |
| 68 | - return ''; |
|
| 68 | + return ''; |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /** |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * @return string Rien. |
| 79 | 79 | **/ |
| 80 | 80 | function filtre_application_dist($t) { |
| 81 | - return ''; |
|
| 81 | + return ''; |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | * @return string Rien. |
| 92 | 92 | **/ |
| 93 | 93 | function filtre_message_dist($t) { |
| 94 | - return ''; |
|
| 94 | + return ''; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * @return string Rien. |
| 105 | 105 | **/ |
| 106 | 106 | function filtre_multipart_dist($t) { |
| 107 | - return ''; |
|
| 107 | + return ''; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -117,10 +117,10 @@ discard block |
||
| 117 | 117 | * @return string Contenu échappé. |
| 118 | 118 | **/ |
| 119 | 119 | function filtre_text_dist($t) { |
| 120 | - static $t1 = ['&', '<', '>']; |
|
| 121 | - static $t2 = ['&', '<', '>']; |
|
| 120 | + static $t1 = ['&', '<', '>']; |
|
| 121 | + static $t2 = ['&', '<', '>']; |
|
| 122 | 122 | |
| 123 | - return '<pre>' . str_replace($t1, $t2, (string) $t) . '</pre>'; |
|
| 123 | + return '<pre>' . str_replace($t1, $t2, (string) $t) . '</pre>'; |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
@@ -135,21 +135,21 @@ discard block |
||
| 135 | 135 | * Tableau (formaté en SPIP) |
| 136 | 136 | **/ |
| 137 | 137 | function filtre_text_csv_dist($t) { |
| 138 | - include_spip('inc/csv'); |
|
| 139 | - [$entete, $lignes, $caption] = analyse_csv($t); |
|
| 140 | - foreach ($lignes as &$l) { |
|
| 141 | - $l = join('|', $l); |
|
| 142 | - } |
|
| 143 | - $corps = join("\n", $lignes) . "\n"; |
|
| 144 | - $corps = $caption . |
|
| 145 | - "\n|{{" . |
|
| 146 | - join('}}|{{', $entete) . |
|
| 147 | - '}}|' . |
|
| 148 | - "\n|" . |
|
| 149 | - str_replace("\n", "|\n|", $corps); |
|
| 150 | - include_spip('inc/texte'); |
|
| 151 | - |
|
| 152 | - return propre($corps); |
|
| 138 | + include_spip('inc/csv'); |
|
| 139 | + [$entete, $lignes, $caption] = analyse_csv($t); |
|
| 140 | + foreach ($lignes as &$l) { |
|
| 141 | + $l = join('|', $l); |
|
| 142 | + } |
|
| 143 | + $corps = join("\n", $lignes) . "\n"; |
|
| 144 | + $corps = $caption . |
|
| 145 | + "\n|{{" . |
|
| 146 | + join('}}|{{', $entete) . |
|
| 147 | + '}}|' . |
|
| 148 | + "\n|" . |
|
| 149 | + str_replace("\n", "|\n|", $corps); |
|
| 150 | + include_spip('inc/texte'); |
|
| 151 | + |
|
| 152 | + return propre($corps); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | /** |
@@ -163,33 +163,33 @@ discard block |
||
| 163 | 163 | * @return string Code html sécurisé ou texte échappé |
| 164 | 164 | **/ |
| 165 | 165 | function filtre_text_html_dist($t) { |
| 166 | - if (!preg_match(',^(.*?)<body[^>]*>(.*)</body>,is', $t, $r)) { |
|
| 167 | - return appliquer_filtre($t, 'text/plain'); |
|
| 168 | - } |
|
| 169 | - |
|
| 170 | - [, $h, $t] = $r; |
|
| 171 | - |
|
| 172 | - $style = ''; |
|
| 173 | - // recuperer les styles internes |
|
| 174 | - if (preg_match_all(',<style>(.*?)</style>,is', $h, $r, PREG_PATTERN_ORDER)) { |
|
| 175 | - $style = join("\n", $r[1]); |
|
| 176 | - } |
|
| 177 | - // ... et externes |
|
| 178 | - |
|
| 179 | - include_spip('inc/distant'); |
|
| 180 | - if (preg_match_all(',<link[^>]+type=.text/css[^>]*>,is', $h, $r, PREG_PATTERN_ORDER)) { |
|
| 181 | - foreach ($r[0] as $l) { |
|
| 182 | - preg_match("/href='([^']*)'/", str_replace('"', "'", $l), $m); |
|
| 183 | - $page = recuperer_url($m[1]); |
|
| 184 | - $page = $page['page'] ?? ''; |
|
| 185 | - $style .= "\n/* $l */\n" |
|
| 186 | - . str_replace('<', '', $page); |
|
| 187 | - } |
|
| 188 | - } |
|
| 189 | - // Pourquoi SafeHtml transforme-t-il en texte les scripts dans Body ? |
|
| 190 | - $t = safehtml(preg_replace(',<script' . '.*?</script>,is', '', $t)); |
|
| 191 | - |
|
| 192 | - return (!$style ? '' : "\n<style>" . $style . '</style>') . $t; |
|
| 166 | + if (!preg_match(',^(.*?)<body[^>]*>(.*)</body>,is', $t, $r)) { |
|
| 167 | + return appliquer_filtre($t, 'text/plain'); |
|
| 168 | + } |
|
| 169 | + |
|
| 170 | + [, $h, $t] = $r; |
|
| 171 | + |
|
| 172 | + $style = ''; |
|
| 173 | + // recuperer les styles internes |
|
| 174 | + if (preg_match_all(',<style>(.*?)</style>,is', $h, $r, PREG_PATTERN_ORDER)) { |
|
| 175 | + $style = join("\n", $r[1]); |
|
| 176 | + } |
|
| 177 | + // ... et externes |
|
| 178 | + |
|
| 179 | + include_spip('inc/distant'); |
|
| 180 | + if (preg_match_all(',<link[^>]+type=.text/css[^>]*>,is', $h, $r, PREG_PATTERN_ORDER)) { |
|
| 181 | + foreach ($r[0] as $l) { |
|
| 182 | + preg_match("/href='([^']*)'/", str_replace('"', "'", $l), $m); |
|
| 183 | + $page = recuperer_url($m[1]); |
|
| 184 | + $page = $page['page'] ?? ''; |
|
| 185 | + $style .= "\n/* $l */\n" |
|
| 186 | + . str_replace('<', '', $page); |
|
| 187 | + } |
|
| 188 | + } |
|
| 189 | + // Pourquoi SafeHtml transforme-t-il en texte les scripts dans Body ? |
|
| 190 | + $t = safehtml(preg_replace(',<script' . '.*?</script>,is', '', $t)); |
|
| 191 | + |
|
| 192 | + return (!$style ? '' : "\n<style>" . $style . '</style>') . $t; |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /** |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | * @return string Code HTML des balises `<param>` |
| 203 | 203 | **/ |
| 204 | 204 | function filtre_audio_x_pn_realaudio($id) { |
| 205 | - return " |
|
| 205 | + return " |
|
| 206 | 206 | <param name='controls' value='PositionSlider' /> |
| 207 | 207 | <param name='controls' value='ImageWindow' /> |
| 208 | 208 | <param name='controls' value='PlayButton' /> |
@@ -4,510 +4,510 @@ discard block |
||
| 4 | 4 | // ** ne pas modifier le fichier ** |
| 5 | 5 | |
| 6 | 6 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 7 | - return; |
|
| 7 | + return; |
|
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | $GLOBALS[$GLOBALS['idx_lang']] = array( |
| 11 | 11 | |
| 12 | - // A |
|
| 13 | - 'access_interface_graphique' => '返回完整显示模式', |
|
| 14 | - 'access_mode_texte' => '显示简洁显示模式', |
|
| 15 | - 'admin_debug' => '除錯', |
|
| 16 | - 'admin_modifier_article' => '修改文章', |
|
| 17 | - 'admin_modifier_auteur' => '修改作者', |
|
| 18 | - 'admin_modifier_breve' => '修改简要', |
|
| 19 | - 'admin_modifier_mot' => '修改关键词', |
|
| 20 | - 'admin_modifier_rubrique' => '修改此栏', |
|
| 21 | - 'admin_recalculer' => '刷新页面', |
|
| 22 | - 'afficher_trad' => '显示译文', |
|
| 23 | - 'alerte_maj_impossible' => '<b>警告!</b> 更新SQL到版本 @version@失败, 可能是数据库权限问题. 请联系您的ISP(INTERNET服务提供商) .', # MODIF |
|
| 24 | - 'alerte_modif_info_concourante' => '注意:这条信息在别处被更改。目前值为 :', # MODIF |
|
| 25 | - 'analyse_xml' => 'XML分析', |
|
| 26 | - 'annuler' => '取消', |
|
| 27 | - 'antispam_champ_vide' => '请保留此格空白:', |
|
| 28 | - 'articles_recents' => '最新文章', |
|
| 29 | - 'avis_archive_incorrect' => '打包文件不是有效的SPIP文件', |
|
| 30 | - 'avis_archive_invalide' => '打包文件无效', |
|
| 31 | - 'avis_attention' => '注意!', |
|
| 32 | - 'avis_champ_incorrect_type_objet' => '无效名 @name@ 对象名 @type@', |
|
| 33 | - 'avis_colonne_inexistante' => ' @col@ 列不存在', |
|
| 34 | - 'avis_erreur' => '错误: 参见以下', |
|
| 35 | - 'avis_erreur_connexion' => '连接失败', |
|
| 36 | - 'avis_erreur_cookie' => 'cookie错误', |
|
| 37 | - 'avis_erreur_fonction_contexte' => '程序失败. 该功能不能在此调用.', # MODIF |
|
| 38 | - 'avis_erreur_mysql' => 'SQL错误', # MODIF |
|
| 39 | - 'avis_erreur_sauvegarde' => '@type@ @id_objet@备份失败!', |
|
| 40 | - 'avis_erreur_visiteur' => '访问个人空间出错', |
|
| 12 | + // A |
|
| 13 | + 'access_interface_graphique' => '返回完整显示模式', |
|
| 14 | + 'access_mode_texte' => '显示简洁显示模式', |
|
| 15 | + 'admin_debug' => '除錯', |
|
| 16 | + 'admin_modifier_article' => '修改文章', |
|
| 17 | + 'admin_modifier_auteur' => '修改作者', |
|
| 18 | + 'admin_modifier_breve' => '修改简要', |
|
| 19 | + 'admin_modifier_mot' => '修改关键词', |
|
| 20 | + 'admin_modifier_rubrique' => '修改此栏', |
|
| 21 | + 'admin_recalculer' => '刷新页面', |
|
| 22 | + 'afficher_trad' => '显示译文', |
|
| 23 | + 'alerte_maj_impossible' => '<b>警告!</b> 更新SQL到版本 @version@失败, 可能是数据库权限问题. 请联系您的ISP(INTERNET服务提供商) .', # MODIF |
|
| 24 | + 'alerte_modif_info_concourante' => '注意:这条信息在别处被更改。目前值为 :', # MODIF |
|
| 25 | + 'analyse_xml' => 'XML分析', |
|
| 26 | + 'annuler' => '取消', |
|
| 27 | + 'antispam_champ_vide' => '请保留此格空白:', |
|
| 28 | + 'articles_recents' => '最新文章', |
|
| 29 | + 'avis_archive_incorrect' => '打包文件不是有效的SPIP文件', |
|
| 30 | + 'avis_archive_invalide' => '打包文件无效', |
|
| 31 | + 'avis_attention' => '注意!', |
|
| 32 | + 'avis_champ_incorrect_type_objet' => '无效名 @name@ 对象名 @type@', |
|
| 33 | + 'avis_colonne_inexistante' => ' @col@ 列不存在', |
|
| 34 | + 'avis_erreur' => '错误: 参见以下', |
|
| 35 | + 'avis_erreur_connexion' => '连接失败', |
|
| 36 | + 'avis_erreur_cookie' => 'cookie错误', |
|
| 37 | + 'avis_erreur_fonction_contexte' => '程序失败. 该功能不能在此调用.', # MODIF |
|
| 38 | + 'avis_erreur_mysql' => 'SQL错误', # MODIF |
|
| 39 | + 'avis_erreur_sauvegarde' => '@type@ @id_objet@备份失败!', |
|
| 40 | + 'avis_erreur_visiteur' => '访问个人空间出错', |
|
| 41 | 41 | |
| 42 | - // B |
|
| 43 | - 'barre_a_accent_grave' => '插入加重的字符', |
|
| 44 | - 'barre_aide' => '用象征图快捷定义展出', |
|
| 45 | - 'barre_e_accent_aigu' => '插入加重的E ', |
|
| 46 | - 'barre_eo' => '插入oe [法文输入]', |
|
| 47 | - 'barre_eo_maj' => '在O之后插入E[法文OE输入]', |
|
| 48 | - 'barre_euro' => '插入欧元标志€', |
|
| 49 | - 'barre_gras' => '置为{{黑体}}', |
|
| 50 | - 'barre_guillemets' => '加双引号', |
|
| 51 | - 'barre_guillemets_simples' => '加单引号', |
|
| 52 | - 'barre_intertitre' => '转为{{{小标题}}}', |
|
| 53 | - 'barre_italic' => '置为{斜体}', |
|
| 54 | - 'barre_lien' => '转为超文本链接[http://...]', |
|
| 55 | - 'barre_lien_input' => '请输入目标链接(您可以使用 http://www.mysite.com的格式或直接指出在本站中该文章的编号).', |
|
| 56 | - 'barre_note' => '转为[[页尾标号]]', |
|
| 57 | - 'barre_paragraphe' => '新建段落', # MODIF |
|
| 58 | - 'barre_quote' => '<quote>引用一个消息</quote>', |
|
| 59 | - 'bouton_changer' => '修改', |
|
| 60 | - 'bouton_chercher' => '搜索', |
|
| 61 | - 'bouton_choisir' => '选择', |
|
| 62 | - 'bouton_enregistrer' => '保存', |
|
| 63 | - 'bouton_radio_desactiver_messagerie_interne' => '停用内部消息', |
|
| 64 | - 'bouton_radio_envoi_annonces' => '发送可编辑的声明', |
|
| 65 | - 'bouton_radio_non_envoi_annonces' => '不使用任何声明', |
|
| 66 | - 'bouton_radio_non_envoi_liste_nouveautes' => '不发送最近新闻列表', |
|
| 67 | - 'bouton_recharger_page' => '重载本页', |
|
| 68 | - 'bouton_telecharger' => '上传', |
|
| 69 | - 'bouton_upload' => '上传', # MODIF |
|
| 70 | - 'bouton_valider' => '提交', |
|
| 42 | + // B |
|
| 43 | + 'barre_a_accent_grave' => '插入加重的字符', |
|
| 44 | + 'barre_aide' => '用象征图快捷定义展出', |
|
| 45 | + 'barre_e_accent_aigu' => '插入加重的E ', |
|
| 46 | + 'barre_eo' => '插入oe [法文输入]', |
|
| 47 | + 'barre_eo_maj' => '在O之后插入E[法文OE输入]', |
|
| 48 | + 'barre_euro' => '插入欧元标志€', |
|
| 49 | + 'barre_gras' => '置为{{黑体}}', |
|
| 50 | + 'barre_guillemets' => '加双引号', |
|
| 51 | + 'barre_guillemets_simples' => '加单引号', |
|
| 52 | + 'barre_intertitre' => '转为{{{小标题}}}', |
|
| 53 | + 'barre_italic' => '置为{斜体}', |
|
| 54 | + 'barre_lien' => '转为超文本链接[http://...]', |
|
| 55 | + 'barre_lien_input' => '请输入目标链接(您可以使用 http://www.mysite.com的格式或直接指出在本站中该文章的编号).', |
|
| 56 | + 'barre_note' => '转为[[页尾标号]]', |
|
| 57 | + 'barre_paragraphe' => '新建段落', # MODIF |
|
| 58 | + 'barre_quote' => '<quote>引用一个消息</quote>', |
|
| 59 | + 'bouton_changer' => '修改', |
|
| 60 | + 'bouton_chercher' => '搜索', |
|
| 61 | + 'bouton_choisir' => '选择', |
|
| 62 | + 'bouton_enregistrer' => '保存', |
|
| 63 | + 'bouton_radio_desactiver_messagerie_interne' => '停用内部消息', |
|
| 64 | + 'bouton_radio_envoi_annonces' => '发送可编辑的声明', |
|
| 65 | + 'bouton_radio_non_envoi_annonces' => '不使用任何声明', |
|
| 66 | + 'bouton_radio_non_envoi_liste_nouveautes' => '不发送最近新闻列表', |
|
| 67 | + 'bouton_recharger_page' => '重载本页', |
|
| 68 | + 'bouton_telecharger' => '上传', |
|
| 69 | + 'bouton_upload' => '上传', # MODIF |
|
| 70 | + 'bouton_valider' => '提交', |
|
| 71 | 71 | |
| 72 | - // C |
|
| 73 | - 'cal_apresmidi' => '下午', |
|
| 74 | - 'cal_jour_entier' => '整日', |
|
| 75 | - 'cal_matin' => '早晨', |
|
| 76 | - 'cal_par_jour' => '按日显示日程', |
|
| 77 | - 'cal_par_mois' => '按月显示日程', |
|
| 78 | - 'cal_par_semaine' => '按周显示日程', |
|
| 79 | - 'choix_couleur_interface' => '颜色', |
|
| 80 | - 'choix_interface' => '界面切换', # MODIF |
|
| 81 | - 'colonne' => '列', |
|
| 82 | - 'confirm_changer_statut' => '注意,您要求改变这一项目的状态。请确认继续。', |
|
| 83 | - 'correcte' => '生效', # MODIF |
|
| 72 | + // C |
|
| 73 | + 'cal_apresmidi' => '下午', |
|
| 74 | + 'cal_jour_entier' => '整日', |
|
| 75 | + 'cal_matin' => '早晨', |
|
| 76 | + 'cal_par_jour' => '按日显示日程', |
|
| 77 | + 'cal_par_mois' => '按月显示日程', |
|
| 78 | + 'cal_par_semaine' => '按周显示日程', |
|
| 79 | + 'choix_couleur_interface' => '颜色', |
|
| 80 | + 'choix_interface' => '界面切换', # MODIF |
|
| 81 | + 'colonne' => '列', |
|
| 82 | + 'confirm_changer_statut' => '注意,您要求改变这一项目的状态。请确认继续。', |
|
| 83 | + 'correcte' => '生效', # MODIF |
|
| 84 | 84 | |
| 85 | - // D |
|
| 86 | - 'date_aujourdhui' => '今天', |
|
| 87 | - 'date_avant_jc' => '公元前', |
|
| 88 | - 'date_dans' => '在 @delai@之内。', |
|
| 89 | - 'date_de_mois_1' => '@nommois@@j@日', |
|
| 90 | - 'date_de_mois_10' => '@nommois@@j@日', |
|
| 91 | - 'date_de_mois_11' => '@nommois@@j@日', |
|
| 92 | - 'date_de_mois_12' => '@nommois@@j@日', |
|
| 93 | - 'date_de_mois_2' => '@nommois@@j@日', |
|
| 94 | - 'date_de_mois_3' => '@nommois@@j@日', |
|
| 95 | - 'date_de_mois_4' => '@nommois@@j@日', |
|
| 96 | - 'date_de_mois_5' => '@nommois@@j@日', |
|
| 97 | - 'date_de_mois_6' => '@nommois@@j@日', |
|
| 98 | - 'date_de_mois_7' => '@nommois@@j@日', |
|
| 99 | - 'date_de_mois_8' => '@nommois@@j@日', |
|
| 100 | - 'date_de_mois_9' => '@nommois@@j@日', |
|
| 101 | - 'date_demain' => '明天', |
|
| 102 | - 'date_fmt_heures_minutes' => '@h@:@m@', |
|
| 103 | - 'date_fmt_jour_heure' => '@jour@@heure@时', |
|
| 104 | - 'date_fmt_jour_mois' => '@nommois@@jour@日', |
|
| 105 | - 'date_fmt_jour_mois_annee' => '@annee@年@nommois@@jour@日', |
|
| 106 | - 'date_fmt_mois_annee' => '@annee@年@nommois@', |
|
| 107 | - 'date_fmt_nomjour_date' => '@nomjour@ 日@date@', |
|
| 108 | - 'date_heures' => '小时', |
|
| 109 | - 'date_hier' => '昨天', |
|
| 110 | - 'date_il_y_a' => ' @delai@以前', |
|
| 111 | - 'date_jnum1' => '1', |
|
| 112 | - 'date_jnum10' => '10', |
|
| 113 | - 'date_jnum11' => '11', |
|
| 114 | - 'date_jnum12' => '12', |
|
| 115 | - 'date_jnum13' => '13', |
|
| 116 | - 'date_jnum14' => '14', |
|
| 117 | - 'date_jnum15' => '15', |
|
| 118 | - 'date_jnum16' => '16', |
|
| 119 | - 'date_jnum17' => '17', |
|
| 120 | - 'date_jnum18' => '18', |
|
| 121 | - 'date_jnum19' => '19', |
|
| 122 | - 'date_jnum2' => '2', |
|
| 123 | - 'date_jnum20' => '20', |
|
| 124 | - 'date_jnum21' => '21', |
|
| 125 | - 'date_jnum22' => '22', |
|
| 126 | - 'date_jnum23' => '23', |
|
| 127 | - 'date_jnum24' => '24', |
|
| 128 | - 'date_jnum25' => '25', |
|
| 129 | - 'date_jnum26' => '26', |
|
| 130 | - 'date_jnum27' => '27', |
|
| 131 | - 'date_jnum28' => '28', |
|
| 132 | - 'date_jnum29' => '29', |
|
| 133 | - 'date_jnum3' => '3', |
|
| 134 | - 'date_jnum30' => '30', |
|
| 135 | - 'date_jnum31' => '31', |
|
| 136 | - 'date_jnum4' => '4', |
|
| 137 | - 'date_jnum5' => '5', |
|
| 138 | - 'date_jnum6' => '6', |
|
| 139 | - 'date_jnum7' => '7', |
|
| 140 | - 'date_jnum8' => '8', |
|
| 141 | - 'date_jnum9' => '9', |
|
| 142 | - 'date_jour_1' => '星期日', |
|
| 143 | - 'date_jour_1_abbr' => '周日', |
|
| 144 | - 'date_jour_1_initiale' => '星期天', |
|
| 145 | - 'date_jour_2' => '星期一', |
|
| 146 | - 'date_jour_2_abbr' => '周一', |
|
| 147 | - 'date_jour_2_initiale' => 'l.', |
|
| 148 | - 'date_jour_3' => '星期二', |
|
| 149 | - 'date_jour_3_abbr' => '星期二', |
|
| 150 | - 'date_jour_3_initiale' => '二', |
|
| 151 | - 'date_jour_4' => '星期三', |
|
| 152 | - 'date_jour_4_abbr' => '周三', |
|
| 153 | - 'date_jour_4_initiale' => '三', |
|
| 154 | - 'date_jour_5' => '星期四', |
|
| 155 | - 'date_jour_5_abbr' => '周四', |
|
| 156 | - 'date_jour_5_initiale' => '四', |
|
| 157 | - 'date_jour_6' => '星期五', |
|
| 158 | - 'date_jour_6_abbr' => '周五', |
|
| 159 | - 'date_jour_6_initiale' => '五', |
|
| 160 | - 'date_jour_7' => '星期六', |
|
| 161 | - 'date_jour_7_abbr' => '周六', |
|
| 162 | - 'date_jour_7_initiale' => '六', |
|
| 163 | - 'date_jours' => '天', |
|
| 164 | - 'date_minutes' => '分钟', |
|
| 165 | - 'date_mois' => '月', |
|
| 166 | - 'date_mois_1' => '1月', |
|
| 167 | - 'date_mois_10' => '10月', |
|
| 168 | - 'date_mois_10_abbr' => '十月', |
|
| 169 | - 'date_mois_11' => '11月', |
|
| 170 | - 'date_mois_11_abbr' => '十一月', |
|
| 171 | - 'date_mois_12' => '12月', |
|
| 172 | - 'date_mois_12_abbr' => '十二月', |
|
| 173 | - 'date_mois_1_abbr' => '一月', |
|
| 174 | - 'date_mois_2' => '2月', |
|
| 175 | - 'date_mois_2_abbr' => '二月', |
|
| 176 | - 'date_mois_3' => '3月', |
|
| 177 | - 'date_mois_3_abbr' => '三月', |
|
| 178 | - 'date_mois_4' => '4月', |
|
| 179 | - 'date_mois_4_abbr' => '四月', |
|
| 180 | - 'date_mois_5' => '5月', |
|
| 181 | - 'date_mois_5_abbr' => '五月', |
|
| 182 | - 'date_mois_6' => '6月', |
|
| 183 | - 'date_mois_6_abbr' => '六月', |
|
| 184 | - 'date_mois_7' => '7月', |
|
| 185 | - 'date_mois_7_abbr' => '七月', |
|
| 186 | - 'date_mois_8' => '8月', |
|
| 187 | - 'date_mois_8_abbr' => '八月', |
|
| 188 | - 'date_mois_9' => '9月', |
|
| 189 | - 'date_mois_9_abbr' => '九月', |
|
| 190 | - 'date_saison_1' => '冬季', |
|
| 191 | - 'date_saison_2' => '春季', |
|
| 192 | - 'date_saison_3' => '夏季', |
|
| 193 | - 'date_saison_4' => '秋季', |
|
| 194 | - 'date_semaines' => '周', |
|
| 195 | - 'dirs_commencer' => '为了开始安装', |
|
| 196 | - 'dirs_preliminaire' => '初步: <b>设置访问权限</b>', |
|
| 197 | - 'dirs_probleme_droits' => '访问权限问题', # MODIF |
|
| 198 | - 'dirs_repertoires_absents' => '<b>未找到下列目录: <ul>@bad_dirs@.</ul> </b> |
|
| 85 | + // D |
|
| 86 | + 'date_aujourdhui' => '今天', |
|
| 87 | + 'date_avant_jc' => '公元前', |
|
| 88 | + 'date_dans' => '在 @delai@之内。', |
|
| 89 | + 'date_de_mois_1' => '@nommois@@j@日', |
|
| 90 | + 'date_de_mois_10' => '@nommois@@j@日', |
|
| 91 | + 'date_de_mois_11' => '@nommois@@j@日', |
|
| 92 | + 'date_de_mois_12' => '@nommois@@j@日', |
|
| 93 | + 'date_de_mois_2' => '@nommois@@j@日', |
|
| 94 | + 'date_de_mois_3' => '@nommois@@j@日', |
|
| 95 | + 'date_de_mois_4' => '@nommois@@j@日', |
|
| 96 | + 'date_de_mois_5' => '@nommois@@j@日', |
|
| 97 | + 'date_de_mois_6' => '@nommois@@j@日', |
|
| 98 | + 'date_de_mois_7' => '@nommois@@j@日', |
|
| 99 | + 'date_de_mois_8' => '@nommois@@j@日', |
|
| 100 | + 'date_de_mois_9' => '@nommois@@j@日', |
|
| 101 | + 'date_demain' => '明天', |
|
| 102 | + 'date_fmt_heures_minutes' => '@h@:@m@', |
|
| 103 | + 'date_fmt_jour_heure' => '@jour@@heure@时', |
|
| 104 | + 'date_fmt_jour_mois' => '@nommois@@jour@日', |
|
| 105 | + 'date_fmt_jour_mois_annee' => '@annee@年@nommois@@jour@日', |
|
| 106 | + 'date_fmt_mois_annee' => '@annee@年@nommois@', |
|
| 107 | + 'date_fmt_nomjour_date' => '@nomjour@ 日@date@', |
|
| 108 | + 'date_heures' => '小时', |
|
| 109 | + 'date_hier' => '昨天', |
|
| 110 | + 'date_il_y_a' => ' @delai@以前', |
|
| 111 | + 'date_jnum1' => '1', |
|
| 112 | + 'date_jnum10' => '10', |
|
| 113 | + 'date_jnum11' => '11', |
|
| 114 | + 'date_jnum12' => '12', |
|
| 115 | + 'date_jnum13' => '13', |
|
| 116 | + 'date_jnum14' => '14', |
|
| 117 | + 'date_jnum15' => '15', |
|
| 118 | + 'date_jnum16' => '16', |
|
| 119 | + 'date_jnum17' => '17', |
|
| 120 | + 'date_jnum18' => '18', |
|
| 121 | + 'date_jnum19' => '19', |
|
| 122 | + 'date_jnum2' => '2', |
|
| 123 | + 'date_jnum20' => '20', |
|
| 124 | + 'date_jnum21' => '21', |
|
| 125 | + 'date_jnum22' => '22', |
|
| 126 | + 'date_jnum23' => '23', |
|
| 127 | + 'date_jnum24' => '24', |
|
| 128 | + 'date_jnum25' => '25', |
|
| 129 | + 'date_jnum26' => '26', |
|
| 130 | + 'date_jnum27' => '27', |
|
| 131 | + 'date_jnum28' => '28', |
|
| 132 | + 'date_jnum29' => '29', |
|
| 133 | + 'date_jnum3' => '3', |
|
| 134 | + 'date_jnum30' => '30', |
|
| 135 | + 'date_jnum31' => '31', |
|
| 136 | + 'date_jnum4' => '4', |
|
| 137 | + 'date_jnum5' => '5', |
|
| 138 | + 'date_jnum6' => '6', |
|
| 139 | + 'date_jnum7' => '7', |
|
| 140 | + 'date_jnum8' => '8', |
|
| 141 | + 'date_jnum9' => '9', |
|
| 142 | + 'date_jour_1' => '星期日', |
|
| 143 | + 'date_jour_1_abbr' => '周日', |
|
| 144 | + 'date_jour_1_initiale' => '星期天', |
|
| 145 | + 'date_jour_2' => '星期一', |
|
| 146 | + 'date_jour_2_abbr' => '周一', |
|
| 147 | + 'date_jour_2_initiale' => 'l.', |
|
| 148 | + 'date_jour_3' => '星期二', |
|
| 149 | + 'date_jour_3_abbr' => '星期二', |
|
| 150 | + 'date_jour_3_initiale' => '二', |
|
| 151 | + 'date_jour_4' => '星期三', |
|
| 152 | + 'date_jour_4_abbr' => '周三', |
|
| 153 | + 'date_jour_4_initiale' => '三', |
|
| 154 | + 'date_jour_5' => '星期四', |
|
| 155 | + 'date_jour_5_abbr' => '周四', |
|
| 156 | + 'date_jour_5_initiale' => '四', |
|
| 157 | + 'date_jour_6' => '星期五', |
|
| 158 | + 'date_jour_6_abbr' => '周五', |
|
| 159 | + 'date_jour_6_initiale' => '五', |
|
| 160 | + 'date_jour_7' => '星期六', |
|
| 161 | + 'date_jour_7_abbr' => '周六', |
|
| 162 | + 'date_jour_7_initiale' => '六', |
|
| 163 | + 'date_jours' => '天', |
|
| 164 | + 'date_minutes' => '分钟', |
|
| 165 | + 'date_mois' => '月', |
|
| 166 | + 'date_mois_1' => '1月', |
|
| 167 | + 'date_mois_10' => '10月', |
|
| 168 | + 'date_mois_10_abbr' => '十月', |
|
| 169 | + 'date_mois_11' => '11月', |
|
| 170 | + 'date_mois_11_abbr' => '十一月', |
|
| 171 | + 'date_mois_12' => '12月', |
|
| 172 | + 'date_mois_12_abbr' => '十二月', |
|
| 173 | + 'date_mois_1_abbr' => '一月', |
|
| 174 | + 'date_mois_2' => '2月', |
|
| 175 | + 'date_mois_2_abbr' => '二月', |
|
| 176 | + 'date_mois_3' => '3月', |
|
| 177 | + 'date_mois_3_abbr' => '三月', |
|
| 178 | + 'date_mois_4' => '4月', |
|
| 179 | + 'date_mois_4_abbr' => '四月', |
|
| 180 | + 'date_mois_5' => '5月', |
|
| 181 | + 'date_mois_5_abbr' => '五月', |
|
| 182 | + 'date_mois_6' => '6月', |
|
| 183 | + 'date_mois_6_abbr' => '六月', |
|
| 184 | + 'date_mois_7' => '7月', |
|
| 185 | + 'date_mois_7_abbr' => '七月', |
|
| 186 | + 'date_mois_8' => '8月', |
|
| 187 | + 'date_mois_8_abbr' => '八月', |
|
| 188 | + 'date_mois_9' => '9月', |
|
| 189 | + 'date_mois_9_abbr' => '九月', |
|
| 190 | + 'date_saison_1' => '冬季', |
|
| 191 | + 'date_saison_2' => '春季', |
|
| 192 | + 'date_saison_3' => '夏季', |
|
| 193 | + 'date_saison_4' => '秋季', |
|
| 194 | + 'date_semaines' => '周', |
|
| 195 | + 'dirs_commencer' => '为了开始安装', |
|
| 196 | + 'dirs_preliminaire' => '初步: <b>设置访问权限</b>', |
|
| 197 | + 'dirs_probleme_droits' => '访问权限问题', # MODIF |
|
| 198 | + 'dirs_repertoires_absents' => '<b>未找到下列目录: <ul>@bad_dirs@.</ul> </b> |
|
| 199 | 199 | <p>可能由于输入大小写有误. |
| 200 | 200 | 请确认目录的大小写正确; 如果不正确, 可通过FTP软件修改目录名字以纠错.<p>一旦完成,您可以', # MODIF |
| 201 | - 'dirs_repertoires_suivants' => '<b>以下目录无写权限: <ul>@bad_dirs@.</ul> </b> |
|
| 201 | + 'dirs_repertoires_suivants' => '<b>以下目录无写权限: <ul>@bad_dirs@.</ul> </b> |
|
| 202 | 202 | |
| 203 | 203 | <p>修改权限请使用FTP客户端为每个目录设定访问权限. 该操作在用户指南中有详细介绍. |
| 204 | 204 | |
| 205 | 205 | <p>一旦完成,您可以', # MODIF |
| 206 | 206 | |
| 207 | - // E |
|
| 208 | - 'envoi_via_le_site' => '通过本网站发送', |
|
| 207 | + // E |
|
| 208 | + 'envoi_via_le_site' => '通过本网站发送', |
|
| 209 | 209 | |
| 210 | - // F |
|
| 211 | - 'fichier_introuvable' => '找不到@fichier@文件', # MODIF |
|
| 212 | - 'form_deja_inscrit' => '您已注册.', |
|
| 213 | - 'form_email_non_valide' => '您的电子邮件无效.', |
|
| 214 | - 'form_forum_access_refuse' => '您无权继续访问该站点.', |
|
| 215 | - 'form_forum_bonjour' => '您好@nom@,', # MODIF |
|
| 216 | - 'form_forum_email_deja_enregistre' => '该电子邮件地址已经记录,您可以使用常用密码.', |
|
| 217 | - 'form_forum_identifiant_mail' => '您的新标识已经通过邮件发送给您了.', |
|
| 218 | - 'form_forum_identifiants' => '个人标识符', |
|
| 219 | - 'form_forum_indiquer_nom_email' => '输入您的名字和电子邮件地址,您将很快通过电子邮件获取您的个人标识符.', |
|
| 220 | - 'form_forum_login' => '登录:', |
|
| 221 | - 'form_forum_message_auto' => '(这是自动消息)', |
|
| 222 | - 'form_forum_pass' => '密码:', |
|
| 223 | - 'form_forum_probleme_mail' => '邮件问题: 标识符不能被发送.', |
|
| 224 | - 'form_forum_voici1' => '这是您加入站点网站编辑和论坛的标识符 "@nom_site_spip@" (@adresse_site@):', # MODIF |
|
| 225 | - 'form_forum_voici2' => '这是您提交文章的标识符 |
|
| 210 | + // F |
|
| 211 | + 'fichier_introuvable' => '找不到@fichier@文件', # MODIF |
|
| 212 | + 'form_deja_inscrit' => '您已注册.', |
|
| 213 | + 'form_email_non_valide' => '您的电子邮件无效.', |
|
| 214 | + 'form_forum_access_refuse' => '您无权继续访问该站点.', |
|
| 215 | + 'form_forum_bonjour' => '您好@nom@,', # MODIF |
|
| 216 | + 'form_forum_email_deja_enregistre' => '该电子邮件地址已经记录,您可以使用常用密码.', |
|
| 217 | + 'form_forum_identifiant_mail' => '您的新标识已经通过邮件发送给您了.', |
|
| 218 | + 'form_forum_identifiants' => '个人标识符', |
|
| 219 | + 'form_forum_indiquer_nom_email' => '输入您的名字和电子邮件地址,您将很快通过电子邮件获取您的个人标识符.', |
|
| 220 | + 'form_forum_login' => '登录:', |
|
| 221 | + 'form_forum_message_auto' => '(这是自动消息)', |
|
| 222 | + 'form_forum_pass' => '密码:', |
|
| 223 | + 'form_forum_probleme_mail' => '邮件问题: 标识符不能被发送.', |
|
| 224 | + 'form_forum_voici1' => '这是您加入站点网站编辑和论坛的标识符 "@nom_site_spip@" (@adresse_site@):', # MODIF |
|
| 225 | + 'form_forum_voici2' => '这是您提交文章的标识符 |
|
| 226 | 226 | "@nom_site_spip@" (@adresse_login@):', # MODIF |
| 227 | - 'form_indiquer_email' => '请输入您的电子邮件地址.', |
|
| 228 | - 'form_indiquer_nom' => '请输入您的名字.', |
|
| 229 | - 'form_indiquer_nom_site' => '请输入您的站点名字.', |
|
| 230 | - 'form_pet_deja_enregistre' => '站点已经注册', |
|
| 231 | - 'form_pet_signature_pasprise' => '签名被忽略.', |
|
| 232 | - 'form_prop_confirmer_envoi' => '确认发送', |
|
| 233 | - 'form_prop_description' => '描述/注释', |
|
| 234 | - 'form_prop_enregistre' => '你的提议已经被记录, 站点管理员使它有效它将在线显示.', |
|
| 235 | - 'form_prop_envoyer' => '发送消息', |
|
| 236 | - 'form_prop_indiquer_email' => '请输入有效的电子邮件地址', |
|
| 237 | - 'form_prop_indiquer_nom_site' => '请输入站点名', |
|
| 238 | - 'form_prop_indiquer_sujet' => '请输入标题', |
|
| 239 | - 'form_prop_message_envoye' => '消息发送', |
|
| 240 | - 'form_prop_non_enregistre' => '您的提议未被记录.', |
|
| 241 | - 'form_prop_sujet' => '标题', |
|
| 242 | - 'form_prop_url_site' => '站点URL', # MODIF |
|
| 243 | - 'forum_non_inscrit' => '可能您还没有注册或者您输入的地址或密码错误.', |
|
| 244 | - 'forum_par_auteur' => '按 @auteur@', |
|
| 245 | - 'forum_titre_erreur' => '错误...', |
|
| 227 | + 'form_indiquer_email' => '请输入您的电子邮件地址.', |
|
| 228 | + 'form_indiquer_nom' => '请输入您的名字.', |
|
| 229 | + 'form_indiquer_nom_site' => '请输入您的站点名字.', |
|
| 230 | + 'form_pet_deja_enregistre' => '站点已经注册', |
|
| 231 | + 'form_pet_signature_pasprise' => '签名被忽略.', |
|
| 232 | + 'form_prop_confirmer_envoi' => '确认发送', |
|
| 233 | + 'form_prop_description' => '描述/注释', |
|
| 234 | + 'form_prop_enregistre' => '你的提议已经被记录, 站点管理员使它有效它将在线显示.', |
|
| 235 | + 'form_prop_envoyer' => '发送消息', |
|
| 236 | + 'form_prop_indiquer_email' => '请输入有效的电子邮件地址', |
|
| 237 | + 'form_prop_indiquer_nom_site' => '请输入站点名', |
|
| 238 | + 'form_prop_indiquer_sujet' => '请输入标题', |
|
| 239 | + 'form_prop_message_envoye' => '消息发送', |
|
| 240 | + 'form_prop_non_enregistre' => '您的提议未被记录.', |
|
| 241 | + 'form_prop_sujet' => '标题', |
|
| 242 | + 'form_prop_url_site' => '站点URL', # MODIF |
|
| 243 | + 'forum_non_inscrit' => '可能您还没有注册或者您输入的地址或密码错误.', |
|
| 244 | + 'forum_par_auteur' => '按 @auteur@', |
|
| 245 | + 'forum_titre_erreur' => '错误...', |
|
| 246 | 246 | |
| 247 | - // I |
|
| 248 | - 'ical_texte_rss_articles' => '本站点文章的«引用»文件地址:', |
|
| 249 | - 'ical_texte_rss_articles2' => '您同样可以获得站点中各个专栏下文章的«引用»文件:', |
|
| 250 | - 'ical_texte_rss_breves' => '存在多个站点简要的文件.通过指出专栏编号,您可以获得仅与该专栏相关的简要.', |
|
| 251 | - 'icone_a_suivre' => '跟踪', |
|
| 252 | - 'icone_admin_site' => '站点管理', |
|
| 253 | - 'icone_agenda' => '记事', |
|
| 254 | - 'icone_aide_ligne' => '帮助', # MODIF |
|
| 255 | - 'icone_articles' => '文章', |
|
| 256 | - 'icone_auteurs' => '作者', |
|
| 257 | - 'icone_brouteur' => '快速浏览', |
|
| 258 | - 'icone_configuration_site' => '配置', # MODIF |
|
| 259 | - 'icone_configurer_site' => '配置站点', |
|
| 260 | - 'icone_creer_nouvel_auteur' => '新建一个作者', |
|
| 261 | - 'icone_creer_rubrique' => '新建专栏', |
|
| 262 | - 'icone_creer_sous_rubrique' => '新建子专栏', |
|
| 263 | - 'icone_deconnecter' => '断开连接', |
|
| 264 | - 'icone_discussions' => '讨论', |
|
| 265 | - 'icone_doc_rubrique' => '各专栏文档', |
|
| 266 | - 'icone_ecrire_article' => '写新文章', |
|
| 267 | - 'icone_edition_site' => '编辑', # MODIF |
|
| 268 | - 'icone_gestion_langues' => '语言管理', |
|
| 269 | - 'icone_informations_personnelles' => '个人信息', |
|
| 270 | - 'icone_interface_complet' => '完整界面', |
|
| 271 | - 'icone_interface_simple' => '简单界面', |
|
| 272 | - 'icone_maintenance_site' => '站点维护', |
|
| 273 | - 'icone_messagerie_personnelle' => '个人消息', |
|
| 274 | - 'icone_repartition_debut' => '显示从开始的分布', |
|
| 275 | - 'icone_rubriques' => '专栏', |
|
| 276 | - 'icone_sauver_site' => '站点备份', |
|
| 277 | - 'icone_site_entier' => '整个站点', |
|
| 278 | - 'icone_sites_references' => '参考站点', |
|
| 279 | - 'icone_statistiques' => '站点统计', |
|
| 280 | - 'icone_suivi_activite' => '跟踪站点的活动', |
|
| 281 | - 'icone_suivi_actualite' => '站点评估', |
|
| 282 | - 'icone_suivi_pettions' => '跟踪/管理请求', |
|
| 283 | - 'icone_suivi_revisions' => '文章修改', |
|
| 284 | - 'icone_supprimer_document' => '删除文档', |
|
| 285 | - 'icone_supprimer_image' => '删除图片', |
|
| 286 | - 'icone_tous_articles' => '您所有的文章', |
|
| 287 | - 'icone_tous_auteur' => '所有作者', |
|
| 288 | - 'icone_visiter_site' => '访问', # MODIF |
|
| 289 | - 'icone_voir_en_ligne' => '在线预览', |
|
| 290 | - 'img_indisponible' => '必需图像', |
|
| 291 | - 'info_a_suivre' => '跟踪 »', |
|
| 292 | - 'info_acces_interdit' => '访问禁止', |
|
| 293 | - 'info_acces_refuse' => '访问拒绝', |
|
| 294 | - 'info_action' => '动作: @action@', |
|
| 295 | - 'info_administrer_rubriques' => '您可以管理该专栏及其子专栏', |
|
| 296 | - 'info_adresse_non_indiquee' => '您没有指定测试地址!', |
|
| 297 | - 'info_aide' => '帮助:', |
|
| 298 | - 'info_ajouter_mot' => '添加关键词', |
|
| 299 | - 'info_annonce' => '声明', |
|
| 300 | - 'info_annonces_generales' => '一般声明:', |
|
| 301 | - 'info_article_propose' => '已提交的文章', |
|
| 302 | - 'info_article_publie' => '已发表的文章', |
|
| 303 | - 'info_article_redaction' => '进展中的文章', |
|
| 304 | - 'info_article_refuse' => '丢弃的文章', |
|
| 305 | - 'info_article_supprime' => '删除的文章', |
|
| 306 | - 'info_articles' => '文章', |
|
| 307 | - 'info_articles_a_valider' => '需要确认的文章', |
|
| 308 | - 'info_articles_proposes' => '提交的文章', |
|
| 309 | - 'info_auteurs_nombre' => '作者:', |
|
| 310 | - 'info_authentification_ftp' => '(通过 FTP)验证.', |
|
| 311 | - 'info_breves_2' => '简要', |
|
| 312 | - 'info_connexion_refusee' => '连接禁止', |
|
| 313 | - 'info_contact_developpeur' => '请联系开发者.', |
|
| 314 | - 'info_contenance' => '站点包括:', |
|
| 315 | - 'info_contribution' => '论坛投稿', # MODIF |
|
| 316 | - 'info_copyright' => '@spip@是一款免费软件@lien_gpl@。', |
|
| 317 | - 'info_copyright_doc' => '详细信息,请访问站点 <a href="@spipnet@">http://www.spip.net/zh</a>.', # MODIF |
|
| 318 | - 'info_copyright_gpl' => '根据GPL协议', |
|
| 319 | - 'info_cours_edition' => '进展中文章', # MODIF |
|
| 320 | - 'info_creer_repertoire' => '请创建一个文件或目录叫:', |
|
| 321 | - 'info_creer_repertoire_2' => '在<b>@repertoire@</b>子目录内部,然后 :', |
|
| 322 | - 'info_creer_vignette' => '自动产生图标', |
|
| 323 | - 'info_deplier' => '展开', |
|
| 324 | - 'info_descriptif_nombre' => '描述:', |
|
| 325 | - 'info_description' => '描述:', |
|
| 326 | - 'info_description_2' => '描述:', |
|
| 327 | - 'info_dimension' => '大小:', |
|
| 328 | - 'info_ecire_message_prive' => '写一个私有信息', |
|
| 329 | - 'info_email_invalide' => '无论电子邮件地址.', |
|
| 330 | - 'info_en_cours_validation' => '进展中的文章', |
|
| 331 | - 'info_en_ligne' => '现在在线:', |
|
| 332 | - 'info_envoyer_message_prive' => '给作者发一个私有信息', |
|
| 333 | - 'info_erreur_requete' => '错误查询:', |
|
| 334 | - 'info_erreur_squelette2' => '所有面板<b>@fichier@</b>均无效...', |
|
| 335 | - 'info_erreur_systeme' => '系统错误 (errno @errsys@)', |
|
| 336 | - 'info_erreur_systeme2' => '硬盘无足够空间,或数据库遭破坏。<br /> |
|
| 247 | + // I |
|
| 248 | + 'ical_texte_rss_articles' => '本站点文章的«引用»文件地址:', |
|
| 249 | + 'ical_texte_rss_articles2' => '您同样可以获得站点中各个专栏下文章的«引用»文件:', |
|
| 250 | + 'ical_texte_rss_breves' => '存在多个站点简要的文件.通过指出专栏编号,您可以获得仅与该专栏相关的简要.', |
|
| 251 | + 'icone_a_suivre' => '跟踪', |
|
| 252 | + 'icone_admin_site' => '站点管理', |
|
| 253 | + 'icone_agenda' => '记事', |
|
| 254 | + 'icone_aide_ligne' => '帮助', # MODIF |
|
| 255 | + 'icone_articles' => '文章', |
|
| 256 | + 'icone_auteurs' => '作者', |
|
| 257 | + 'icone_brouteur' => '快速浏览', |
|
| 258 | + 'icone_configuration_site' => '配置', # MODIF |
|
| 259 | + 'icone_configurer_site' => '配置站点', |
|
| 260 | + 'icone_creer_nouvel_auteur' => '新建一个作者', |
|
| 261 | + 'icone_creer_rubrique' => '新建专栏', |
|
| 262 | + 'icone_creer_sous_rubrique' => '新建子专栏', |
|
| 263 | + 'icone_deconnecter' => '断开连接', |
|
| 264 | + 'icone_discussions' => '讨论', |
|
| 265 | + 'icone_doc_rubrique' => '各专栏文档', |
|
| 266 | + 'icone_ecrire_article' => '写新文章', |
|
| 267 | + 'icone_edition_site' => '编辑', # MODIF |
|
| 268 | + 'icone_gestion_langues' => '语言管理', |
|
| 269 | + 'icone_informations_personnelles' => '个人信息', |
|
| 270 | + 'icone_interface_complet' => '完整界面', |
|
| 271 | + 'icone_interface_simple' => '简单界面', |
|
| 272 | + 'icone_maintenance_site' => '站点维护', |
|
| 273 | + 'icone_messagerie_personnelle' => '个人消息', |
|
| 274 | + 'icone_repartition_debut' => '显示从开始的分布', |
|
| 275 | + 'icone_rubriques' => '专栏', |
|
| 276 | + 'icone_sauver_site' => '站点备份', |
|
| 277 | + 'icone_site_entier' => '整个站点', |
|
| 278 | + 'icone_sites_references' => '参考站点', |
|
| 279 | + 'icone_statistiques' => '站点统计', |
|
| 280 | + 'icone_suivi_activite' => '跟踪站点的活动', |
|
| 281 | + 'icone_suivi_actualite' => '站点评估', |
|
| 282 | + 'icone_suivi_pettions' => '跟踪/管理请求', |
|
| 283 | + 'icone_suivi_revisions' => '文章修改', |
|
| 284 | + 'icone_supprimer_document' => '删除文档', |
|
| 285 | + 'icone_supprimer_image' => '删除图片', |
|
| 286 | + 'icone_tous_articles' => '您所有的文章', |
|
| 287 | + 'icone_tous_auteur' => '所有作者', |
|
| 288 | + 'icone_visiter_site' => '访问', # MODIF |
|
| 289 | + 'icone_voir_en_ligne' => '在线预览', |
|
| 290 | + 'img_indisponible' => '必需图像', |
|
| 291 | + 'info_a_suivre' => '跟踪 »', |
|
| 292 | + 'info_acces_interdit' => '访问禁止', |
|
| 293 | + 'info_acces_refuse' => '访问拒绝', |
|
| 294 | + 'info_action' => '动作: @action@', |
|
| 295 | + 'info_administrer_rubriques' => '您可以管理该专栏及其子专栏', |
|
| 296 | + 'info_adresse_non_indiquee' => '您没有指定测试地址!', |
|
| 297 | + 'info_aide' => '帮助:', |
|
| 298 | + 'info_ajouter_mot' => '添加关键词', |
|
| 299 | + 'info_annonce' => '声明', |
|
| 300 | + 'info_annonces_generales' => '一般声明:', |
|
| 301 | + 'info_article_propose' => '已提交的文章', |
|
| 302 | + 'info_article_publie' => '已发表的文章', |
|
| 303 | + 'info_article_redaction' => '进展中的文章', |
|
| 304 | + 'info_article_refuse' => '丢弃的文章', |
|
| 305 | + 'info_article_supprime' => '删除的文章', |
|
| 306 | + 'info_articles' => '文章', |
|
| 307 | + 'info_articles_a_valider' => '需要确认的文章', |
|
| 308 | + 'info_articles_proposes' => '提交的文章', |
|
| 309 | + 'info_auteurs_nombre' => '作者:', |
|
| 310 | + 'info_authentification_ftp' => '(通过 FTP)验证.', |
|
| 311 | + 'info_breves_2' => '简要', |
|
| 312 | + 'info_connexion_refusee' => '连接禁止', |
|
| 313 | + 'info_contact_developpeur' => '请联系开发者.', |
|
| 314 | + 'info_contenance' => '站点包括:', |
|
| 315 | + 'info_contribution' => '论坛投稿', # MODIF |
|
| 316 | + 'info_copyright' => '@spip@是一款免费软件@lien_gpl@。', |
|
| 317 | + 'info_copyright_doc' => '详细信息,请访问站点 <a href="@spipnet@">http://www.spip.net/zh</a>.', # MODIF |
|
| 318 | + 'info_copyright_gpl' => '根据GPL协议', |
|
| 319 | + 'info_cours_edition' => '进展中文章', # MODIF |
|
| 320 | + 'info_creer_repertoire' => '请创建一个文件或目录叫:', |
|
| 321 | + 'info_creer_repertoire_2' => '在<b>@repertoire@</b>子目录内部,然后 :', |
|
| 322 | + 'info_creer_vignette' => '自动产生图标', |
|
| 323 | + 'info_deplier' => '展开', |
|
| 324 | + 'info_descriptif_nombre' => '描述:', |
|
| 325 | + 'info_description' => '描述:', |
|
| 326 | + 'info_description_2' => '描述:', |
|
| 327 | + 'info_dimension' => '大小:', |
|
| 328 | + 'info_ecire_message_prive' => '写一个私有信息', |
|
| 329 | + 'info_email_invalide' => '无论电子邮件地址.', |
|
| 330 | + 'info_en_cours_validation' => '进展中的文章', |
|
| 331 | + 'info_en_ligne' => '现在在线:', |
|
| 332 | + 'info_envoyer_message_prive' => '给作者发一个私有信息', |
|
| 333 | + 'info_erreur_requete' => '错误查询:', |
|
| 334 | + 'info_erreur_squelette2' => '所有面板<b>@fichier@</b>均无效...', |
|
| 335 | + 'info_erreur_systeme' => '系统错误 (errno @errsys@)', |
|
| 336 | + 'info_erreur_systeme2' => '硬盘无足够空间,或数据库遭破坏。<br /> |
|
| 337 | 337 | <span style="color:red;">请试用 <a href=\'@script@\'>修复数据库</a>, |
| 338 | 338 | 或者联系您的管理员。</span>', # MODIF |
| 339 | - 'info_fini' => '完成了!', |
|
| 340 | - 'info_format_image' => '图片格式被用来创建插图: @gd_formats@.', |
|
| 341 | - 'info_format_non_defini' => '未定义格式', |
|
| 342 | - 'info_grand_ecran' => '大图显示', |
|
| 343 | - 'info_image_aide' => '帮助', |
|
| 344 | - 'info_image_process_titre' => '生成图标的方法', |
|
| 345 | - 'info_impossible_lire_page' => '<b>错误!</b>通过代理服务,此页不能阅读<tt><html>@test_proxy@</html></tt>', |
|
| 346 | - 'info_installation_systeme_publication' => '公众系统安装 ...', |
|
| 347 | - 'info_installer_documents' => '您可以自动安装 @upload@ 中所有文件。', |
|
| 348 | - 'info_installer_ftp' => '作为管理员,您可安装(通过 FTP)@upload@中文件使得以后能从这儿选择.', |
|
| 349 | - 'info_installer_images' => '你可安装的图片格式 JPEG, GIF 及其它 PNG.', |
|
| 350 | - 'info_installer_images_dossier' => '安装@upload@目录中的图片以便在这里可以选择他们。', |
|
| 351 | - 'info_interface_complete' => '完整界面', |
|
| 352 | - 'info_interface_simple' => '简单界面 ', |
|
| 353 | - 'info_joindre_document_article' => '你可附上你的文章的附加文档的类型', |
|
| 354 | - 'info_joindre_document_rubrique' => '您可加入该栏的文档类型', |
|
| 355 | - 'info_joindre_documents_article' => '你可附上你文章的附加文档的类型:', |
|
| 356 | - 'info_l_article' => '文章', |
|
| 357 | - 'info_la_breve' => '新闻', |
|
| 358 | - 'info_la_rubrique' => '专栏', |
|
| 359 | - 'info_langue_principale' => '主站点语言', |
|
| 360 | - 'info_largeur_vignette' => '@largeur_vignette@ x @hauteur_vignette@ 像素', # MODIF |
|
| 361 | - 'info_les_auteurs_1' => '按 @les_auteurs@', |
|
| 362 | - 'info_logo_format_interdit' => '仅@formats@格式之文件被允许作标志', |
|
| 363 | - 'info_logo_max_poids' => 'Les logos doivent obligatoirement faire moins de @maxi@ (ce fichier fait @actuel@).', |
|
| 364 | - 'info_mail_fournisseur' => '[email protected]', |
|
| 365 | - 'info_message_2' => '消息', |
|
| 366 | - 'info_message_supprime' => '删除的消息', |
|
| 367 | - 'info_mise_en_ligne' => '在线出版物的日期:', |
|
| 368 | - 'info_modification_parametres_securite' => '修改安全参数', |
|
| 369 | - 'info_mois_courant' => '在月中:', |
|
| 370 | - 'info_mot_cle_ajoute' => '下列关键被加进', |
|
| 371 | - 'info_multi_herit' => '缺省语言', |
|
| 372 | - 'info_multi_langues_soulignees' => '<u>加下划线的语言</u> 提供了所有界面的语言的翻译. 如果你选择语言, 公共站点的所有元素 (日期, 论坛) 将被自动翻译. 作为没有下划线的语言, 这些元素将出现在站点的主语言界面上.', # MODIF |
|
| 373 | - 'info_multilinguisme' => '多语言', |
|
| 374 | - 'info_nom_non_utilisateurs_connectes' => '你的名字不显示在连接用户的列表中.', |
|
| 375 | - 'info_nom_utilisateurs_connectes' => '你的名字显示在连接用户的列表中.', |
|
| 376 | - 'info_nombre_en_ligne' => '现在在线:', |
|
| 377 | - 'info_non_resultat' => ' "@cherche_mot@"没有结果', |
|
| 378 | - 'info_non_utilisation_messagerie' => '你没有使用站点内部消息.', |
|
| 379 | - 'info_nouveau_message' => '你有新消息', |
|
| 380 | - 'info_nouveaux_messages' => '你有 @total_messages@ 条新消息', |
|
| 381 | - 'info_numero_abbreviation' => '第 ', |
|
| 382 | - 'info_pense_bete' => '忘备', |
|
| 383 | - 'info_petit_ecran' => '小图显示', |
|
| 384 | - 'info_pixels' => '像素', |
|
| 385 | - 'info_plusieurs_mots_trouves' => '几个关键词找到了 "@cherche_mot@":', |
|
| 386 | - 'info_portfolio_automatique' => '自动相册:', |
|
| 387 | - 'info_premier_resultat' => '[@debut_limit@ 最新结果出了 @total@]', |
|
| 388 | - 'info_premier_resultat_sur' => '[@debut_limit@ 最新结果出了@total@]', |
|
| 389 | - 'info_propose_1' => '[@nom_site_spip@] 提交: @titre@', |
|
| 390 | - 'info_propose_2' => '提交文章 |
|
| 339 | + 'info_fini' => '完成了!', |
|
| 340 | + 'info_format_image' => '图片格式被用来创建插图: @gd_formats@.', |
|
| 341 | + 'info_format_non_defini' => '未定义格式', |
|
| 342 | + 'info_grand_ecran' => '大图显示', |
|
| 343 | + 'info_image_aide' => '帮助', |
|
| 344 | + 'info_image_process_titre' => '生成图标的方法', |
|
| 345 | + 'info_impossible_lire_page' => '<b>错误!</b>通过代理服务,此页不能阅读<tt><html>@test_proxy@</html></tt>', |
|
| 346 | + 'info_installation_systeme_publication' => '公众系统安装 ...', |
|
| 347 | + 'info_installer_documents' => '您可以自动安装 @upload@ 中所有文件。', |
|
| 348 | + 'info_installer_ftp' => '作为管理员,您可安装(通过 FTP)@upload@中文件使得以后能从这儿选择.', |
|
| 349 | + 'info_installer_images' => '你可安装的图片格式 JPEG, GIF 及其它 PNG.', |
|
| 350 | + 'info_installer_images_dossier' => '安装@upload@目录中的图片以便在这里可以选择他们。', |
|
| 351 | + 'info_interface_complete' => '完整界面', |
|
| 352 | + 'info_interface_simple' => '简单界面 ', |
|
| 353 | + 'info_joindre_document_article' => '你可附上你的文章的附加文档的类型', |
|
| 354 | + 'info_joindre_document_rubrique' => '您可加入该栏的文档类型', |
|
| 355 | + 'info_joindre_documents_article' => '你可附上你文章的附加文档的类型:', |
|
| 356 | + 'info_l_article' => '文章', |
|
| 357 | + 'info_la_breve' => '新闻', |
|
| 358 | + 'info_la_rubrique' => '专栏', |
|
| 359 | + 'info_langue_principale' => '主站点语言', |
|
| 360 | + 'info_largeur_vignette' => '@largeur_vignette@ x @hauteur_vignette@ 像素', # MODIF |
|
| 361 | + 'info_les_auteurs_1' => '按 @les_auteurs@', |
|
| 362 | + 'info_logo_format_interdit' => '仅@formats@格式之文件被允许作标志', |
|
| 363 | + 'info_logo_max_poids' => 'Les logos doivent obligatoirement faire moins de @maxi@ (ce fichier fait @actuel@).', |
|
| 364 | + 'info_mail_fournisseur' => '[email protected]', |
|
| 365 | + 'info_message_2' => '消息', |
|
| 366 | + 'info_message_supprime' => '删除的消息', |
|
| 367 | + 'info_mise_en_ligne' => '在线出版物的日期:', |
|
| 368 | + 'info_modification_parametres_securite' => '修改安全参数', |
|
| 369 | + 'info_mois_courant' => '在月中:', |
|
| 370 | + 'info_mot_cle_ajoute' => '下列关键被加进', |
|
| 371 | + 'info_multi_herit' => '缺省语言', |
|
| 372 | + 'info_multi_langues_soulignees' => '<u>加下划线的语言</u> 提供了所有界面的语言的翻译. 如果你选择语言, 公共站点的所有元素 (日期, 论坛) 将被自动翻译. 作为没有下划线的语言, 这些元素将出现在站点的主语言界面上.', # MODIF |
|
| 373 | + 'info_multilinguisme' => '多语言', |
|
| 374 | + 'info_nom_non_utilisateurs_connectes' => '你的名字不显示在连接用户的列表中.', |
|
| 375 | + 'info_nom_utilisateurs_connectes' => '你的名字显示在连接用户的列表中.', |
|
| 376 | + 'info_nombre_en_ligne' => '现在在线:', |
|
| 377 | + 'info_non_resultat' => ' "@cherche_mot@"没有结果', |
|
| 378 | + 'info_non_utilisation_messagerie' => '你没有使用站点内部消息.', |
|
| 379 | + 'info_nouveau_message' => '你有新消息', |
|
| 380 | + 'info_nouveaux_messages' => '你有 @total_messages@ 条新消息', |
|
| 381 | + 'info_numero_abbreviation' => '第 ', |
|
| 382 | + 'info_pense_bete' => '忘备', |
|
| 383 | + 'info_petit_ecran' => '小图显示', |
|
| 384 | + 'info_pixels' => '像素', |
|
| 385 | + 'info_plusieurs_mots_trouves' => '几个关键词找到了 "@cherche_mot@":', |
|
| 386 | + 'info_portfolio_automatique' => '自动相册:', |
|
| 387 | + 'info_premier_resultat' => '[@debut_limit@ 最新结果出了 @total@]', |
|
| 388 | + 'info_premier_resultat_sur' => '[@debut_limit@ 最新结果出了@total@]', |
|
| 389 | + 'info_propose_1' => '[@nom_site_spip@] 提交: @titre@', |
|
| 390 | + 'info_propose_2' => '提交文章 |
|
| 391 | 391 | -----------------', |
| 392 | - 'info_propose_3' => '文章 "@titre@" 提交给公众.', |
|
| 393 | - 'info_propose_4' => '你被邀请预览它发表你的观念', |
|
| 394 | - 'info_propose_5' => '在论坛中连向它. 在地址中可用到:', |
|
| 395 | - 'info_publie_01' => '文章 "@titre@" 被 @connect_nom@确认.', |
|
| 396 | - 'info_publie_1' => '[@nom_site_spip@] 出版: @titre@', |
|
| 397 | - 'info_publie_2' => '出版的文章 |
|
| 392 | + 'info_propose_3' => '文章 "@titre@" 提交给公众.', |
|
| 393 | + 'info_propose_4' => '你被邀请预览它发表你的观念', |
|
| 394 | + 'info_propose_5' => '在论坛中连向它. 在地址中可用到:', |
|
| 395 | + 'info_publie_01' => '文章 "@titre@" 被 @connect_nom@确认.', |
|
| 396 | + 'info_publie_1' => '[@nom_site_spip@] 出版: @titre@', |
|
| 397 | + 'info_publie_2' => '出版的文章 |
|
| 398 | 398 | -----------------', |
| 399 | - 'info_rechercher' => '搜索', |
|
| 400 | - 'info_rechercher_02' => '搜索:', |
|
| 401 | - 'info_remplacer_vignette' => '用定制的图标取代缺省的图标:', |
|
| 402 | - 'info_sans_titre_2' => '无标题', |
|
| 403 | - 'info_selectionner_fichier' => '从@upload@文件中选择一个文件', # MODIF |
|
| 404 | - 'info_selectionner_fichier_2' => '选择一个文件:', |
|
| 405 | - 'info_supprimer_vignette' => '删除小插图', |
|
| 406 | - 'info_symbole_bleu' => '<b>蓝色</b>标志<b>备注</b>:例如个人使用的消息.', # MODIF |
|
| 407 | - 'info_symbole_jaune' => '<b>黄色</b>表示<b>对所有编辑者声明</b> :所有站点管理者都能看见并编辑。', # MODIF |
|
| 408 | - 'info_symbole_vert' => '<b>绿色</b>表示<b>站点中与其它用户交换的信息</b>。', # MODIF |
|
| 409 | - 'info_telecharger_nouveau_logo' => '上传新图标:', |
|
| 410 | - 'info_telecharger_ordinateur' => '从你的电脑上传:', |
|
| 411 | - 'info_tous_resultats_enregistres' => '[所有结果被记录]', |
|
| 412 | - 'info_tout_afficher' => '显示所有', |
|
| 413 | - 'info_travaux_texte' => '站点还未建立. 请稍后再来...', |
|
| 414 | - 'info_travaux_titre' => '站点正在施工中', |
|
| 415 | - 'info_trop_resultat' => ' "@cherche_mot@"有太多结果; 请重定义搜索.', |
|
| 416 | - 'info_utilisation_messagerie_interne' => '你正使用站点的内部消息.', |
|
| 417 | - 'info_valider_lien' => '使连接有效', |
|
| 418 | - 'info_verifier_image' => ', 请确定你的图片已正确传送.', |
|
| 419 | - 'info_vignette_defaut' => '缺省的小插图', |
|
| 420 | - 'info_vignette_personnalisee' => '定制小插图', |
|
| 421 | - 'info_visite' => '访问:', |
|
| 422 | - 'info_vos_rendez_vous' => '将来的约会', |
|
| 423 | - 'infos_vos_pense_bete' => '备注', # MODIF |
|
| 399 | + 'info_rechercher' => '搜索', |
|
| 400 | + 'info_rechercher_02' => '搜索:', |
|
| 401 | + 'info_remplacer_vignette' => '用定制的图标取代缺省的图标:', |
|
| 402 | + 'info_sans_titre_2' => '无标题', |
|
| 403 | + 'info_selectionner_fichier' => '从@upload@文件中选择一个文件', # MODIF |
|
| 404 | + 'info_selectionner_fichier_2' => '选择一个文件:', |
|
| 405 | + 'info_supprimer_vignette' => '删除小插图', |
|
| 406 | + 'info_symbole_bleu' => '<b>蓝色</b>标志<b>备注</b>:例如个人使用的消息.', # MODIF |
|
| 407 | + 'info_symbole_jaune' => '<b>黄色</b>表示<b>对所有编辑者声明</b> :所有站点管理者都能看见并编辑。', # MODIF |
|
| 408 | + 'info_symbole_vert' => '<b>绿色</b>表示<b>站点中与其它用户交换的信息</b>。', # MODIF |
|
| 409 | + 'info_telecharger_nouveau_logo' => '上传新图标:', |
|
| 410 | + 'info_telecharger_ordinateur' => '从你的电脑上传:', |
|
| 411 | + 'info_tous_resultats_enregistres' => '[所有结果被记录]', |
|
| 412 | + 'info_tout_afficher' => '显示所有', |
|
| 413 | + 'info_travaux_texte' => '站点还未建立. 请稍后再来...', |
|
| 414 | + 'info_travaux_titre' => '站点正在施工中', |
|
| 415 | + 'info_trop_resultat' => ' "@cherche_mot@"有太多结果; 请重定义搜索.', |
|
| 416 | + 'info_utilisation_messagerie_interne' => '你正使用站点的内部消息.', |
|
| 417 | + 'info_valider_lien' => '使连接有效', |
|
| 418 | + 'info_verifier_image' => ', 请确定你的图片已正确传送.', |
|
| 419 | + 'info_vignette_defaut' => '缺省的小插图', |
|
| 420 | + 'info_vignette_personnalisee' => '定制小插图', |
|
| 421 | + 'info_visite' => '访问:', |
|
| 422 | + 'info_vos_rendez_vous' => '将来的约会', |
|
| 423 | + 'infos_vos_pense_bete' => '备注', # MODIF |
|
| 424 | 424 | |
| 425 | - // L |
|
| 426 | - 'lien_afficher_icones_seuls' => '只显示图片', |
|
| 427 | - 'lien_afficher_texte_icones' => '显示文本和图片', |
|
| 428 | - 'lien_afficher_texte_seul' => '只显示正文', |
|
| 429 | - 'lien_liberer' => '发表', |
|
| 430 | - 'lien_liberer_tous' => '释放这些文章', # MODIF |
|
| 431 | - 'lien_nouvea_pense_bete' => '新备注', |
|
| 432 | - 'lien_nouveau_message' => '新消息', |
|
| 433 | - 'lien_nouvelle_annonce' => '新声明', |
|
| 434 | - 'lien_petitions' => '请求', |
|
| 435 | - 'lien_popularite' => '普及: @popularite@%', |
|
| 436 | - 'lien_racine_site' => '站点根', |
|
| 437 | - 'lien_reessayer' => '重试', |
|
| 438 | - 'lien_repondre_message' => '回应消息', |
|
| 439 | - 'lien_supprimer' => '删除', |
|
| 440 | - 'lien_tout_afficher' => '显示所有', |
|
| 441 | - 'lien_visite_site' => '访问站点', |
|
| 442 | - 'lien_visites' => '@visites@ 访问', |
|
| 443 | - 'lien_voir_auteur' => '检查作者', |
|
| 444 | - 'login_acces_prive' => '访问私有区', |
|
| 445 | - 'login_autre_identifiant' => '用另一个标识符', |
|
| 446 | - 'login_cookie_accepte' => '请设定你的浏览器接受它们 (至少是这个站点a).', |
|
| 447 | - 'login_cookie_oblige' => '为安全的标识你,你必须接受cookies.', |
|
| 448 | - 'login_deconnexion_ok' => '已断开连接.', |
|
| 449 | - 'login_erreur_pass' => '密码错.', |
|
| 450 | - 'login_espace_prive' => '私有区', |
|
| 451 | - 'login_identifiant_inconnu' => '标识符 "@login@" 不可认.', |
|
| 452 | - 'login_login' => '登录:', |
|
| 453 | - 'login_login2' => '登录(连接到站点的标识符):', # MODIF |
|
| 454 | - 'login_login_pass_incorrect' => '(错误的登录和密码).', |
|
| 455 | - 'login_motpasseoublie' => '忘记密码?', |
|
| 456 | - 'login_non_securise' => '警告, 论坛不安全. |
|
| 425 | + // L |
|
| 426 | + 'lien_afficher_icones_seuls' => '只显示图片', |
|
| 427 | + 'lien_afficher_texte_icones' => '显示文本和图片', |
|
| 428 | + 'lien_afficher_texte_seul' => '只显示正文', |
|
| 429 | + 'lien_liberer' => '发表', |
|
| 430 | + 'lien_liberer_tous' => '释放这些文章', # MODIF |
|
| 431 | + 'lien_nouvea_pense_bete' => '新备注', |
|
| 432 | + 'lien_nouveau_message' => '新消息', |
|
| 433 | + 'lien_nouvelle_annonce' => '新声明', |
|
| 434 | + 'lien_petitions' => '请求', |
|
| 435 | + 'lien_popularite' => '普及: @popularite@%', |
|
| 436 | + 'lien_racine_site' => '站点根', |
|
| 437 | + 'lien_reessayer' => '重试', |
|
| 438 | + 'lien_repondre_message' => '回应消息', |
|
| 439 | + 'lien_supprimer' => '删除', |
|
| 440 | + 'lien_tout_afficher' => '显示所有', |
|
| 441 | + 'lien_visite_site' => '访问站点', |
|
| 442 | + 'lien_visites' => '@visites@ 访问', |
|
| 443 | + 'lien_voir_auteur' => '检查作者', |
|
| 444 | + 'login_acces_prive' => '访问私有区', |
|
| 445 | + 'login_autre_identifiant' => '用另一个标识符', |
|
| 446 | + 'login_cookie_accepte' => '请设定你的浏览器接受它们 (至少是这个站点a).', |
|
| 447 | + 'login_cookie_oblige' => '为安全的标识你,你必须接受cookies.', |
|
| 448 | + 'login_deconnexion_ok' => '已断开连接.', |
|
| 449 | + 'login_erreur_pass' => '密码错.', |
|
| 450 | + 'login_espace_prive' => '私有区', |
|
| 451 | + 'login_identifiant_inconnu' => '标识符 "@login@" 不可认.', |
|
| 452 | + 'login_login' => '登录:', |
|
| 453 | + 'login_login2' => '登录(连接到站点的标识符):', # MODIF |
|
| 454 | + 'login_login_pass_incorrect' => '(错误的登录和密码).', |
|
| 455 | + 'login_motpasseoublie' => '忘记密码?', |
|
| 456 | + 'login_non_securise' => '警告, 论坛不安全. |
|
| 457 | 457 | 如果你不愿自己的密码中途侦听到 |
| 458 | 458 | , 请激活你浏览器的 Javascript |
| 459 | 459 | 并且', |
| 460 | - 'login_nouvelle_tentative' => '新尝试', |
|
| 461 | - 'login_par_ici' => '你已注册... 这种方法...', |
|
| 462 | - 'login_pass2' => '密码:', |
|
| 463 | - 'login_preferez_refuser' => '<b>如果你更愿意拒绝 cookies</b>, 有其它的连接方法 (安全性要低一些) :', |
|
| 464 | - 'login_recharger' => '重载该页', |
|
| 465 | - 'login_rester_identifie' => '保留登录几天', # MODIF |
|
| 466 | - 'login_retour_public' => '返回公共站点', |
|
| 467 | - 'login_retour_site' => '返回公共站点', |
|
| 468 | - 'login_retoursitepublic' => '返回公共站点', |
|
| 469 | - 'login_sinscrire' => '注册', |
|
| 470 | - 'login_test_navigateur' => '测试浏览/重新连接', |
|
| 471 | - 'login_verifiez_navigateur' => '(无论如何, 请确认你的浏览器不会记住你的密码...)', |
|
| 460 | + 'login_nouvelle_tentative' => '新尝试', |
|
| 461 | + 'login_par_ici' => '你已注册... 这种方法...', |
|
| 462 | + 'login_pass2' => '密码:', |
|
| 463 | + 'login_preferez_refuser' => '<b>如果你更愿意拒绝 cookies</b>, 有其它的连接方法 (安全性要低一些) :', |
|
| 464 | + 'login_recharger' => '重载该页', |
|
| 465 | + 'login_rester_identifie' => '保留登录几天', # MODIF |
|
| 466 | + 'login_retour_public' => '返回公共站点', |
|
| 467 | + 'login_retour_site' => '返回公共站点', |
|
| 468 | + 'login_retoursitepublic' => '返回公共站点', |
|
| 469 | + 'login_sinscrire' => '注册', |
|
| 470 | + 'login_test_navigateur' => '测试浏览/重新连接', |
|
| 471 | + 'login_verifiez_navigateur' => '(无论如何, 请确认你的浏览器不会记住你的密码...)', |
|
| 472 | 472 | |
| 473 | - // M |
|
| 474 | - 'module_fichiers_langues' => '语言文件', |
|
| 473 | + // M |
|
| 474 | + 'module_fichiers_langues' => '语言文件', |
|
| 475 | 475 | |
| 476 | - // N |
|
| 477 | - 'navigateur_pas_redirige' => '如果您的浏览器没有跳转,请按这里继续.', |
|
| 476 | + // N |
|
| 477 | + 'navigateur_pas_redirige' => '如果您的浏览器没有跳转,请按这里继续.', |
|
| 478 | 478 | |
| 479 | - // O |
|
| 480 | - 'onglet_affacer_base' => '删除数据库', |
|
| 481 | - 'onglet_auteur' => '作者', |
|
| 482 | - 'onglet_contenu_site' => '站点内容', |
|
| 483 | - 'onglet_evolution_visite_mod' => '评估', |
|
| 484 | - 'onglet_fonctions_avances' => '高级功能', |
|
| 485 | - 'onglet_informations_personnelles' => '个人信息', |
|
| 486 | - 'onglet_interactivite' => '互动', |
|
| 487 | - 'onglet_messagerie' => '消息', |
|
| 488 | - 'onglet_repartition_rubrique' => '按专栏发布', |
|
| 489 | - 'onglet_save_restaur_base' => '备份/恢复数据库', |
|
| 490 | - 'onglet_vider_cache' => '清空缓存', |
|
| 479 | + // O |
|
| 480 | + 'onglet_affacer_base' => '删除数据库', |
|
| 481 | + 'onglet_auteur' => '作者', |
|
| 482 | + 'onglet_contenu_site' => '站点内容', |
|
| 483 | + 'onglet_evolution_visite_mod' => '评估', |
|
| 484 | + 'onglet_fonctions_avances' => '高级功能', |
|
| 485 | + 'onglet_informations_personnelles' => '个人信息', |
|
| 486 | + 'onglet_interactivite' => '互动', |
|
| 487 | + 'onglet_messagerie' => '消息', |
|
| 488 | + 'onglet_repartition_rubrique' => '按专栏发布', |
|
| 489 | + 'onglet_save_restaur_base' => '备份/恢复数据库', |
|
| 490 | + 'onglet_vider_cache' => '清空缓存', |
|
| 491 | 491 | |
| 492 | - // P |
|
| 493 | - 'pass_choix_pass' => '请选择新密码:', |
|
| 494 | - 'pass_erreur' => '错误', |
|
| 495 | - 'pass_erreur_acces_refuse' => '<b>错误:</b> 你再也无权访问站点.', |
|
| 496 | - 'pass_erreur_code_inconnu' => '<b>错误:</b> 代码不符合任何有站点访问权的访问者.', |
|
| 497 | - 'pass_erreur_non_enregistre' => '<b>错误 :</b> 地址<tt>@email_oubli@</tt> 未在站点注册.', |
|
| 498 | - 'pass_erreur_non_valide' => '<b>错误 :</b> 电子邮件 <tt>@email_oubli@</tt> 无效!', |
|
| 499 | - 'pass_erreur_probleme_technique' => '<b>错误 :</b> 电子邮件由于技术原因不能发送.', |
|
| 500 | - 'pass_espace_prive_bla' => '注册后站点的私有区对访问者开放 |
|
| 492 | + // P |
|
| 493 | + 'pass_choix_pass' => '请选择新密码:', |
|
| 494 | + 'pass_erreur' => '错误', |
|
| 495 | + 'pass_erreur_acces_refuse' => '<b>错误:</b> 你再也无权访问站点.', |
|
| 496 | + 'pass_erreur_code_inconnu' => '<b>错误:</b> 代码不符合任何有站点访问权的访问者.', |
|
| 497 | + 'pass_erreur_non_enregistre' => '<b>错误 :</b> 地址<tt>@email_oubli@</tt> 未在站点注册.', |
|
| 498 | + 'pass_erreur_non_valide' => '<b>错误 :</b> 电子邮件 <tt>@email_oubli@</tt> 无效!', |
|
| 499 | + 'pass_erreur_probleme_technique' => '<b>错误 :</b> 电子邮件由于技术原因不能发送.', |
|
| 500 | + 'pass_espace_prive_bla' => '注册后站点的私有区对访问者开放 |
|
| 501 | 501 | . 一旦注册, |
| 502 | 502 | 你可以预览进展中的文章, |
| 503 | 503 | 提交文章参与所有的论坛.', |
| 504 | - 'pass_forum_bla' => '你已请求参与论坛 |
|
| 504 | + 'pass_forum_bla' => '你已请求参与论坛 |
|
| 505 | 505 | 注册访问者保留区.', |
| 506 | - 'pass_indiquez_cidessous' => '在以下输入你以前注册的电子邮件地址 |
|
| 506 | + 'pass_indiquez_cidessous' => '在以下输入你以前注册的电子邮件地址 |
|
| 507 | 507 | .你 |
| 508 | 508 | 将收到电子邮件 |
| 509 | 509 | 向你解释如何得到访问.', |
| 510 | - 'pass_mail_passcookie' => '(这是自动消息) |
|
| 510 | + 'pass_mail_passcookie' => '(这是自动消息) |
|
| 511 | 511 | 要重新访问站点 |
| 512 | 512 | @nom_site_spip@ (@adresse_site@) |
| 513 | 513 | |
@@ -519,86 +519,86 @@ discard block |
||
| 519 | 519 | 重新连接到站点。 |
| 520 | 520 | |
| 521 | 521 | ', # MODIF |
| 522 | - 'pass_mot_oublie' => '忘记密码', |
|
| 523 | - 'pass_nouveau_enregistre' => '你的新密码已经被记录.', |
|
| 524 | - 'pass_nouveau_pass' => '新密码', |
|
| 525 | - 'pass_ok' => '好', |
|
| 526 | - 'pass_oubli_mot' => '忘记密码', |
|
| 527 | - 'pass_quitter_fenetre' => '退出窗口', |
|
| 528 | - 'pass_rappel_login' => '记住: 你的标识符(登录) 是 "@login@".', |
|
| 529 | - 'pass_recevoir_mail' => '你将收到电子邮件解释如何访问站点.', # MODIF |
|
| 530 | - 'pass_retour_public' => '返回公众站点', |
|
| 531 | - 'pass_rien_a_faire_ici' => '这里无事可作.', |
|
| 532 | - 'pass_vousinscrire' => '登记站点', |
|
| 533 | - 'precedent' => '前一个', |
|
| 534 | - 'previsualisation' => '预览', |
|
| 535 | - 'previsualiser' => '预览', |
|
| 522 | + 'pass_mot_oublie' => '忘记密码', |
|
| 523 | + 'pass_nouveau_enregistre' => '你的新密码已经被记录.', |
|
| 524 | + 'pass_nouveau_pass' => '新密码', |
|
| 525 | + 'pass_ok' => '好', |
|
| 526 | + 'pass_oubli_mot' => '忘记密码', |
|
| 527 | + 'pass_quitter_fenetre' => '退出窗口', |
|
| 528 | + 'pass_rappel_login' => '记住: 你的标识符(登录) 是 "@login@".', |
|
| 529 | + 'pass_recevoir_mail' => '你将收到电子邮件解释如何访问站点.', # MODIF |
|
| 530 | + 'pass_retour_public' => '返回公众站点', |
|
| 531 | + 'pass_rien_a_faire_ici' => '这里无事可作.', |
|
| 532 | + 'pass_vousinscrire' => '登记站点', |
|
| 533 | + 'precedent' => '前一个', |
|
| 534 | + 'previsualisation' => '预览', |
|
| 535 | + 'previsualiser' => '预览', |
|
| 536 | 536 | |
| 537 | - // S |
|
| 538 | - 'stats_visites_et_popularite' => '@visites@ 访问者; 流行: @popularite@', |
|
| 539 | - 'suivant' => '后一个', |
|
| 537 | + // S |
|
| 538 | + 'stats_visites_et_popularite' => '@visites@ 访问者; 流行: @popularite@', |
|
| 539 | + 'suivant' => '后一个', |
|
| 540 | 540 | |
| 541 | - // T |
|
| 542 | - 'taille_ko' => '@taille@ kb', |
|
| 543 | - 'taille_mo' => '@taille@ Mb', |
|
| 544 | - 'taille_octets' => '@taille@字符', |
|
| 545 | - 'texte_actualite_site_1' => '当您认为此界面适合您,您就可以点击«', # MODIF |
|
| 546 | - 'texte_actualite_site_2' => '完整界西', |
|
| 547 | - 'texte_actualite_site_3' => '» 使更多特性可用.', |
|
| 548 | - 'texte_creation_automatique_vignette' => '站点自动创建签名预览激活. 如果你安装, 通过论坛, 图片格式 @gd_formats@, 它们将能和一个最大尺寸为 @taille_preview@ 像素的连接.', |
|
| 549 | - 'texte_documents_associes' => '以下文档与文章相关联,, |
|
| 541 | + // T |
|
| 542 | + 'taille_ko' => '@taille@ kb', |
|
| 543 | + 'taille_mo' => '@taille@ Mb', |
|
| 544 | + 'taille_octets' => '@taille@字符', |
|
| 545 | + 'texte_actualite_site_1' => '当您认为此界面适合您,您就可以点击«', # MODIF |
|
| 546 | + 'texte_actualite_site_2' => '完整界西', |
|
| 547 | + 'texte_actualite_site_3' => '» 使更多特性可用.', |
|
| 548 | + 'texte_creation_automatique_vignette' => '站点自动创建签名预览激活. 如果你安装, 通过论坛, 图片格式 @gd_formats@, 它们将能和一个最大尺寸为 @taille_preview@ 像素的连接.', |
|
| 549 | + 'texte_documents_associes' => '以下文档与文章相关联,, |
|
| 550 | 550 | 但是它们不是直接插入的 |
| 551 | 551 | . 基于公共站点的规划, |
| 552 | 552 | 它们将作为附和文档出现.', |
| 553 | - 'texte_erreur_mise_niveau_base' => '整理过程中数据库错误。 |
|
| 553 | + 'texte_erreur_mise_niveau_base' => '整理过程中数据库错误。 |
|
| 554 | 554 | 图像<b>@fichier@</b>不能通过 (article @id_article@)。 |
| 555 | 555 | 认真阅读此参考内容, |
| 556 | 556 | 再试整理过程, |
| 557 | 557 | 并注意图像始终显示在你的文件中。', # MODIF |
| 558 | - 'texte_inc_auth_1' => '用登录名标识你自己 |
|
| 558 | + 'texte_inc_auth_1' => '用登录名标识你自己 |
|
| 559 | 559 | <b>@auth_login@</b>, 但是在数据库中不存在 (不再存在). |
| 560 | 560 | 试', # MODIF |
| 561 | - 'texte_inc_auth_2' => '重新连接', |
|
| 562 | - 'texte_inc_auth_3' => '退出然后 |
|
| 561 | + 'texte_inc_auth_2' => '重新连接', |
|
| 562 | + 'texte_inc_auth_3' => '退出然后 |
|
| 563 | 563 | 重新启动你的浏览器.', |
| 564 | - 'texte_inc_config' => '以下的输入的修改显著的影响了站点的功能 |
|
| 564 | + 'texte_inc_config' => '以下的输入的修改显著的影响了站点的功能 |
|
| 565 | 565 | . 仔细它除非你熟悉SPIP系统的功能 |
| 566 | 566 | . <br /><br /><b>更一般地 |
| 567 | 567 | , 强烈建议你的WEB站点管理员 |
| 568 | 568 | 处理这页.</b>', # MODIF |
| 569 | - 'texte_inc_meta_1' => '系统再写入文件<code>@fichier@</code>时遇到错误。作为站点管理员请', # MODIF |
|
| 570 | - 'texte_inc_meta_2' => '确认写权限', # MODIF |
|
| 571 | - 'texte_inc_meta_3' => '目录 ecrire/ 之上', # MODIF |
|
| 572 | - 'texte_statut_en_cours_redaction' => '编辑中', |
|
| 573 | - 'texte_statut_poubelle' => '到垃圾箱', |
|
| 574 | - 'texte_statut_propose_evaluation' => '提交评估', |
|
| 575 | - 'texte_statut_publie' => '在线出版', |
|
| 576 | - 'texte_statut_refuse' => '丢弃', |
|
| 577 | - 'titre_ajouter_mot_cle' => '加关键字:', |
|
| 578 | - 'titre_cadre_raccourcis' => '快捷方式:', |
|
| 579 | - 'titre_changer_couleur_interface' => '改变界面颜色', |
|
| 580 | - 'titre_image_admin_article' => '你可以管理这篇文章', |
|
| 581 | - 'titre_image_administrateur' => '管理者', |
|
| 582 | - 'titre_image_aide' => '该项目的帮助', |
|
| 583 | - 'titre_image_auteur_supprime' => '删除的作者', |
|
| 584 | - 'titre_image_redacteur' => '不能访问的编辑者', |
|
| 585 | - 'titre_image_redacteur_02' => '编辑者', |
|
| 586 | - 'titre_image_visiteur' => '访问者', |
|
| 587 | - 'titre_joindre_document' => '附加文档', |
|
| 588 | - 'titre_mots_cles' => '关键词', |
|
| 589 | - 'titre_probleme_technique' => '警告:技术问题 MYSQL 制止访问站点的这部分,谢谢理解 .', # MODIF |
|
| 590 | - 'titre_publier_document' => '在此栏下发布文档', |
|
| 591 | - 'titre_signatures_attente' => '签名等待认证', # MODIF |
|
| 592 | - 'titre_statistiques' => '站点统计', |
|
| 593 | - 'titre_titre_document' => '文章标题:', |
|
| 594 | - 'trad_reference' => '(参考文章)', # MODIF |
|
| 569 | + 'texte_inc_meta_1' => '系统再写入文件<code>@fichier@</code>时遇到错误。作为站点管理员请', # MODIF |
|
| 570 | + 'texte_inc_meta_2' => '确认写权限', # MODIF |
|
| 571 | + 'texte_inc_meta_3' => '目录 ecrire/ 之上', # MODIF |
|
| 572 | + 'texte_statut_en_cours_redaction' => '编辑中', |
|
| 573 | + 'texte_statut_poubelle' => '到垃圾箱', |
|
| 574 | + 'texte_statut_propose_evaluation' => '提交评估', |
|
| 575 | + 'texte_statut_publie' => '在线出版', |
|
| 576 | + 'texte_statut_refuse' => '丢弃', |
|
| 577 | + 'titre_ajouter_mot_cle' => '加关键字:', |
|
| 578 | + 'titre_cadre_raccourcis' => '快捷方式:', |
|
| 579 | + 'titre_changer_couleur_interface' => '改变界面颜色', |
|
| 580 | + 'titre_image_admin_article' => '你可以管理这篇文章', |
|
| 581 | + 'titre_image_administrateur' => '管理者', |
|
| 582 | + 'titre_image_aide' => '该项目的帮助', |
|
| 583 | + 'titre_image_auteur_supprime' => '删除的作者', |
|
| 584 | + 'titre_image_redacteur' => '不能访问的编辑者', |
|
| 585 | + 'titre_image_redacteur_02' => '编辑者', |
|
| 586 | + 'titre_image_visiteur' => '访问者', |
|
| 587 | + 'titre_joindre_document' => '附加文档', |
|
| 588 | + 'titre_mots_cles' => '关键词', |
|
| 589 | + 'titre_probleme_technique' => '警告:技术问题 MYSQL 制止访问站点的这部分,谢谢理解 .', # MODIF |
|
| 590 | + 'titre_publier_document' => '在此栏下发布文档', |
|
| 591 | + 'titre_signatures_attente' => '签名等待认证', # MODIF |
|
| 592 | + 'titre_statistiques' => '站点统计', |
|
| 593 | + 'titre_titre_document' => '文章标题:', |
|
| 594 | + 'trad_reference' => '(参考文章)', # MODIF |
|
| 595 | 595 | |
| 596 | - // Z |
|
| 597 | - 'zbug_code' => '代码', |
|
| 598 | - 'zbug_erreur_boucle_double' => '环@id@: 重复定义', # MODIF |
|
| 599 | - 'zbug_erreur_boucle_fermant' => '环@id@: 缺少语句结尾标志', # MODIF |
|
| 600 | - 'zbug_erreur_boucle_syntaxe' => '句法中出现错误的环', # MODIF |
|
| 601 | - 'zbug_erreur_filtre' => '错误: 过滤<b>« @filtre@ »</b>未定义', # MODIF |
|
| 602 | - 'zbug_info_erreur_squelette' => '站点错误', |
|
| 603 | - 'zbug_table_inconnue' => 'SQL表格 « @table@ » 未知' |
|
| 596 | + // Z |
|
| 597 | + 'zbug_code' => '代码', |
|
| 598 | + 'zbug_erreur_boucle_double' => '环@id@: 重复定义', # MODIF |
|
| 599 | + 'zbug_erreur_boucle_fermant' => '环@id@: 缺少语句结尾标志', # MODIF |
|
| 600 | + 'zbug_erreur_boucle_syntaxe' => '句法中出现错误的环', # MODIF |
|
| 601 | + 'zbug_erreur_filtre' => '错误: 过滤<b>« @filtre@ »</b>未定义', # MODIF |
|
| 602 | + 'zbug_info_erreur_squelette' => '站点错误', |
|
| 603 | + 'zbug_table_inconnue' => 'SQL表格 « @table@ » 未知' |
|
| 604 | 604 | ); |