jerr("access denied"); } function init($pman = flase) { // add the offices to the uiConfig. if (empty($pman->uiConfig)) { $pman->uiConfig = array(); } // scan the root directory for xx.php foreach(scandir($pman->rootDir) as $fn) { if (!is_file($pman->rootDir.'/'.$fn)) { continue; } if (!preg_match('/^[a-z]{2}\.php$/',$fn)) { continue; } $offices[] = preg_replace('/\.php$/', '', $fn); }; $pman->uiConfig['xtuple_offices'] = $offices; // add the default config.. if(!empty($pman->bootLoader->uiConfig)){ foreach ($pman->bootLoader->uiConfig as $k => $v){ $pman->uiConfig[$k] = $v; } } } }