]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Widget/SavedSearches.php
Merge remote-tracking branch 'upstream/2023.09-rc' into channel-improvements
[friendica.git] / src / Content / Widget / SavedSearches.php
index bf0e798661a44698a4c88c53e3f95556bf265c1c..79d66936d04c8a5cef940896f6c5ac4885ea2273 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -34,10 +34,10 @@ class SavedSearches
         * @return string
         * @throws \Exception
         */
-       public static function getHTML($return_url, $search = '')
+       public static function getHTML(string $return_url, string $search = ''): string
        {
                $saved = [];
-               $saved_searches = DBA::select('search', ['id', 'term'], ['uid' => local_user()]);
+               $saved_searches = DBA::select('search', ['id', 'term'], ['uid' => DI::userSession()->getLocalUserId()], ['order' => ['term']]);
                while ($saved_search = DBA::fetch($saved_searches)) {
                        $saved[] = [
                                'id'          => $saved_search['id'],