public function executePopup() { $group_manager = new GroupManager(); $acct_schema = $group_manager->getAcctSchema(); //if the group name contains spaces, replace %20 by a space $_GET['group'] = str_replace("%20", " ", $_GET['group']); //if the owner field exists in ACCT table, sort the db result by owner if (array_key_exists(OWNER, $acct_schema)) { $result = $group_manager->getDetailedStat($_GET['group'], OWNER); } else { $result = $group_manager->getDetailedStat($_GET['group'], null); } $group_status = array(); $has_status = 0; foreach ($result as $line) { if (array_key_exists(STATUS, $acct_schema)) { $has_status = 1; if (!array_key_exists(TYPE, $acct_schema) || $line[TYPE] != 'dir') { if (isset($group_status[$line[STATUS]])) { $group_status[$line[STATUS]] += $line[COUNT]; } else { $group_status[$line[STATUS]] = $line[COUNT]; } } } } $this->page->addVar('acct_schema', $acct_schema); $this->page->addVar('result', $result); if ($has_status) { $this->page->addVar('group_status', $group_status); } }