From 37381e7c512b55bf6016419958c040317a56c10c Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sun, 8 Aug 2010 18:35:37 +0200 Subject: [PATCH] Removes warnings on login page. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- include/security.inc.php | 5 ++++- plugins/insert.getUserName.php | 2 +- templates/core/password_prompt.tpl | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/security.inc.php b/include/security.inc.php index 47b38da..2f77f82 100644 --- a/include/security.inc.php +++ b/include/security.inc.php @@ -78,7 +78,10 @@ function check_email($email, $message) function check_account() { - return S::user()->watch; + if (S::user()) { + return S::user()->watch; + } + return false; } function check_redirect($red = null) diff --git a/plugins/insert.getUserName.php b/plugins/insert.getUserName.php index 769853b..7d69ee9 100644 --- a/plugins/insert.getUserName.php +++ b/plugins/insert.getUserName.php @@ -24,7 +24,7 @@ function smarty_insert_getUsername() global $globals; $id = Cookie::i('uid', -1); - $id = S::v($_SESSION['uid'], $id); + $id = S::v('uid', $id); if ($id < 0) { return ''; diff --git a/templates/core/password_prompt.tpl b/templates/core/password_prompt.tpl index 246f4b4..a4931d8 100644 --- a/templates/core/password_prompt.tpl +++ b/templates/core/password_prompt.tpl @@ -20,7 +20,7 @@ {* *} {**************************************************************************} -{if $referer || $platal->pl_self() neq 'login'} +{if t($referer) || $platal->pl_self() neq 'login'}

Accès restreint

@@ -52,7 +52,7 @@  @  -- 2.1.4