New: Les permissions disponibles sont mise a niveau à l'entrée de la page des permissions.
This commit is contained in:
parent
ece7e365e9
commit
e93b6fc04c
@ -60,6 +60,8 @@ print '<table class="noborder" width="100%">';
|
|||||||
|
|
||||||
|
|
||||||
// Charge les modules soumis a permissions
|
// Charge les modules soumis a permissions
|
||||||
|
$db->begin();
|
||||||
|
|
||||||
$dir = DOL_DOCUMENT_ROOT . "/includes/modules/";
|
$dir = DOL_DOCUMENT_ROOT . "/includes/modules/";
|
||||||
$handle=opendir($dir);
|
$handle=opendir($dir);
|
||||||
$modules = array();
|
$modules = array();
|
||||||
@ -74,6 +76,9 @@ while (($file = readdir($handle))!==false)
|
|||||||
include_once("../includes/modules/$file");
|
include_once("../includes/modules/$file");
|
||||||
$objMod = new $modName($db);
|
$objMod = new $modName($db);
|
||||||
if ($objMod->rights_class) {
|
if ($objMod->rights_class) {
|
||||||
|
|
||||||
|
$ret=$objMod->insert_permissions();
|
||||||
|
|
||||||
$modules[$objMod->rights_class]=$objMod;
|
$modules[$objMod->rights_class]=$objMod;
|
||||||
//print "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
|
// Affiche lignes des permissions
|
||||||
$sql ="SELECT r.id, r.libelle, r.module, r.bydefault";
|
$sql ="SELECT r.id, r.libelle, r.module, r.bydefault";
|
||||||
$sql.=" FROM ".MAIN_DB_PREFIX."rights_def as r";
|
$sql.=" FROM ".MAIN_DB_PREFIX."rights_def as r";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user