From 826a7905ab905fd92245f97539ba9b619996572a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 22 Jan 2006 17:29:38 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Ajout=20protection=20si=20droits=20d'un?= =?UTF-8?q?=20module=20export=20mal=20d=E9finis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/user.class.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/user.class.php b/htdocs/user.class.php index 9cdb74e5b49..a04550351a8 100644 --- a/htdocs/user.class.php +++ b/htdocs/user.class.php @@ -424,12 +424,16 @@ class User { $row = $this->db->fetch_row($result); - if (strlen($row[1]) > 0) + if ($row[1]) { - - if (strlen($row[2]) > 0) + if ($row[2]) { - $this->rights->$row[0]->$row[1]->$row[2] = 1; + if (! $this->rights->$row[0] || + (is_object($this->rights->$row[0]) && ! $this->rights->$row[0]->$row[1]) || + (is_object($this->rights->$row[0]->$row[1])) ) + { + $this->rights->$row[0]->$row[1]->$row[2] = 1; + } } else {