[SPIP] ~maj 3.0.10 --> 3.0.14
[lhc/web/www.git] / www / ecrire / public / debusquer.php
index 1e3e346..378ca3b 100644 (file)
@@ -3,7 +3,7 @@
 /***************************************************************************\
  *  SPIP, Systeme de publication pour l'internet                           *
  *                                                                         *
- *  Copyright (c) 2001-2012                                                *
+ *  Copyright (c) 2001-2014                                                *
  *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *
  *                                                                         *
  *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *
@@ -277,9 +277,9 @@ function debusquer_requete($message){
 
        // Requete erronee
        $err = "<b>" . _T('avis_erreur_mysql') . " $errno</b><br /><tt>\n"
-               . htmlspecialchars($msg)
+               . spip_htmlspecialchars($msg)
                . "\n<br /><span style='color: red'><b>"
-               . htmlspecialchars($query)
+               . spip_htmlspecialchars($query)
                . "</b></span></tt><br />";
        //. aide('erreur_mysql');
 
@@ -455,7 +455,7 @@ function debusquer_squelette($fonc, $mode, $self){
                }
                else
                        return strlen(trim($res))
-                       ? "<img src='".chemin_image('compat-16.png')."' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res</div>"
+                       ? "<img src='".chemin_image('compat-16.png')."' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res</div>"
                        // cas de l'appel sur erreur: montre la page
                        : $GLOBALS['debug_objets']['resultat']['tout'];
        }
@@ -475,7 +475,7 @@ function debusquer_squelette($fonc, $mode, $self){
                $res = $id = '';
        }
        return !trim($texte) ? '' : (
-               "<img src='".chemin_image('compat-16.png')."' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res"
+               "<img src='".chemin_image('compat-16.png')."' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res"
                        . "<div id='debug_boucle'><fieldset$id><legend>"
                        . "<a href='".$self."#f_".substr($fonc, 0, 37)."'> &#8593; "
                        . ($legend ? $legend : $mode)
@@ -646,7 +646,7 @@ function debusquer_navigation_boucles($boucles, $nom_skel, $self, $nom_source){
                                "</td><td>\n" .
                                $req .
                                "</td><td>\n" .
-                               htmlspecialchars($crit) .
+                               spip_htmlspecialchars($crit) .
                                "</td></tr>";
                }
        }
@@ -681,7 +681,7 @@ function debusquer_source($objet, $affiche){
                                $brut_sql .= "<h3>" . ($num==1 ? $num . " sur " . sql_count($ress_req) : $num) . "</h3>";
                                $brut_sql .= "<p>";
                                foreach ($retours_sql as $key => $val){
-                                       $brut_sql .= "<strong>" . $key . "</strong> => " . htmlspecialchars(couper($val, 150)) . "<br />\n";
+                                       $brut_sql .= "<strong>" . $key . "</strong> => " . spip_htmlspecialchars(couper($val, 150)) . "<br />\n";
                                }
                                $brut_sql .= "</p>";
                        }