* 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();
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);