diff --git a/authzgroups.php b/authzgroups.php index 11d0158..0b305af 100644 --- a/authzgroups.php +++ b/authzgroups.php @@ -196,10 +196,19 @@ class authzgroups if ($this->dbRight == null) throw new Exception (dgettext ("domframework", "DB for Right is not connected"), 500); - $this->dbObject->createTable (); - $this->dbGroup->createTable (); - $this->dbGroupMember->createTable (); - $this->dbRight->createTable (); + $tables = array ("Object", "Group", "GroupMember", "Right"); + foreach ($tables as $table) + { + try + { + $class= "db$table"; + $this->$class->createTable (); + } + catch (Exception $e) + { + echo $e->getMessage()."\n"; + } + } return TRUE; }