Fix: Ajout protection si droits d'un module export mal définis

This commit is contained in:
Laurent Destailleur 2006-01-22 17:29:38 +00:00
parent 879f882a77
commit 826a7905ab

View File

@ -424,13 +424,17 @@ class User
{ {
$row = $this->db->fetch_row($result); $row = $this->db->fetch_row($result);
if (strlen($row[1]) > 0) if ($row[1])
{ {
if ($row[2])
if (strlen($row[2]) > 0) {
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; $this->rights->$row[0]->$row[1]->$row[2] = 1;
} }
}
else else
{ {
$this->rights->$row[0]->$row[1] = 1; $this->rights->$row[0]->$row[1] = 1;