kopia lustrzana https://github.com/friendica/friendica
Merge pull request #7448 from friendica/Photo-select-patch
Replace remaining Photo::select by new Photo::selectToArraypull/7449/head
commit
7f08f5be71
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Ładowanie…
Reference in New Issue