]> git.mxchange.org Git - friendica.git/commitdiff
refactor method signature
authorPhilipp Holzer <admin+github@philipp.info>
Mon, 20 May 2019 17:15:47 +0000 (19:15 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Mon, 20 May 2019 17:15:47 +0000 (19:15 +0200)
src/Core/Search.php
src/Module/BaseSearchModule.php

index d000f8283c670e07a4fe3f7e35427d0a6acb513b..3a97a700d77bbde3f55d1f1af64d4bb7f84df8c9 100644 (file)
@@ -143,14 +143,14 @@ class Search extends BaseObject
         * Search in the local database for occurrences of the search string
         *
         * @param string $search
+        * @param int    $type
         * @param int    $start
         * @param int    $itemPage
-        * @param int    $type
         *
         * @return ResultList|null
         * @throws HTTPException\InternalServerErrorException
         */
-       public static function getContactsFromLocalDirectory($search, $start = 0, $itemPage = 80, $type = self::TYPE_ALL)
+       public static function getContactsFromLocalDirectory($search, $type = self::TYPE_ALL, $start = 0, $itemPage = 80)
        {
                $config = self::getApp()->getConfig();
 
index 3c02b6f4903494a0aa1b4066aacf6b15ad23b148..bba029db54cafdfb76826e55b555959bb6184216 100644 (file)
@@ -63,7 +63,7 @@ class BaseSearchModule extends BaseModule
 
                if ($localSearch && empty($results)) {
                        $pager->setItemsPerPage(80);
-                       $results = Search::getContactsFromLocalDirectory($search, $pager->getStart(), $pager->getItemsPerPage(), $type);
+                       $results = Search::getContactsFromLocalDirectory($search, $type, $pager->getStart(), $pager->getItemsPerPage());
 
                } elseif (strlen($config->get('system', 'directory')) && empty($results)) {
                        $results = Search::getContactsFromGlobalDirectory($search, $pager->getPage(), $type);