]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Photo.php
Merge pull request #8155 from nupplaphil/task/move_notifications
[friendica.git] / src / Model / Photo.php
index b29ac65645739aa54e4c87be2c2460629fe0c8d0..804ae328ef4d06a5eb58889d4aea45c356266b73 100644 (file)
@@ -7,8 +7,6 @@
 namespace Friendica\Model;
 
 use Friendica\Core\Cache\Duration;
-use Friendica\Core\Config;
-use Friendica\Core\L10n;
 use Friendica\Core\Logger;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
@@ -542,7 +540,7 @@ class Photo
                $key = "photo_albums:".$uid.":".local_user().":".remote_user();
                $albums = DI::cache()->get($key);
                if (is_null($albums) || $update) {
-                       if (!Config::get("system", "no_count", false)) {
+                       if (!DI::config()->get("system", "no_count", false)) {
                                /// @todo This query needs to be renewed. It is really slow
                                // At this time we just store the data in the cache
                                $albums = q("SELECT COUNT(DISTINCT `resource-id`) AS `total`, `album`, ANY_VALUE(`created`) AS `created`
@@ -551,7 +549,7 @@ class Photo
                                        GROUP BY `album` ORDER BY `created` DESC",
                                        intval($uid),
                                        DBA::escape("Contact Photos"),
-                                       DBA::escape(L10n::t("Contact Photos"))
+                                       DBA::escape(DI::l10n()->t("Contact Photos"))
                                );
                        } else {
                                // This query doesn't do the count and is much faster
@@ -560,7 +558,7 @@ class Photo
                                        WHERE `uid` = %d  AND `album` != '%s' AND `album` != '%s' $sql_extra",
                                        intval($uid),
                                        DBA::escape("Contact Photos"),
-                                       DBA::escape(L10n::t("Contact Photos"))
+                                       DBA::escape(DI::l10n()->t("Contact Photos"))
                                );
                        }
                        DI::cache()->set($key, $albums, Duration::DAY);