diff --git a/mod/photos.php b/mod/photos.php index 1ccfecdef..fa4d5b281 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -635,7 +635,7 @@ function photos_post(App $a) * they acquire comments, likes, dislikes, and/or tags */ - $r = Photo::select([], ['`album` = ? AND `uid` = ? AND `created` > UTC_TIMESTAMP() - INTERVAL 3 HOUR', $album, $page_owner_uid]); + $r = Photo::selectToArray([], ['`album` = ? AND `uid` = ? AND `created` > UTC_TIMESTAMP() - INTERVAL 3 HOUR', $album, $page_owner_uid]); if (!DBA::isResult($r) || ($album == L10n::t('Profile Photos'))) { $visible = 1; diff --git a/mod/profile_photo.php b/mod/profile_photo.php index a0faa40cf..97d2da349 100644 --- a/mod/profile_photo.php +++ b/mod/profile_photo.php @@ -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;