[SPIP] ~maj 3.0.13 -> 3.0.14
[ptitvelo/web/www.git] / www / ecrire / public / tracer.php
index 94cdccc..5cccef0 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.     *
@@ -59,7 +59,7 @@ function trace_query_chrono($m1, $m2, $query, $result, $serveur='')
        $tt += $dt;
        $nb++;
 
-       $q = preg_replace('/([a-z)`])\s+([A-Z])/', "$1\n<br />$2",htmlentities($query));
+       $q = preg_replace('/([a-z)`])\s+([A-Z])/', "$1\n<br />$2",spip_htmlentities($query));
        $e =  sql_explain($query, $serveur);
        $r = str_replace('Resource id ','',(is_object($result)?get_class($result):$result));
        $tableau_des_temps[] = array($dt, $nb, $boucle, $q, $e, $r, $contexte);
@@ -134,15 +134,13 @@ function chrono_requete($temps)
                  . join('',$t[$k]);
        }
 
-       $navigation = 
-         _T('zbug_statistiques')
-         . "<table style='text-align: left; border: 1px solid;'><tr><td>"
+       $navigation = array(_T('zbug_statistiques'),
+         "<tr><td>"
                . join("</td></tr>\n<tr><td>", $d)
          . "</td></tr>\n"
          .  (# _request('var_mode_objet') ? '' : 
-            ("<tr><td>" .  count($temps) . "</td><td>" . _T('info_total') . '</td><td class="time">' . $total . "</td><td></td></tr>"))
-         . "</table>";
-
+            ("<tr><td>" .  count($temps) . "</td><td>" . _T('info_total') . '</td><td class="time">' . $total . "</td><td></td></tr>")));
+         
        return array($temps, $navigation);
 }