refactor method signature

This commit is contained in:
Philipp Holzer 2019-05-20 19:15:47 +02:00
parent 059b813090
commit 2bb2bb19fd
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
2 changed files with 3 additions and 3 deletions

View file

@ -143,14 +143,14 @@ class Search extends BaseObject
* Search in the local database for occurrences of the search string * Search in the local database for occurrences of the search string
* *
* @param string $search * @param string $search
* @param int $type
* @param int $start * @param int $start
* @param int $itemPage * @param int $itemPage
* @param int $type
* *
* @return ResultList|null * @return ResultList|null
* @throws HTTPException\InternalServerErrorException * @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(); $config = self::getApp()->getConfig();

View file

@ -63,7 +63,7 @@ class BaseSearchModule extends BaseModule
if ($localSearch && empty($results)) { if ($localSearch && empty($results)) {
$pager->setItemsPerPage(80); $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)) { } elseif (strlen($config->get('system', 'directory')) && empty($results)) {
$results = Search::getContactsFromGlobalDirectory($search, $pager->getPage(), $type); $results = Search::getContactsFromGlobalDirectory($search, $pager->getPage(), $type);