]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Photo.php
Merge pull request #8230 from AlfredSK/AlfredSK-statistics-query
[friendica.git] / src / Model / Photo.php
index 60d7f1e43e396d6754e7aa0d3d8e6424463e5dfd..ccb0f2add4e972ecee1a89c1df2ae71b43c99c8d 100644 (file)
@@ -1,13 +1,27 @@
 <?php
-
 /**
- * @file src/Model/Photo.php
- * This file contains the Photo class for database interface
+ * @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\Model;
 
 use Friendica\Core\Cache\Duration;
-use Friendica\Core\Config;
 use Friendica\Core\Logger;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
@@ -541,7 +555,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`