Build the apps array so that the groups class defaults method can use it for the group permissions.

This commit is contained in:
markjcrane 2016-04-03 13:18:45 -06:00
parent f6920838c7
commit 6aea821381
1 changed files with 30 additions and 23 deletions

View File

@ -140,6 +140,13 @@ class groups {
$result = $prep_statement->fetch(PDO::FETCH_ASSOC); $result = $prep_statement->fetch(PDO::FETCH_ASSOC);
unset ($prep_statement); unset ($prep_statement);
if ($result['count'] == 0) { if ($result['count'] == 0) {
//build the apps array
$config_list = glob($_SERVER["DOCUMENT_ROOT"] . PROJECT_PATH . "/*/*/app_config.php");
$x = 0;
foreach ($config_list as &$config_path) {
include($config_path);
$x++;
}
//no permissions found add the defaults //no permissions found add the defaults
$db->beginTransaction(); $db->beginTransaction();
foreach($apps as $app) { foreach($apps as $app) {