authzgroups : Better work in table creation (don't hang on first error when creating multiple times the tables)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1825 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user