From: Raphaël Barrois Date: Tue, 26 Oct 2010 22:18:24 +0000 (+0200) Subject: Improve fixes on admin/logger page; remove smarty warnings. X-Git-Tag: xorg/1.0.2~186 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=c8ab90e7934e9621b4c84b37e047855b9cab72d2;p=platal.git Improve fixes on admin/logger page; remove smarty warnings. Signed-off-by: Raphaël Barrois --- diff --git a/modules/admin.php b/modules/admin.php index 85b28dd..567895a 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -313,10 +313,15 @@ class AdminModule extends PLModule $page->append('events', $myarr); } - } else if ($action != null || Env::has('logger')) { + } else { $loguser = $action == 'user' ? $arg : Env::v('loguser'); - $user = User::get($loguser); - $loguid = $user->id(); + + if ($loguser) { + $user = User::get($loguser); + $loguid = $user->id(); + } else { + $loguid = null; + } if ($loguid) { $year = Env::i('year'); @@ -381,7 +386,7 @@ class AdminModule extends PLModule } $page->assign_by_ref('sessions', $sessions); } else { - $page->assign('msg_nofilters', "Sélectionner une annuée et/ou un utilisateur"); + $page->assign('msg_nofilters', "Sélectionner une année et/ou un utilisateur"); } } diff --git a/templates/admin/logger-view.tpl b/templates/admin/logger-view.tpl index b488379..7dd7ff8 100644 --- a/templates/admin/logger-view.tpl +++ b/templates/admin/logger-view.tpl @@ -22,7 +22,7 @@

Parcours des logs du site

-{if $events} +{if t($events)} @@ -127,7 +127,7 @@ {/foreach} -{if $msg_nofilters} +{if t($msg_nofilters)}
{$msg_nofilters}