/** * @see wcf\page\IPage::show() */ public function show() { // set active acp menu item if (!empty($this->activeMenuItem)) { ACPMenu::getInstance()->setActiveMenuItem($this->activeMenuItem); } parent::show(); }
/** * @see wcf\page\IPage::show() */ public function show() { // set active menu item ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.package.autoupdate'); // check master password WCFACP::checkMasterPassword(); parent::show(); }
/** * @see \wcf\system\search\acp\IACPSearchResultProvider::search() */ public function search($query) { $results = array(); // search by language item $conditions = new PreparedStatementConditionBuilder(); $conditions->add("languageID = ?", array(WCF::getLanguage()->languageID)); // filter by language item $languageItemsConditions = ''; $languageItemsParameters = array(); foreach (ACPSearchHandler::getInstance()->getAbbreviations('.acp.menu.link.%') as $abbreviation) { if (!empty($languageItemsConditions)) { $languageItemsConditions .= " OR "; } $languageItemsConditions .= "languageItem LIKE ?"; $languageItemsParameters[] = $abbreviation; } $conditions->add("(" . $languageItemsConditions . ")", $languageItemsParameters); $conditions->add("languageItemValue LIKE ?", array('%' . $query . '%')); $sql = "SELECT\t\tlanguageItem, languageItemValue\n\t\t\tFROM\t\twcf" . WCF_N . "_language_item\n\t\t\t" . $conditions . "\n\t\t\tORDER BY\tlanguageItemValue ASC"; $statement = WCF::getDB()->prepareStatement($sql); // don't use a limit here $statement->execute($conditions->getParameters()); $languageItems = array(); while ($row = $statement->fetchArray()) { $languageItems[$row['languageItem']] = $row['languageItemValue']; } if (empty($languageItems)) { return array(); } $conditions = new PreparedStatementConditionBuilder(); $conditions->add("menuItem IN (?)", array(array_keys($languageItems))); $conditions->add("menuItemController <> ''"); $sql = "SELECT\t*\n\t\t\tFROM\twcf" . WCF_N . "_acp_menu_item\n\t\t\t" . $conditions; $statement = WCF::getDB()->prepareStatement($sql); // don't use a limit here $statement->execute($conditions->getParameters()); $menuItems = ACPMenu::getInstance()->menuItemList; while ($menuItem = $statement->fetchObject('wcf\\data\\acp\\menu\\item\\ACPMenuItem')) { // only valid menu items exist in TreeMenu::$menuItemList, // so no need to call AbstractACPSearchResultProvider::validate() if (!isset($menuItems[$menuItem->menuItem])) { continue; } $parentMenuItem = $menuItem->parentMenuItem; $parentMenuItems = array(); while ($parentMenuItem && isset($menuItems[$parentMenuItem])) { array_unshift($parentMenuItems, $parentMenuItem); $parentMenuItem = $menuItems[$parentMenuItem]->parentMenuItem; } $results[] = new ACPSearchResult($languageItems[$menuItem->menuItem], $menuItem->getLink(), WCF::getLanguage()->getDynamicVariable('wcf.acp.search.result.subtitle', array('pieces' => $parentMenuItems))); } return $results; }
/** * @see wcf\page\IPage::show() */ public function show() { // use detailed view if accessing WCF ACP directly if (PACKAGE_ID == 1) { // base tag is determined on runtime $host = RouteHandler::getHost(); $path = RouteHandler::getPath(); HeaderUtil::redirect($host . $path . 'index.php/PackageListDetailed/' . SID_ARG_1ST, false); exit; } // enable menu item ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.package.list'); parent::show(); }
/** * @see wcf\form\IForm::show() */ public function show() { // set active menu item ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.user.massProcessing'); // check master password WCFACP::checkMasterPassword(); // show form parent::show(); }
/** * Sets the active menu item of the page. */ protected function setActiveMenuItem() { if (!empty($this->activeMenuItem)) { if (RequestHandler::getInstance()->isACPRequest()) { ACPMenu::getInstance()->setActiveMenuItem($this->activeMenuItem); } else { PageMenu::getInstance()->setActiveMenuItem($this->activeMenuItem); } } }
/** * @see wcf\page\IPage::show() */ public function show() { // enable menu item ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.package'); parent::show(); }
/** * @see wcf\form\IForm::show() */ public function show() { // set active menu item ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.option.category.' . $this->category->categoryName); // check permission WCF::getSession()->checkPermissions(array('admin.system.canEditOption')); if ($this->category->categoryName == 'module') { // check master password WCFACP::checkMasterPassword(); } // show form parent::show(); }
/** * @see wcf\page\IPage::show() */ public function show() { // set active menu item ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.user.' . ($this->searchID ? 'search' : 'list')); parent::show(); }
/** * @see wcf\form\IForm::show() */ public function show() { // set active menu item ACPMenu::getInstance()->setActiveMenuItem($this->menuItemName); // check master password WCFACP::checkMasterPassword(); // show form parent::show(); }
/** * @see wcf\page\IPage::show() */ public function show() { // set active menu item. ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.cronjob.list'); parent::show(); }
/** * @see wcf\form\IForm::show() */ public function show() { // set active menu item ACPMenu::getInstance()->setActiveMenuItem($this->menuItemName); // show form parent::show(); }
/** * @see wcf\page\IPage::show() */ public function show() { // set active menu item ACPMenu::getInstance()->setActiveMenuItem($this->menuItemName); // get the default language id $this->languageID = $this->getDefaultFormLanguageID(); // show form parent::show(); }
/** * Displays last confirmation before plugin installation. */ public function beginInstallation() { // get requirements $requirements = $this->getArchive()->getRequirements(); $openRequirements = $this->getArchive()->getOpenRequirements(); $updatableInstances = array(); $missingPackages = 0; foreach ($requirements as $key => $requirement) { if (isset($openRequirements[$requirement['name']])) { $requirements[$key]['status'] = 'missing'; $requirements[$key]['action'] = $openRequirements[$requirement['name']]['action']; if (!isset($requirements[$key]['file'])) { if ($openRequirements[$requirement['name']]['action'] === 'update') { $requirements[$key]['status'] = 'missingVersion'; $requirements[$key]['existingVersion'] = $openRequirements[$requirement['name']]['existingVersion']; } $missingPackages++; } else { $requirements[$key]['status'] = 'delivered'; } } else { $requirements[$key]['status'] = 'installed'; } } // get other instances if ($this->action == 'install') { $updatableInstances = $this->getArchive()->getUpdatableInstances(); } ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.package.install'); WCF::getTPL()->assign(array('archive' => $this->getArchive(), 'requiredPackages' => $requirements, 'missingPackages' => $missingPackages, 'updatableInstances' => $updatableInstances, 'excludingPackages' => $this->getArchive()->getConflictedExcludingPackages(), 'excludedPackages' => $this->getArchive()->getConflictedExcludedPackages(), 'queueID' => $this->queue->queueID)); WCF::getTPL()->display('packageInstallationConfirm'); exit; }
/** * @see \wcf\action\IAction::execute(); */ public function execute() { ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.user.search'); parent::execute(); // add email column for authorized users if (WCF::getSession()->getPermission('admin.user.canEditMailAddress')) { array_unshift($this->columns, 'email'); } switch ($this->mode) { case 'banned': $sql = "SELECT\t\tuser_table.userID\n\t\t\t\t\tFROM\t\twcf" . WCF_N . "_user user_table\n\t\t\t\t\tLEFT JOIN\twcf" . WCF_N . "_user_option_value option_value\n\t\t\t\t\tON\t\t(option_value.userID = user_table.userID)\n\t\t\t\t\tWHERE\t\tbanned = ?"; $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults); $statement->execute(array(1)); while ($row = $statement->fetchArray()) { $this->matches[] = $row['userID']; } break; case 'newest': $this->maxResults = 100; $this->sortField = 'registrationDate'; $this->sortOrder = 'DESC'; $sql = "SELECT\t\tuser_table.userID\n\t\t\t\t\tFROM\t\twcf" . WCF_N . "_user user_table\n\t\t\t\t\tLEFT JOIN\twcf" . WCF_N . "_user_option_value option_value\n\t\t\t\t\tON\t\t(option_value.userID = user_table.userID)\n\t\t\t\t\tORDER BY\tuser_table.registrationDate DESC"; $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults); $statement->execute(); while ($row = $statement->fetchArray()) { $this->matches[] = $row['userID']; } break; case 'disabled': $this->sortField = 'registrationDate'; $this->sortOrder = 'DESC'; $sql = "SELECT\t\tuser_table.userID\n\t\t\t\t\tFROM\t\twcf" . WCF_N . "_user user_table\n\t\t\t\t\tLEFT JOIN\twcf" . WCF_N . "_user_option_value option_value\n\t\t\t\t\tON\t\t(option_value.userID = user_table.userID)\n\t\t\t\t\tWHERE\t\tactivationCode <> ?\n\t\t\t\t\tORDER BY\tuser_table.registrationDate DESC"; $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults); $statement->execute(array(0)); while ($row = $statement->fetchArray()) { $this->matches[] = $row['userID']; } break; case 'disabledAvatars': $sql = "SELECT\t\tuser_table.userID\n\t\t\t\t\tFROM\t\twcf" . WCF_N . "_user user_table\n\t\t\t\t\tLEFT JOIN\twcf" . WCF_N . "_user_option_value option_value\n\t\t\t\t\tON\t\t(option_value.userID = user_table.userID)\n\t\t\t\t\tWHERE\t\tdisableAvatar = ?"; $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults); $statement->execute(array(1)); while ($row = $statement->fetchArray()) { $this->matches[] = $row['userID']; } break; case 'disabledSignatures': $sql = "SELECT\t\tuser_table.userID\n\t\t\t\t\tFROM\t\twcf" . WCF_N . "_user user_table\n\t\t\t\t\tLEFT JOIN\twcf" . WCF_N . "_user_option_value option_value\n\t\t\t\t\tON\t\t(option_value.userID = user_table.userID)\n\t\t\t\t\tWHERE\t\tdisableSignature = ?"; $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults); $statement->execute(array(1)); while ($row = $statement->fetchArray()) { $this->matches[] = $row['userID']; } break; } if (empty($this->matches)) { throw new NamedUserException(WCF::getLanguage()->get('wcf.acp.user.search.error.noMatches')); } // store search result in database $data = serialize(array('matches' => $this->matches, 'itemsPerPage' => $this->itemsPerPage, 'columns' => $this->columns)); $search = SearchEditor::create(array('userID' => WCF::getUser()->userID, 'searchData' => $data, 'searchTime' => TIME_NOW, 'searchType' => 'users')); $this->executed(); // forward to result page $url = LinkHandler::getInstance()->getLink('UserList', array('id' => $search->searchID), 'sortField=' . rawurlencode($this->sortField) . '&sortOrder=' . rawurlencode($this->sortOrder)); HeaderUtil::redirect($url); exit; }