+++ /dev/null
-<?php
-namespace wcf\acp\form;
-use wcf\form\AbstractForm;
-use wcf\system\menu\acp\ACPMenu;
-
-/**
- * Provides a default implementation for the show method in acp forms.
- *
- * @author Marcel Werk
- * @copyright 2001-2012 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage acp.form
- * @category Community Framework
- */
-class ACPForm extends AbstractForm {
- /**
- * active acp menu item
- * @var string
- */
- public $activeMenuItem = '';
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // set active acp menu item
- if (!empty($this->activeMenuItem)) {
- ACPMenu::getInstance()->setActiveMenuItem($this->activeMenuItem);
- }
-
- parent::show();
- }
-}
use wcf\data\application\ApplicationAction;
use wcf\data\application\ViewableApplication;
use wcf\system\application\ApplicationHandler;
+use wcf\form\AbstractForm;
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\UserInputException;
use wcf\system\Regex;
* @subpackage acp.form
* @category Community Framework
*/
-class ApplicationEditForm extends ACPForm {
+class ApplicationEditForm extends AbstractForm {
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
public $activeMenuItem = 'wcf.acp.menu.link.application';
namespace wcf\acp\form;
use wcf\data\cronjob\CronjobAction;
use wcf\data\cronjob\CronjobEditor;
+use wcf\form\AbstractForm;
use wcf\system\exception\SystemException;
use wcf\system\exception\UserInputException;
use wcf\system\language\I18nHandler;
* @subpackage acp.form
* @category Community Framework
*/
-class CronjobAddForm extends ACPForm {
+class CronjobAddForm extends AbstractForm {
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
public $activeMenuItem = 'wcf.acp.menu.link.cronjob.add';
namespace wcf\acp\form;
use wcf\data\cronjob\Cronjob;
use wcf\data\cronjob\CronjobAction;
+use wcf\form\AbstractForm;
use wcf\system\exception\IllegalLinkException;
use wcf\system\language\I18nHandler;
use wcf\system\WCF;
*/
class CronjobEditForm extends CronjobAddForm {
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
public $activeMenuItem = 'wcf.acp.menu.link.cronjob';
* @see wcf\form\IForm::save()
*/
public function save() {
- ACPForm::save();
+ AbstractForm::save();
$this->description = 'wcf.acp.cronjob.description.cronjob'.$this->cronjob->cronjobID;
if (I18nHandler::getInstance()->isPlainValue('description')) {
<?php
namespace wcf\acp\form;
+use wcf\form\AbstractForm;
use wcf\system\exception\UserInputException;
use wcf\system\request\LinkHandler;
use wcf\system\WCF;
* @subpackage acp.form
* @category Community Framework
*/
-class MasterPasswordForm extends ACPForm {
+class MasterPasswordForm extends AbstractForm {
/**
* master password
* @var string
<?php
namespace wcf\acp\form;
+use wcf\form\AbstractForm;
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\UserInputException;
use wcf\system\io\File;
* @see wcf\form\IForm::validate()
*/
public function validate() {
- ACPForm::validate();
+ AbstractForm::validate();
if (empty($this->masterPassword)) {
throw new UserInputException('masterPassword');
<?php
namespace wcf\acp\form;
use wcf\data\option\OptionAction;
+use wcf\form\AbstractForm;
use wcf\system\exception\SystemException;
use wcf\system\exception\UserInputException;
use wcf\system\WCF;
* @subpackage acp.form
* @category Community Framework
*/
-class OptionImportForm extends ACPForm {
+class OptionImportForm extends AbstractForm {
/**
- * @see wcf\page\AbstractPage::$neededPermissions
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
- public $neededPermissions = array('admin.system.canEditOption');
+ public $activeMenuItem = 'wcf.acp.menu.link.option.importAndExport';
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$neededPermissions
*/
- public $activeMenuItem = 'wcf.acp.menu.link.option.importAndExport';
+ public $neededPermissions = array('admin.system.canEditOption');
/**
* upload file data
use wcf\data\package\installation\queue\PackageInstallationQueue;
use wcf\data\package\installation\queue\PackageInstallationQueueEditor;
use wcf\data\package\Package;
+use wcf\form\AbstractForm;
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\SystemException;
use wcf\system\exception\UserInputException;
use wcf\system\package\PackageArchive;
use wcf\system\package\PackageInstallationDispatcher;
-use wcf\system\request\LinkHandler;
use wcf\system\WCF;
use wcf\system\WCFACP;
use wcf\util\FileUtil;
-use wcf\util\HeaderUtil;
use wcf\util\StringUtil;
/**
* @subpackage acp.form
* @category Community Framework
*/
-class PackageStartInstallForm extends ACPForm {
+class PackageStartInstallForm extends AbstractForm {
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
public $activeMenuItem = 'wcf.acp.menu.link.package.install';
namespace wcf\acp\form;
use wcf\data\package\update\server\PackageUpdateServer;
use wcf\data\package\update\server\PackageUpdateServerEditor;
+use wcf\form\AbstractForm;
use wcf\system\exception\IllegalLinkException;
use wcf\system\package\PackageUpdateAuthorizationRequiredException;
use wcf\system\request\RequestHandler;
* @subpackage acp.form
* @category Community Framework
*/
-class PackageUpdateAuthForm extends ACPForm {
+class PackageUpdateAuthForm extends AbstractForm {
/**
- * @see wcf\page\AbstractPage::$neededPermissions
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
- public $neededPermissions = array('admin.system.package.canUpdatePackage', 'admin.system.package.canInstallPackage');
+ public $activeMenuItem = 'wcf.acp.menu.link.package';
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$neededPermissions
*/
- public $activeMenuItem = 'wcf.acp.menu.link.package';
+ public $neededPermissions = array('admin.system.package.canUpdatePackage', 'admin.system.package.canInstallPackage');
/**
* exception that has been thrown if an authorization for the package update
<?php
namespace wcf\acp\form;
+use wcf\form\AbstractForm;
use wcf\system\package\PackageInstallationDispatcher;
-
use wcf\system\exception\SystemException;
use wcf\system\exception\UserInputException;
use wcf\system\package\PackageUpdateDispatcher;
-use wcf\system\request\LinkHandler;
use wcf\system\WCF;
use wcf\system\WCFACP;
-use wcf\util\HeaderUtil;
/**
* Shows the package update confirmation form.
* @subpackage acp.form
* @category Community Framework
*/
-class PackageUpdateForm extends ACPForm {
+class PackageUpdateForm extends AbstractForm {
/**
- * @see wcf\page\AbstractPage::$neededPermissions
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
- public $neededPermissions = array('admin.system.package.canUpdatePackage', 'admin.system.package.canInstallPackage');
+ public $activeMenuItem = 'wcf.acp.menu.link.package';
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$neededPermissions
*/
- public $activeMenuItem = 'wcf.acp.menu.link.package';
+ public $neededPermissions = array('admin.system.package.canUpdatePackage', 'admin.system.package.canInstallPackage');
/**
* list of packages to update
namespace wcf\acp\form;
use wcf\data\package\update\server\PackageUpdateServer;
use wcf\data\search\SearchEditor;
+use wcf\form\AbstractForm;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\UserInputException;
use wcf\system\package\PackageUpdateDispatcher;
* @subpackage acp.form
* @category Community Framework
*/
-class PackageUpdateSearchForm extends ACPForm {
+class PackageUpdateSearchForm extends AbstractForm {
/**
- * @see wcf\page\AbstractPage::$neededPermissions
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
- public $neededPermissions = array('admin.system.package.canUpdatePackage', 'admin.system.package.canInstallPackage');
+ public $activeMenuItem = 'wcf.acp.menu.link.package.database';
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$neededPermissions
*/
- public $activeMenuItem = 'wcf.acp.menu.link.package.database';
+ public $neededPermissions = array('admin.system.package.canUpdatePackage', 'admin.system.package.canInstallPackage');
/**
* list of package update server ids which are searched
use wcf\data\page\menu\item\PageMenuItemAction;
use wcf\data\page\menu\item\PageMenuItemEditor;
use wcf\data\page\menu\item\PageMenuItemList;
+use wcf\form\AbstractForm;
use wcf\system\exception\UserInputException;
use wcf\system\language\I18nHandler;
use wcf\system\WCF;
* @subpackage acp.form
* @category Community Framework
*/
-class PageMenuItemAddForm extends ACPForm {
+class PageMenuItemAddForm extends AbstractForm {
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
public $activeMenuItem = 'wcf.acp.menu.link.pageMenu.add';
namespace wcf\acp\form;
use wcf\data\page\menu\item\PageMenuItem;
use wcf\data\page\menu\item\PageMenuItemAction;
+use wcf\form\AbstractForm;
use wcf\system\exception\IllegalLinkException;
use wcf\system\language\I18nHandler;
use wcf\system\WCF;
*/
class PageMenuItemEditForm extends PageMenuItemAddForm {
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
public $activeMenuItem = 'wcf.acp.menu.link.pageMenu';
* @see wcf\form\IForm::save()
*/
public function save() {
- ACPForm::save();
+ AbstractForm::save();
// save menu item
I18nHandler::getInstance()->save('pageMenuItem', $this->menuItem->menuItem, 'wcf.page');
namespace wcf\acp\form;
use wcf\data\package\update\server\PackageUpdateServer;
use wcf\data\package\update\server\PackageUpdateServerAction;
+use wcf\form\AbstractForm;
use wcf\system\exception\UserInputException;
use wcf\system\WCF;
use wcf\system\WCFACP;
* @subpackage acp.form
* @category Community Framework
*/
-class UpdateServerAddForm extends ACPForm {
+class UpdateServerAddForm extends AbstractForm {
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
public $activeMenuItem = 'wcf.acp.menu.link.package.server.add';
*/
class UpdateServerEditForm extends UpdateServerAddForm {
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
public $activeMenuItem = 'wcf.acp.menu.link.package.server';
namespace wcf\acp\form;
use wcf\data\user\group\UserGroup;
use wcf\data\user\UserEditor;
+use wcf\form\AbstractForm;
use wcf\system\clipboard\ClipboardHandler;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\IllegalLinkException;
* @subpackage acp.form
* @category Community Framework
*/
-class UserAssignToGroupForm extends ACPForm {
+class UserAssignToGroupForm extends AbstractForm {
/**
* @see wcf\page\AbstractPage::$neededPermissions
*/
public $neededPermissions = array('admin.user.canEditUser');
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
public $activeMenuItem = 'wcf.acp.menu.link.user.management';
<?php
namespace wcf\acp\form;
+use wcf\form\AbstractForm;
use wcf\system\clipboard\ClipboardHandler;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\IllegalLinkException;
* @subpackage acp.form
* @category Community Framework
*/
-class UserEmailAddressExportForm extends ACPForm {
+class UserEmailAddressExportForm extends AbstractForm {
/**
* @see wcf\page\AbstractPage::$activeMenuItem
*/
use wcf\data\user\group\option\UserGroupOptionAction;
use wcf\data\user\group\UserGroup;
use wcf\data\DatabaseObject;
+use wcf\form\AbstractForm;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\PermissionDeniedException;
* @subpackage acp.form
* @category Community Framework
*/
-class UserGroupOptionForm extends ACPForm {
+class UserGroupOptionForm extends AbstractForm {
/**
- * @see wcf\acp\form\ACPForm::$activeMenuItem
+ * @see wcf\page\AbstractPage::$activeMenuItem
*/
public $activeMenuItem = 'wcf.acp.menu.link.group';
namespace wcf\acp\form;
use wcf\data\user\group\UserGroup;
use wcf\data\user\UserList;
+use wcf\form\AbstractForm;
use wcf\system\clipboard\ClipboardHandler;
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\SystemException;
* @subpackage acp.form
* @category Community Framework
*/
-class UserMailForm extends ACPForm {
+class UserMailForm extends AbstractForm {
/**
* enable html for message body
* @var boolean
<?php
namespace wcf\acp\page;
use wcf\page\SortablePage;
-use wcf\system\menu\acp\ACPMenu;
/**
* Shows a list of log sessions.
* @category Community Framework
*/
class ACPSessionLogListPage extends SortablePage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.log.session';
+
/**
* @see wcf\page\AbstractPage::$templateName
*/
parent::readObjects();
}
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // enable menu item
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.log.session');
-
- parent::show();
- }
}
use wcf\data\acp\session\log\ACPSessionLog;
use wcf\page\SortablePage;
use wcf\system\exception\IllegalLinkException;
-use wcf\system\menu\acp\ACPMenu;
use wcf\system\WCF;
/**
* @category Community Framework
*/
class ACPSessionLogPage extends SortablePage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.log.session';
+
/**
* @see wcf\page\AbstractPage::$templateName
*/
'sessionLog' => $this->sessionLog
));
}
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // enable menu item
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.log.session');
-
- parent::show();
- }
}
namespace wcf\acp\page;
use wcf\data\application\ViewableApplicationList;
use wcf\page\AbstractPage;
-use wcf\system\menu\acp\ACPMenu;
use wcf\system\WCF;
/**
* @category Community Framework
*/
class ApplicationManagementPage extends AbstractPage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.application.management';
+
/**
* list of applications
* @var wcf\data\application\ViewableApplicationList
'applicationList' => $this->applicationList
));
}
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // enable menu item
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.application.management');
-
- parent::show();
- }
}
<?php
namespace wcf\acp\page;
-use wcf\system\menu\acp\ACPMenu;
use wcf\page\AbstractPage;
-use wcf\system\cache\source\MemcacheAdapter;
use wcf\system\cache\CacheHandler;
use wcf\system\exception\SystemException;
use wcf\system\Regex;
* @category Community Framework
*/
class CacheListPage extends AbstractPage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.application.cache';
+
/**
* @see wcf\page\AbstractPage::$neededPermissions
*/
'cleared' => $this->cleared
));
}
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // enable menu item
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.application.cache');
-
- parent::show();
- }
}
<?php
namespace wcf\acp\page;
use wcf\page\SortablePage;
-use wcf\system\menu\acp\ACPMenu;
/**
* Shows information about configured cron jobs.
* @category Community Framework
*/
class CronjobListPage extends SortablePage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.cronjob.list';
+
/**
* @see wcf\page\AbstractPage::$neededPermissions
*/
$this->sqlOrderBy = "cronjob.".$this->sortField." ".$this->sortOrder;
}
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // set active menu item.
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.cronjob.list');
-
- parent::show();
- }
}
<?php
namespace wcf\acp\page;
use wcf\page\SortablePage;
-use wcf\system\menu\acp\ACPMenu;
/**
* Shows cronjob log information.
* @category Community Framework
*/
class CronjobLogListPage extends SortablePage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.log.cronjob';
+
/**
* @see wcf\page\AbstractPage::$neededPermissions
*/
parent::readObjects();
}
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // set active menu item.
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.log.cronjob');
-
- parent::show();
- }
}
use wcf\system\language\LanguageFactory;
use wcf\system\package\PackageInstallationDispatcher;
use wcf\system\WCF;
-use wcf\system\WCFACP;
/**
* Shows the welcome page in admin control panel.
<?php
namespace wcf\acp\page;
use wcf\page\AbstractPage;
-use wcf\system\menu\acp\ACPMenu;
use wcf\system\package\PackageUpdateDispatcher;
use wcf\system\WCF;
use wcf\system\WCFACP;
* @category Community Framework
*/
class PackageAutoUpdateListPage extends AbstractPage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.package.autoupdate';
+
/**
* @see wcf\page\AbstractPage::$neededPermissions
*/
* @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();
use wcf\data\package\installation\queue\PackageInstallationQueue;
use wcf\page\AbstractPage;
use wcf\system\exception\IllegalLinkException;
-use wcf\system\menu\acp\ACPMenu;
use wcf\system\package\PackageInstallationDispatcher;
use wcf\system\WCF;
use wcf\system\WCFACP;
* @category Community Framework
*/
class PackageInstallationConfirmPage extends AbstractPage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.package.install';
+
/**
* number of missing packages
* @var integer
* @see wcf\page\IPage::show()
*/
public function show() {
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.package.install');
-
// check master password
WCFACP::checkMasterPassword();
<?php
namespace wcf\acp\page;
use wcf\page\SortablePage;
-use wcf\system\menu\acp\ACPMenu;
/**
* Shows a list of all installed packages.
* @category Community Framework
*/
class PackageListDetailedPage extends SortablePage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.package.list';
+
/**
* @see wcf\page\AbstractPage::$neededPermissions
*/
parent::readObjects();
}
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // enable menu item
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.package.list');
-
- parent::show();
- }
}
use wcf\data\package\Package;
use wcf\data\package\PackageList;
use wcf\page\AbstractPage;
-use wcf\system\menu\acp\ACPMenu;
use wcf\system\request\RouteHandler;
use wcf\system\WCF;
use wcf\util\HeaderUtil;
* @category Community Framework
*/
class PackageListPage extends AbstractPage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.package.list';
+
/**
* list of applications
* @var wcf\data\package\PackageList
exit;
}
- // enable menu item
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.package.list');
-
parent::show();
}
}
use wcf\data\package\Package;
use wcf\page\AbstractPage;
use wcf\system\exception\IllegalLinkException;
-use wcf\system\menu\acp\ACPMenu;
use wcf\system\WCF;
/**
* @category Community Framework
*/
class PackagePage extends AbstractPage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.package';
+
/**
* @see wcf\page\AbstractPage::$neededPermissions
*/
WCF::getTPL()->assign('package', $this->package);
}
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // enable menu item
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.package');
-
- parent::show();
- }
}
use wcf\page\SortablePage;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\IllegalLinkException;
-use wcf\system\menu\acp\ACPMenu;
use wcf\system\WCF;
/**
* @category Community Framework
*/
class PackageUpdateSearchResultPage extends SortablePage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.package.database';
+
/**
* @see wcf\page\AbstractPage::$neededPermissions
*/
'selectedPackages' => array()
));
}
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // set active menu item
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.package.database');
-
- parent::show();
- }
}
use wcf\data\page\menu\item\PageMenuItemList;
use wcf\data\page\menu\item\ViewablePageMenuItem;
use wcf\page\AbstractPage;
-use wcf\system\menu\acp\ACPMenu;
use wcf\system\WCF;
/**
* @category Community Framework
*/
class PageMenuItemListPage extends AbstractPage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.pageMenu.list';
+
/**
* list of footer page menu items
* @var array<wcf\data\page\menu\item\PageMenuItem>
'headerItems' => $this->headerItems
));
}
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // set active menu item.
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.pageMenu.list');
-
- parent::show();
- }
}
<?php
namespace wcf\acp\page;
use wcf\page\SortablePage;
-use wcf\system\menu\acp\ACPMenu;
use wcf\system\WCF;
/**
* @category Community Framework
*/
class UpdateServerListPage extends SortablePage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.package.server.list';
+
/**
* @see wcf\page\AbstractPage::$neededPermissions
*/
'deletedPackageUpdateServerID' => $this->deletedPackageUpdateServerID
));
}
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // enable menu item
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.package.server.list');
-
- parent::show();
- }
}
<?php
namespace wcf\acp\page;
use wcf\page\SortablePage;
-use wcf\system\menu\acp\ACPMenu;
use wcf\system\WCF;
/**
* @category Community Framework
*/
class UserGroupListPage extends SortablePage {
+ /**
+ * @see wcf\page\AbstractPage::$activeMenuItem
+ */
+ public $activeMenuItem = 'wcf.acp.menu.link.group.list';
+
/**
* @see wcf\page\AbstractPage::$neededPermissions
*/
'deletedGroups' => $this->deletedGroups
));
}
-
- /**
- * @see wcf\page\IPage::show()
- */
- public function show() {
- // enable menu item
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.group.list');
-
- parent::show();
- }
}
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\event\EventHandler;
use wcf\system\exception\IllegalLinkException;
-use wcf\system\menu\acp\ACPMenu;
use wcf\system\request\LinkHandler;
use wcf\system\WCF;
use wcf\util\DateUtil;
* @see wcf\page\IPage::show()
*/
public function show() {
- // set active menu item
- ACPMenu::getInstance()->setActiveMenuItem('wcf.acp.menu.link.user.'.($this->searchID ? 'search' : 'list'));
+ $this->activeMenuItem = 'wcf.acp.menu.link.user.'.($this->searchID ? 'search' : 'list');
parent::show();
}
use wcf\system\event\EventHandler;
use wcf\system\exception\IllegalLinkException;
use wcf\system\exception\PermissionDeniedException;
+use wcf\system\menu\acp\ACPMenu;
+use wcf\system\menu\page\PageMenu;
+use wcf\system\request\RequestHandler;
use wcf\system\WCF;
/**
- * This class provides default implementations for the Page interface.
- * This includes the call of the default event listeners for a page: readParameters, readData, assignVariables and show.
+ * Abstract implementation of a page which fires the default event actions of a
+ * page:
+ * - readParameters
+ * - readData
+ * - assignVariables
+ * - show
*
* @author Marcel Werk
* @copyright 2001-2012 WoltLab GmbH
*/
public $useTemplate = true;
+ /**
+ * name of the active menu item
+ * @var string
+ */
+ public $activeMenuItem = '';
+
/**
* value of the given action parameter
* @var string
throw new PermissionDeniedException();
}
+ // sets the active menu item
+ $this->setActiveMenuItem();
+
// check modules
$this->checkModules();
}
}
+ /**
+ * 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\ITrackablePage::isTracked()
*/