intégration bien meilleure du débug de mysql
authorx2000habouzit <x2000habouzit>
Fri, 20 Feb 2004 11:44:06 +0000 (11:44 +0000)
committerx2000habouzit <x2000habouzit>
Fri, 20 Feb 2004 11:44:06 +0000 (11:44 +0000)
htdocs/css/default.css
include/xorg.page.inc.php
templates/database-debug.tpl
templates/skin/common.dev.tpl [deleted file]
templates/skin/common.devel.tpl [new file with mode: 0644]
templates/skin/default.tpl

index 69d9300..3854a5c 100644 (file)
@@ -251,6 +251,9 @@ div.long td.rt { width: 65%; }
     background: #c0e0e0;
 }
 
+#db-trace div.hide       { display: none; }
+#db-trace:hover div.hide { display: block }
+
 #suid {
     color: red;
     background: #ffc0cb;
@@ -330,4 +333,4 @@ div.long td.rt { width: 65%; }
     vertical-align: top;
 }
 /* vim: set et ts=4 sts=4 sw=4: */
-/* $Id: default.css,v 1.22 2004-02-20 01:46:22 x2000habouzit Exp $ */
+/* $Id: default.css,v 1.23 2004-02-20 11:44:06 x2000habouzit Exp $ */
index 1934041..c257e9d 100644 (file)
@@ -67,8 +67,7 @@ class XorgPage extends DiogenesCorePage {
             if(isset($_SESSION['suid'])) $this->caching=false;
             $id = $this->make_id($append_to_id);
             if($site_dev) {
-                echo $globals->db->trace_format($this, 'database-debug.tpl');
-
+                $this->assign('db_trace', $globals->db->trace_format($this, 'database-debug.tpl'));
                 $this->assign('validate', urlencode($baseurl.'/valid.html'));
                 $result = $this->fetch('skin/'.$_SESSION['skin'], $id);
                 $fd = fopen($this->cache_dir."valid.html","w");
index e0e2e32..464599d 100644 (file)
@@ -1,8 +1,7 @@
 {dynamic}
 
 {foreach item=query from=$trace_data}
-<br />
-<table class="bicol" style="width: 75%; font-family: fixed">
+<table class="bicol" style="width: 75%; font-family: fixed; margin-left:2px; margin-top: 3px;">
   <tr class="impair">
     <td>
       <strong>QUERY:</strong><br />
@@ -19,7 +18,7 @@
   </tr>
   {/if}
 </table>
-<table class="bicol" style="width: 75%; font-family: fixed">
+<table class="bicol" style="width: 75%; font-family: fixed; margin-left: 2px; margin-bottom: 3px; margin-top: -1px;">
   <tr>
     <th>table</th>
     <th>type</th>
@@ -41,7 +40,6 @@
     <td class="center">{$query.explain.Extra}</td>
   </tr>
 </table>
-<br />
 {/foreach}
 
 {/dynamic}
diff --git a/templates/skin/common.dev.tpl b/templates/skin/common.dev.tpl
deleted file mode 100644 (file)
index fcfad29..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{* $Id: common.dev.tpl,v 1.1 2004-02-12 02:58:16 x2000habouzit Exp $ *}
-
-    <div id="dev">
-      <div class="title">Outils de dev</div>
-      <div>
-        <a href="http://validator.w3.org/check?uri={$validate}">VALIDER XHTML 1.1</a><br />
-        <a href="http://jigsaw.w3.org/css-validator/validator?uri={$validate}">VALIDER CSS</a>
-      </div>
-      <div>
-        <a href="http://www.w3schools.com/xhtml/xhtml_reference.asp">XHTML ref.</a><br />
-        <a href="http://www.w3schools.com/css/css_reference.asp">CSS2 ref.</a>
-      </div>
-    </div>
-
-{* vim:set et sw=2 sts=2 sws=2: *}
diff --git a/templates/skin/common.devel.tpl b/templates/skin/common.devel.tpl
new file mode 100644 (file)
index 0000000..125d7c5
--- /dev/null
@@ -0,0 +1,30 @@
+{* $Id: common.devel.tpl,v 1.1 2004-02-20 11:44:07 x2000habouzit Exp $ *}
+
+{if $validate}
+  <div id="dev">
+    <div class="title">Outils de dev</div>
+    <div>
+      <a href="http://validator.w3.org/check?uri={$validate}">VALIDER XHTML 1.1</a><br />
+      <a href="http://jigsaw.w3.org/css-validator/validator?uri={$validate}">VALIDER CSS</a>
+    </div>
+    <div>
+      <a href="http://www.w3schools.com/xhtml/xhtml_reference.asp">XHTML ref.</a><br />
+      <a href="http://www.w3schools.com/css/css_reference.asp">CSS2 ref.</a>
+    </div>
+  </div>
+{/if}
+
+{dynamic}
+{if $db_trace neq "\n\n"}
+  <div id="db-trace">
+    <div class="rubrique">
+      Trace de l'exécution de cette page sur mysql (hover me)
+    </div>
+    <div class="hide">
+  {$db_trace}
+    </div>
+  </div>
+{/if}
+{/dynamic}
+
+{* vim:set et sw=2 sts=2 sws=2: *}
index 91db0c6..e889f45 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: default.tpl,v 1.10 2004-02-12 02:58:16 x2000habouzit Exp $ *}
+{* $Id: default.tpl,v 1.11 2004-02-20 11:44:07 x2000habouzit Exp $ *}
 <?xml version="1.0" encoding="iso-8859-1"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
@@ -11,9 +11,7 @@
 {include file=skin/common.bandeau.head.tpl}
   </head>
   <body>
-{if $validate}
-{include file=skin/common.dev.tpl validate=$validate}
-{/if}
+{include file=skin/common.devel.tpl}
 
 {if $smarty.session.suid}
     <table id="suid" cellpadding="0" cellspacing="0">