[BUGFIX] Remove bad PHP code in LiveSearch 59/45259/2
authorMarkus Klein <markus.klein@typo3.org>
Tue, 15 Dec 2015 00:41:24 +0000 (01:41 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 15 Dec 2015 09:15:53 +0000 (10:15 +0100)
Remove a left-over code from the LiveSearch migration to autocomplete
which causes a PHP warning.
The removed code and its results is never used in JS.

Resolves: #72226
Releases: master
Change-Id: Ia27c5cd7e863c4d6c0ca89ed8ca3f78a47ed2bfb
Reviewed-on: https://review.typo3.org/45259
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/backend/Classes/Controller/LiveSearchController.php
typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php

index 39ac932..1fe5f11 100644 (file)
@@ -47,7 +47,6 @@ class LiveSearchController
         $liveSearch->setQueryString($queryString);
         // Jump & edit - find page and retrieve an edit link (this is only for pages
         if ($queryParser->isValidPageJump($queryString)) {
-            $searchResults[] = array_merge($liveSearch->findPage($queryString), ['type' => 'pageJump']);
             $commandQuery = $queryParser->getCommandForPageJump($queryString);
             if ($commandQuery) {
                 $queryString = $commandQuery;
index 7ac4c61..4aa7cd2 100644 (file)
@@ -84,23 +84,6 @@ class LiveSearch
      * Find records from database based on the given $searchQuery.
      *
      * @param string $searchQuery
-     * @return string Edit link to an page record if exists. Otherwise an empty string will returned
-     */
-    public function findPage($searchQuery)
-    {
-        $link = '';
-        $pageId = $this->queryParser->getId($searchQuery);
-        $pageRecord = $this->findPageById($pageId);
-        if (!empty($pageRecord)) {
-            $link = $this->getEditLink(self::PAGE_JUMP_TABLE, $this->findPageById($pageId));
-        }
-        return $link;
-    }
-
-    /**
-     * Find records from database based on the given $searchQuery.
-     *
-     * @param string $searchQuery
      * @return array Result list of database search.
      */
     public function find($searchQuery)