From 53bbfb44b16cebfd047964ef0f80db0a446a9c55 Mon Sep 17 00:00:00 2001 From: Carlos Ferreira Date: Wed, 25 Jul 2018 23:21:35 +0200 Subject: [PATCH] Update Search.php --- protected/humhub/modules/search/engine/Search.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/protected/humhub/modules/search/engine/Search.php b/protected/humhub/modules/search/engine/Search.php index a4a7d65166..43ff9d0659 100644 --- a/protected/humhub/modules/search/engine/Search.php +++ b/protected/humhub/modules/search/engine/Search.php @@ -153,11 +153,13 @@ abstract class Search extends Component protected function setDefaultFindOptions($options) { - if (!isset($options['page']) || $options['page'] == '') + if (!isset($options['page']) || $options['page'] == '') { $options['page'] = 1; + } - if (!isset($options['pageSize']) || $options['pageSize'] == '') + if (!isset($options['pageSize']) || $options['pageSize'] == '') { $options['pageSize'] = Yii::$app->settings->get('paginationSize'); + } if (!isset($options['checkPermissions'])) { $options['checkPermissions'] = true; @@ -181,6 +183,7 @@ abstract class Search extends Component { $additionalAttributes = []; $this->trigger(self::EVENT_SEARCH_ATTRIBUTES, new SearchAttributesEvent($additionalAttributes, $object)); + return $additionalAttributes; }