Merge pull request #7448 from friendica/Photo-select-patch
Replace remaining Photo::select by new Photo::selectToArray
This commit is contained in:
commit
7f08f5be71
|
@ -635,7 +635,7 @@ function photos_post(App $a)
|
||||||
* they acquire comments, likes, dislikes, and/or tags
|
* 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'))) {
|
if (!DBA::isResult($r) || ($album == L10n::t('Profile Photos'))) {
|
||||||
$visible = 1;
|
$visible = 1;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue