]> git.mxchange.org Git - friendica.git/blobdiff - mod/profile_photo.php
Discover directory type
[friendica.git] / mod / profile_photo.php
index a0faa40cf588134fdd8ba1db6e3e88bad1f05b66..97d2da349c88bd72955596f3cf4cabd4fae6b0b7 100644 (file)
@@ -192,14 +192,7 @@ function profile_photo_content(App $a)
                $resource_id = $a->argv[2];
                //die(":".local_user());
 
-               $r = Photo::select([], ["resource-id" => $resource_id, "uid" => local_user()], ["order" => ["scale"=>false]]);
-
-               /*
-               $r = q("SELECT * FROM `photo` WHERE `uid` = %d AND `resource-id` = '%s' ORDER BY `scale` ASC", intval(local_user()),
-                       DBA::escape($resource_id)
-               );
-               */
-
+               $r = Photo::selectToArray([], ["resource-id" => $resource_id, "uid" => local_user()], ["order" => ["scale" => false]]);
                if (!DBA::isResult($r)) {
                        notice(L10n::t('Permission denied.') . EOL);
                        return;