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)
|
if ($this->dbRight == null)
|
||||||
throw new Exception (dgettext ("domframework",
|
throw new Exception (dgettext ("domframework",
|
||||||
"DB for Right is not connected"), 500);
|
"DB for Right is not connected"), 500);
|
||||||
$this->dbObject->createTable ();
|
$tables = array ("Object", "Group", "GroupMember", "Right");
|
||||||
$this->dbGroup->createTable ();
|
foreach ($tables as $table)
|
||||||
$this->dbGroupMember->createTable ();
|
{
|
||||||
$this->dbRight->createTable ();
|
try
|
||||||
|
{
|
||||||
|
$class= "db$table";
|
||||||
|
$this->$class->createTable ();
|
||||||
|
}
|
||||||
|
catch (Exception $e)
|
||||||
|
{
|
||||||
|
echo $e->getMessage()."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user