From 2bb2bb19fd1c348ee18b0de6a67b032eea326a89 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Mon, 20 May 2019 19:15:47 +0200 Subject: [PATCH] refactor method signature --- src/Core/Search.php | 4 ++-- src/Module/BaseSearchModule.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Core/Search.php b/src/Core/Search.php index d000f8283c..3a97a700d7 100644 --- a/src/Core/Search.php +++ b/src/Core/Search.php @@ -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(); diff --git a/src/Module/BaseSearchModule.php b/src/Module/BaseSearchModule.php index 3c02b6f490..bba029db54 100644 --- a/src/Module/BaseSearchModule.php +++ b/src/Module/BaseSearchModule.php @@ -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); -- 2.39.5