]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Photo.php
Account for the PUBLIC value for id parameter in Depository\PermissionSet::selectOneById
[friendica.git] / src / Model / Photo.php
index 1fdd55926d6177e106dc2debbaee4b5e7626a748..d4d397b16d00d750505766d9184f2f583fe119a1 100644 (file)
@@ -45,6 +45,7 @@ use Friendica\Util\Strings;
 class Photo
 {
        const CONTACT_PHOTOS = 'Contact Photos';
+       const PROFILE_PHOTOS = 'Profile Photos';
 
        const DEFAULT        = 0;
        const USER_AVATAR    = 10;
@@ -563,25 +564,6 @@ class Photo
                        $image_url = DI::baseUrl() . "/photo/" . $resource_id . "-4." . $Image->getExt() . $suffix;
                        $thumb = DI::baseUrl() . "/photo/" . $resource_id . "-5." . $Image->getExt() . $suffix;
                        $micro = DI::baseUrl() . "/photo/" . $resource_id . "-6." . $Image->getExt() . $suffix;
-
-                       // Remove the cached photo
-                       $a = DI::app();
-                       $basepath = $a->getBasePath();
-
-                       if (is_dir($basepath . "/photo")) {
-                               $filename = $basepath . "/photo/" . $resource_id . "-4." . $Image->getExt();
-                               if (file_exists($filename)) {
-                                       unlink($filename);
-                               }
-                               $filename = $basepath . "/photo/" . $resource_id . "-5." . $Image->getExt();
-                               if (file_exists($filename)) {
-                                       unlink($filename);
-                               }
-                               $filename = $basepath . "/photo/" . $resource_id . "-6." . $Image->getExt();
-                               if (file_exists($filename)) {
-                                       unlink($filename);
-                               }
-                       }
                } else {
                        $photo_failure = true;
                }