From 8e7b5dd5779f8beeb3c63abebac048bd2155f044 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Fri, 20 Feb 2004 11:44:06 +0000 Subject: [PATCH] =?utf8?q?int=E9gration=20bien=20meilleure=20du=20d=E9bug?= =?utf8?q?=20de=20mysql?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- htdocs/css/default.css | 5 ++++- include/xorg.page.inc.php | 3 +-- templates/database-debug.tpl | 6 ++---- templates/skin/common.dev.tpl | 15 --------------- templates/skin/common.devel.tpl | 30 ++++++++++++++++++++++++++++++ templates/skin/default.tpl | 6 ++---- 6 files changed, 39 insertions(+), 26 deletions(-) delete mode 100644 templates/skin/common.dev.tpl create mode 100644 templates/skin/common.devel.tpl diff --git a/htdocs/css/default.css b/htdocs/css/default.css index 69d9300..3854a5c 100644 --- a/htdocs/css/default.css +++ b/htdocs/css/default.css @@ -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 $ */ diff --git a/include/xorg.page.inc.php b/include/xorg.page.inc.php index 1934041..c257e9d 100644 --- a/include/xorg.page.inc.php +++ b/include/xorg.page.inc.php @@ -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"); diff --git a/templates/database-debug.tpl b/templates/database-debug.tpl index e0e2e32..464599d 100644 --- a/templates/database-debug.tpl +++ b/templates/database-debug.tpl @@ -1,8 +1,7 @@ {dynamic} {foreach item=query from=$trace_data} -
- +
{/if}
QUERY:
@@ -19,7 +18,7 @@
- +
@@ -41,7 +40,6 @@
table type{$query.explain.Extra}
-
{/foreach} {/dynamic} diff --git a/templates/skin/common.dev.tpl b/templates/skin/common.dev.tpl deleted file mode 100644 index fcfad29..0000000 --- a/templates/skin/common.dev.tpl +++ /dev/null @@ -1,15 +0,0 @@ -{* $Id: common.dev.tpl,v 1.1 2004-02-12 02:58:16 x2000habouzit Exp $ *} - -
-
Outils de dev
-
- VALIDER XHTML 1.1
- VALIDER CSS -
-
- XHTML ref.
- CSS2 ref. -
-
- -{* 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 index 0000000..125d7c5 --- /dev/null +++ b/templates/skin/common.devel.tpl @@ -0,0 +1,30 @@ +{* $Id: common.devel.tpl,v 1.1 2004-02-20 11:44:07 x2000habouzit Exp $ *} + +{if $validate} +
+
Outils de dev
+
+ VALIDER XHTML 1.1
+ VALIDER CSS +
+
+ XHTML ref.
+ CSS2 ref. +
+
+{/if} + +{dynamic} +{if $db_trace neq "\n\n"} +
+
+ Trace de l'exécution de cette page sur mysql (hover me) +
+
+ {$db_trace} +
+
+{/if} +{/dynamic} + +{* vim:set et sw=2 sts=2 sws=2: *} diff --git a/templates/skin/default.tpl b/templates/skin/default.tpl index 91db0c6..e889f45 100644 --- a/templates/skin/default.tpl +++ b/templates/skin/default.tpl @@ -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 $ *} @@ -11,9 +11,7 @@ {include file=skin/common.bandeau.head.tpl} -{if $validate} -{include file=skin/common.dev.tpl validate=$validate} -{/if} +{include file=skin/common.devel.tpl} {if $smarty.session.suid} -- 2.1.4