]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Images.php
Merge pull request #8344 from MrPetovan/bug/8339-remote-follow-local-profile
[friendica.git] / src / Util / Images.php
index 7f31dd43838593e916391ef463e0c8289145a1e9..6471ed526bdbcc3e7733b4c8abf574262774bfd8 100644 (file)
@@ -1,8 +1,26 @@
 <?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\Util;
 
-use Friendica\Core\Cache;
 use Friendica\Core\Logger;
 use Friendica\Core\System;
 use Friendica\DI;
@@ -125,12 +143,12 @@ class Images
                        return $data;
                }
 
-               $data = Cache::get($url);
+               $data = DI::cache()->get($url);
 
                if (empty($data) || !is_array($data)) {
                        $data = self::getInfoFromURL($url);
 
-                       Cache::set($url, $data);
+                       DI::cache()->set($url, $data);
                }
 
                return $data;
@@ -165,7 +183,7 @@ class Images
 
                                $stamp1 = microtime(true);
                                file_put_contents($tempfile, $img_str);
-                               DI::app()->getProfiler()->saveTimestamp($stamp1, "file", System::callstack());
+                               DI::profiler()->saveTimestamp($stamp1, "file", System::callstack());
 
                                $data = getimagesize($tempfile);
                                unlink($tempfile);