Replace removed Photo::select by new Photo::selectToArray in /profile_photo

This commit is contained in:
Hypolite Petovan 2019-07-29 13:37:54 -04:00 committed by GitHub
parent 70ba9e5e0c
commit cfd2e7f686
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,14 +192,7 @@ function profile_photo_content(App $a)
$resource_id = $a->argv[2]; $resource_id = $a->argv[2];
//die(":".local_user()); //die(":".local_user());
$r = Photo::select([], ["resource-id" => $resource_id, "uid" => local_user()], ["order" => ["scale"=>false]]); $r = Photo::selectToArray([], ["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)
);
*/
if (!DBA::isResult($r)) { if (!DBA::isResult($r)) {
notice(L10n::t('Permission denied.') . EOL); notice(L10n::t('Permission denied.') . EOL);
return; return;