]> git.mxchange.org Git - friendica.git/blobdiff - include/photos.php
Merge remote-tracking branch 'upstream/3.5.1rc' into 1702-detect-server
[friendica.git] / include / photos.php
index 7cdd14bf6d3e586894748de06292c933f7173058..9d8d3309c2bb49d0abce8e5e8a68e653021d5bc0 100644 (file)
@@ -49,7 +49,7 @@ function photo_albums($uid, $update = false) {
                        /// @todo This query needs to be renewed. It is really slow
                        // At this time we just store the data in the cache
                        $albums = qu("SELECT COUNT(DISTINCT `resource-id`) AS `total`, `album`
-                               FROM `photo` USE INDEX (`uid_album_created`)
+                               FROM `photo`
                                WHERE `uid` = %d  AND `album` != '%s' AND `album` != '%s' $sql_extra
                                GROUP BY `album` ORDER BY `created` DESC",
                                intval($uid),
@@ -59,7 +59,7 @@ function photo_albums($uid, $update = false) {
                } else {
                        // This query doesn't do the count and is much faster
                        $albums = qu("SELECT DISTINCT(`album`), '' AS `total`
-                               FROM `photo` USE INDEX (`uid_album_created`)
+                               FROM `photo`
                                WHERE `uid` = %d  AND `album` != '%s' AND `album` != '%s' $sql_extra
                                GROUP BY `album` ORDER BY `created` DESC",
                                intval($uid),