From bb7af3cd3f218b9fd8bac2f1370513e82f7256e0 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Sun, 28 Jan 2007 13:40:48 +0000 Subject: [PATCH] handler_login becomes a core feature Some skin updates and improvements git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1418 839d8a87-29fc-0310-9880-83ba4fa771e5 --- htdocs/css/keynote.css | 4 ++-- modules/auth.php | 9 --------- modules/core.php | 11 ++++++++++- modules/xnet.php | 1 - templates/skin/common.database-debug.tpl | 21 ++++++++++++--------- 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/htdocs/css/keynote.css b/htdocs/css/keynote.css index aa5692f..460ef14 100644 --- a/htdocs/css/keynote.css +++ b/htdocs/css/keynote.css @@ -25,7 +25,7 @@ body { font-family: "Arial", sans-serif; - font-size: 90%; + font-size: 10pt; background: url('../images/skins/keynote_bg.png') #4f4e63 top left repeat-x fixed; color: #fff; } @@ -545,7 +545,7 @@ div.adresse { #body-menu { width: 140px; text-align: center; - font-size: 78%; + font-size: 85%; font-weight: bold; white-space: nowrap; border-right: 1px solid #fff; diff --git a/modules/auth.php b/modules/auth.php index a9afa5f..0c7344e 100644 --- a/modules/auth.php +++ b/modules/auth.php @@ -24,7 +24,6 @@ class AuthModule extends PLModule function handlers() { return array( - 'login' => $this->make_hook('login', AUTH_COOKIE), 'groupex/donne-chall.php' => $this->make_hook('chall', AUTH_PUBLIC), 'groupex/export-econfiance.php' @@ -39,14 +38,6 @@ class AuthModule extends PLModule ); } - function handler_login(&$page) - { - $allkeys = func_get_args(); - unset($allkeys[0]); - $url = join('/',$allkeys); - pl_redirect($url ? $url : 'events'); - } - function handler_chall(&$page) { $_SESSION["chall"] = uniqid(rand(), 1); diff --git a/modules/core.php b/modules/core.php index cbb1613..1680b47 100644 --- a/modules/core.php +++ b/modules/core.php @@ -26,7 +26,8 @@ class CoreModule extends PLModule return array( '403' => $this->make_hook('403', AUTH_PUBLIC), '404' => $this->make_hook('404', AUTH_PUBLIC), - 'send_bug' => $this->make_hook('bug', AUTH_COOKIE), + 'login' => $this->make_hook('login', AUTH_COOKIE), + 'send_bug' => $this->make_hook('bug', AUTH_COOKIE), 'purge_cache' => $this->make_hook('purge_cache', AUTH_COOKIE, 'admin'), 'get_rights' => $this->make_hook('get_rights', AUTH_MDP, 'admin'), @@ -64,6 +65,14 @@ class CoreModule extends PLModule $page->assign('near', $platal->near_hook()); } + function handler_login(&$page) + { + $allkeys = func_get_args(); + unset($allkeys[0]); + $url = join('/',$allkeys); + pl_redirect($url); + } + function handler_favicon(&$page) { $data = file_get_contents(dirname(__FILE__).'/../htdocs/images/favicon.ico'); diff --git a/modules/xnet.php b/modules/xnet.php index 3690e88..9ca7d7a 100644 --- a/modules/xnet.php +++ b/modules/xnet.php @@ -25,7 +25,6 @@ class XnetModule extends PLModule { return array( 'index' => $this->make_hook('index', AUTH_PUBLIC), - 'login' => $this->make_hook('login', AUTH_MDP), 'exit' => $this->make_hook('exit', AUTH_PUBLIC), 'admin' => $this->make_hook('admin', AUTH_MDP, 'admin'), diff --git a/templates/skin/common.database-debug.tpl b/templates/skin/common.database-debug.tpl index 5c7ff9b..67c3d83 100644 --- a/templates/skin/common.database-debug.tpl +++ b/templates/skin/common.database-debug.tpl @@ -22,9 +22,14 @@ {foreach item=query from=$trace_data} - +{if $query.explain} +{assign var=cols value=$query.explain[0]|@count} +{else} +{assign var=cols value=1} +{/if} +
- {if $query.error} - {else} - {/if} -
+ QUERY:
{$query.query}

@@ -32,36 +37,34 @@
+ ERROR:
{$query.error|nl2br}
+ INFO:
{$query.rows} enregistrement{if $query.rows > 1}s{/if} en {$query.exectime}ms
{if $query.explain} - {foreach key=key item=item from=$query.explain[0]} - + {/foreach} {foreach item=explain_row from=$query.explain} {foreach item=item from=$explain_row} - + {/foreach} {/foreach} -
{$key}{$key}
{$item}{$item}
{/if} + {/foreach} {* vim:set et sw=2 sts=2 sws=2: *} -- 2.1.4