]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/BaseSearch.php
Add support for multiple Link as urls of Images in ActivityPub\Receiver
[friendica.git] / src / Module / BaseSearch.php
index 26b3ea6060c3393bb65580cd96abab2b31c737ed..e67d3c3c93819234cb7ca0d85cea73a088426c42 100644 (file)
@@ -1,4 +1,23 @@
 <?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
 
 namespace Friendica\Module;
 
@@ -62,8 +81,15 @@ class BaseSearch extends BaseModule
                        $header = DI::l10n()->t('Forum Search - %s', $search);
                }
 
-               $args = DI::args();
-               $pager = new Pager($args->getQueryString());
+               if (DI::mode()->isMobile()) {
+                       $itemsPerPage = DI::pConfig()->get(local_user(), 'system', 'itemspage_mobile_network',
+                               DI::config()->get('system', 'itemspage_network_mobile'));
+               } else {
+                       $itemsPerPage = DI::pConfig()->get(local_user(), 'system', 'itemspage_network',
+                               DI::config()->get('system', 'itemspage_network'));
+               }
+
+               $pager = new Pager(DI::l10n(), DI::args()->getQueryString(), $itemsPerPage);
 
                if ($localSearch && empty($results)) {
                        $pager->setItemsPerPage(80);