/** * getClientList * * @param mixed[] &$list * string $list[]['dirname'] * string $list[]['dataname'] * string $list[]['access_controller'] * * @return void */ public static function getClientList(&$list) { //don't call this method multiple times when site owner duplicate. static $isCalled = false; if ($isCalled === true) { return; } //get dirname list of this module $dirnames = Legacy_Utils::getDirnameListByTrustDirname(basename(dirname(dirname(dirname(__FILE__))))); foreach ($dirnames as $dir) { //setup client module info $list[] = array('dirname' => $dir, 'dataname' => 'forums', 'access_controller' => Xcforum_Utils::getModuleConfig($dir, 'access_controller')); $list[] = array('dirname' => $dir, 'dataname' => 'topics', 'access_controller' => Xcforum_Utils::getModuleConfig($dir, 'access_controller')); $list[] = array('dirname' => $dir, 'dataname' => 'posts', 'access_controller' => Xcforum_Utils::getModuleConfig($dir, 'access_controller')); $list[] = array('dirname' => $dir, 'dataname' => 'users2topics', 'access_controller' => Xcforum_Utils::getModuleConfig($dir, 'access_controller')); } $isCalled = true; }
/** * getClientList * * @param mixed[] &$list * @list[]['dirname'] * @list[]['dataname'] * @list[]['fieldname'] * @param string $gDirname Legacy_Group module's dirname * * @return void */ public static function getClientList(&$list, $gDirname) { //don't call this method multiple times when site owner duplicate this module. static $isCalled = false; if ($isCalled === true) { return; } //get dirname list of xcforum $dirnames = Legacy_Utils::getDirnameListByTrustDirname(basename(dirname(dirname(dirname(__FILE__))))); foreach ($dirnames as $dir) { //setup client module info if (Xcforum_Utils::getModuleConfig($dir, 'access_controller') == $gDirname) { $list[] = array('dirname' => $dir, 'dataname' => '{tablename}', 'fieldname' => 'category_id'); } } $isCalled = true; }