Removed/replaced page menu relics
authorMarcel Werk <burntime@woltlab.com>
Wed, 6 Apr 2016 13:57:42 +0000 (15:57 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 6 Apr 2016 13:57:49 +0000 (15:57 +0200)
wcfsetup/install/files/lib/page/EditHistoryPage.class.php
wcfsetup/install/files/lib/page/SearchResultPage.class.php
wcfsetup/install/files/lib/system/edit/IHistorySavingObjectTypeProvider.class.php
wcfsetup/install/files/lib/system/search/AbstractSearchableObjectType.class.php
wcfsetup/install/files/lib/system/search/ISearchableObjectType.class.php

index db9e807e6e50063e9c12ca57d1c2b5d88508af66..f01596abdaf72995a0fa4de9320ead7daf7001fb 100644 (file)
@@ -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) {
index 8ef62db7b46b409f4a987b2d5120b4895bd70f32..a011dd56e3de4a0488de6c6975fe3f37b347a76e 100644 (file)
@@ -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
index e68423a904524733f003c8afd2ed6379e4b34771..b1bfdfef17c98116a638ef47711f6d1c7e63ce7f 100644 (file)
@@ -28,6 +28,7 @@ interface IHistorySavingObjectTypeProvider extends IObjectTypeProvider {
         * Returns the identifier of the appropriate page menu item.
         * 
         * @return      string
+        * @deprecated
         */
        public function getActivePageMenuItem();
 }
index 1f61741e962a687600f77943120b7565c5a5c4f7..1cea05c7eae05cbca25ab4cb036887bea3fcd508 100644 (file)
@@ -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 '';
        }
 }
index 3552f31723baf9cf0d18db1701824bfff6a93288..68c3b38de69f96ff58b8efaac853180017ff7cf9 100644 (file)
@@ -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();
 }