diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index 3fc25bef079..f55ec328143 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -60,6 +60,8 @@ print ''; // Charge les modules soumis a permissions +$db->begin(); + $dir = DOL_DOCUMENT_ROOT . "/includes/modules/"; $handle=opendir($dir); $modules = array(); @@ -74,6 +76,9 @@ while (($file = readdir($handle))!==false) include_once("../includes/modules/$file"); $objMod = new $modName($db); if ($objMod->rights_class) { + + $ret=$objMod->insert_permissions(); + $modules[$objMod->rights_class]=$objMod; //print "modules[".$objMod->rights_class."]=$objMod;"; } @@ -81,6 +86,9 @@ while (($file = readdir($handle))!==false) } } +$db->commit(); + + // Affiche lignes des permissions $sql ="SELECT r.id, r.libelle, r.module, r.bydefault"; $sql.=" FROM ".MAIN_DB_PREFIX."rights_def as r";