From c2804c289e1ca4163ce5a92811dbe491932bd497 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 6 Apr 2016 15:57:42 +0200 Subject: [PATCH] Removed/replaced page menu relics --- .../files/lib/page/EditHistoryPage.class.php | 1 - .../files/lib/page/SearchResultPage.class.php | 4 +- ...IHistorySavingObjectTypeProvider.class.php | 1 + .../AbstractSearchableObjectType.class.php | 37 +++++++++---------- .../search/ISearchableObjectType.class.php | 6 +++ 5 files changed, 26 insertions(+), 23 deletions(-) diff --git a/wcfsetup/install/files/lib/page/EditHistoryPage.class.php b/wcfsetup/install/files/lib/page/EditHistoryPage.class.php index db9e807e6e..f01596abda 100644 --- a/wcfsetup/install/files/lib/page/EditHistoryPage.class.php +++ b/wcfsetup/install/files/lib/page/EditHistoryPage.class.php @@ -121,7 +121,6 @@ class EditHistoryPage extends AbstractPage { $this->object = $processor->getObjectByID($this->objectID); if (!$this->object->getObjectID()) throw new IllegalLinkException(); $processor->checkPermissions($this->object); - //$this->activeMenuItem = $processor->getActivePageMenuItem(); @todo $this->object->addBreadcrumbs(); if (isset($_REQUEST['newID']) && !$this->new) { diff --git a/wcfsetup/install/files/lib/page/SearchResultPage.class.php b/wcfsetup/install/files/lib/page/SearchResultPage.class.php index 8ef62db7b4..a011dd56e3 100644 --- a/wcfsetup/install/files/lib/page/SearchResultPage.class.php +++ b/wcfsetup/install/files/lib/page/SearchResultPage.class.php @@ -104,9 +104,7 @@ class SearchResultPage extends MultipleLinkPage { // set active menu item if (isset($this->searchData['selectedObjectTypes']) && count($this->searchData['selectedObjectTypes']) == 1) { $objectType = SearchEngine::getInstance()->getObjectType(reset($this->searchData['selectedObjectTypes'])); - /*if (($activeMenuItem = $objectType->getActiveMenuItem())) { @todo - PageMenu::getInstance()->setActiveMenuItem($activeMenuItem); - }*/ + $objectType->setLocation(); } // add breadcrumbs diff --git a/wcfsetup/install/files/lib/system/edit/IHistorySavingObjectTypeProvider.class.php b/wcfsetup/install/files/lib/system/edit/IHistorySavingObjectTypeProvider.class.php index e68423a904..b1bfdfef17 100644 --- a/wcfsetup/install/files/lib/system/edit/IHistorySavingObjectTypeProvider.class.php +++ b/wcfsetup/install/files/lib/system/edit/IHistorySavingObjectTypeProvider.class.php @@ -28,6 +28,7 @@ interface IHistorySavingObjectTypeProvider extends IObjectTypeProvider { * Returns the identifier of the appropriate page menu item. * * @return string + * @deprecated */ public function getActivePageMenuItem(); } diff --git a/wcfsetup/install/files/lib/system/search/AbstractSearchableObjectType.class.php b/wcfsetup/install/files/lib/system/search/AbstractSearchableObjectType.class.php index 1f61741e96..1cea05c7ea 100644 --- a/wcfsetup/install/files/lib/system/search/AbstractSearchableObjectType.class.php +++ b/wcfsetup/install/files/lib/system/search/AbstractSearchableObjectType.class.php @@ -16,18 +16,12 @@ use wcf\system\database\util\PreparedStatementConditionBuilder; */ abstract class AbstractSearchableObjectType extends AbstractObjectTypeProcessor implements ISearchableObjectType { /** - * active main menu item - * @var string - */ - protected $activeMenuItem = ''; - - /** - * @see \wcf\system\search\ISearchableObjectType::show() + * @inheritDoc */ public function show(IForm $form = null) {} /** - * @see \wcf\system\search\ISearchableObjectType::getApplication() + * @inheritDoc */ public function getApplication() { $classParts = explode('\\', get_called_class()); @@ -35,72 +29,77 @@ abstract class AbstractSearchableObjectType extends AbstractObjectTypeProcessor } /** - * @see \wcf\system\search\ISearchableObjectType::getConditions() + * @inheritDoc */ public function getConditions(IForm $form = null) { return null; } /** - * @see \wcf\system\search\ISearchableObjectType::getJoins() + * @inheritDoc */ public function getJoins() { return ''; } /** - * @see \wcf\system\search\ISearchableObjectType::getSubjectFieldName() + * @inheritDoc */ public function getSubjectFieldName() { return $this->getTableName().'.subject'; } /** - * @see \wcf\system\search\ISearchableObjectType::getUsernameFieldName() + * @inheritDoc */ public function getUsernameFieldName() { return $this->getTableName().'.username'; } /** - * @see \wcf\system\search\ISearchableObjectType::getTimeFieldName() + * @inheritDoc */ public function getTimeFieldName() { return $this->getTableName().'.time'; } /** - * @see \wcf\system\search\ISearchableObjectType::getAdditionalData() + * @inheritDoc */ public function getAdditionalData() { return null; } /** - * @see \wcf\system\search\ISearchableObjectType::isAccessible() + * @inheritDoc */ public function isAccessible() { return true; } /** - * @see \wcf\system\search\ISearchableObjectType::getFormTemplateName() + * @inheritDoc */ public function getFormTemplateName() { return ''; } /** - * @see \wcf\system\search\ISearchableObjectType::getOuterSQLQuery() + * @inheritDoc */ public function getOuterSQLQuery($q, PreparedStatementConditionBuilder &$searchIndexConditions = null, PreparedStatementConditionBuilder &$additionalConditions = null) { return ''; } /** - * @see \wcf\system\search\ISearchableObjectType::getActiveMenuItem() + * @inheritDoc + */ + public function setLocation() {} + + /** + * @inheritDoc */ public function getActiveMenuItem() { - return $this->activeMenuItem; + return ''; } } diff --git a/wcfsetup/install/files/lib/system/search/ISearchableObjectType.class.php b/wcfsetup/install/files/lib/system/search/ISearchableObjectType.class.php index 3552f31723..68c3b38de6 100644 --- a/wcfsetup/install/files/lib/system/search/ISearchableObjectType.class.php +++ b/wcfsetup/install/files/lib/system/search/ISearchableObjectType.class.php @@ -126,10 +126,16 @@ interface ISearchableObjectType { */ public function getOuterSQLQuery($q, PreparedStatementConditionBuilder &$searchIndexConditions = null, PreparedStatementConditionBuilder &$additionalConditions = null); + /** + * Sets the location in menu/breadcrumbs. + */ + public function setLocation(); + /** * Returns the name of the active main menu item. * * @return string + * @deprecated */ public function getActiveMenuItem(); } -- 2.20.1