Skip to content
Extraits de code Groupes Projets
Valider 8a241578 rédigé par marcimat's avatar marcimat
Parcourir les fichiers

Corrections de notices PHP

À noter que dans _T parfois la globale 'spip_lang' n'est étrangement pas définie, par exemple dans l'ajax du brouteur de l'espace privé. J'ai posé un pis-aller mais je me demande si c'est pas un problème plus en amont.
parent 56209ad0
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -60,7 +60,7 @@ function ajax_retour($corps, $content_type = null){ ...@@ -60,7 +60,7 @@ function ajax_retour($corps, $content_type = null){
if (isset($_COOKIE['spip_admin']) if (isset($_COOKIE['spip_admin'])
AND ((_request('var_mode')=='debug') OR !empty($GLOBALS['tableau_des_temps']))) AND ((_request('var_mode')=='debug') OR !empty($GLOBALS['tableau_des_temps'])))
$e = erreur_squelette(); $e = erreur_squelette();
if (isset($GLOBALS['transformer_xml']) OR $GLOBALS['exec']=='valider_xml'){ if (isset($GLOBALS['transformer_xml']) OR (isset($GLOBALS['exec']) AND $GLOBALS['exec']=='valider_xml')){
$debut = _DOCTYPE_ECRIRE $debut = _DOCTYPE_ECRIRE
."<html><head><title>Debug Spip Ajax</title></head>" ."<html><head><title>Debug Spip Ajax</title></head>"
."<body><div>\n\n" ."<body><div>\n\n"
......
...@@ -98,7 +98,7 @@ function f_insert_head($texte) { ...@@ -98,7 +98,7 @@ function f_insert_head($texte) {
// Inserer au besoin les boutons admins // Inserer au besoin les boutons admins
// http://doc.spip.org/@f_admin // http://doc.spip.org/@f_admin
function f_admin ($texte) { function f_admin ($texte) {
if ($GLOBALS['affiche_boutons_admin']) { if (isset($GLOBALS['affiche_boutons_admin']) AND $GLOBALS['affiche_boutons_admin']) {
include_spip('public/admin'); include_spip('public/admin');
$texte = affiche_boutons_admin($texte); $texte = affiche_boutons_admin($texte);
} }
...@@ -141,4 +141,4 @@ function f_queue(&$texte){ ...@@ -141,4 +141,4 @@ function f_queue(&$texte){
return $texte; return $texte;
} }
?> ?>
\ No newline at end of file
...@@ -490,7 +490,13 @@ function _T($texte, $args=array(), $options=array()) { ...@@ -490,7 +490,13 @@ function _T($texte, $args=array(), $options=array()) {
unset($args['spip_lang']); unset($args['spip_lang']);
} }
// Sinon on prend la langue du contexte // Sinon on prend la langue du contexte
else{ else {
// [fixme] dans certains cas d'ajax, la globale n'est pas presente
// c'est peut etre un probleme plus en amont.
if (!isset($GLOBALS['spip_lang'])) {
include_spip('inc/lang');
utiliser_langue_visiteur();
}
$lang = $GLOBALS['spip_lang']; $lang = $GLOBALS['spip_lang'];
} }
$text = $traduire($texte, $lang); $text = $traduire($texte, $lang);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter