mirror of
https://github.com/friendica/friendica
synced 2024-12-23 03:20:15 +00:00
Fix: Show photos in high resolution
This commit is contained in:
parent
0b312ae9b3
commit
592665ed28
1 changed files with 6 additions and 4 deletions
|
@ -1090,7 +1090,7 @@ function photos_content(App $a)
|
||||||
// Display one photo
|
// Display one photo
|
||||||
if ($datatype === 'image') {
|
if ($datatype === 'image') {
|
||||||
// fetch image, item containing image, then comments
|
// fetch image, item containing image, then comments
|
||||||
$ph = Photo::selectToArray([], ["`uid` = ? AND `resource-id` = ? " . $sql_extra, $owner_uid, $datum], ['order' => ['scale' => true]]);
|
$ph = Photo::selectToArray([], ["`uid` = ? AND `resource-id` = ? " . $sql_extra, $owner_uid, $datum], ['order' => ['scale']]);
|
||||||
|
|
||||||
if (!DBA::isResult($ph)) {
|
if (!DBA::isResult($ph)) {
|
||||||
if (DBA::exists('photo', ['resource-id' => $datum, 'uid' => $owner_uid])) {
|
if (DBA::exists('photo', ['resource-id' => $datum, 'uid' => $owner_uid])) {
|
||||||
|
@ -1129,12 +1129,14 @@ function photos_content(App $a)
|
||||||
$order_field = $_GET['order'] ?? '';
|
$order_field = $_GET['order'] ?? '';
|
||||||
|
|
||||||
if ($order_field === 'posted') {
|
if ($order_field === 'posted') {
|
||||||
$order = 'ASC';
|
$params = ['order' => [$order_field]];
|
||||||
|
} elseif (!empty($order_field)) {
|
||||||
|
$params = ['order' => [$order_field => true]];
|
||||||
} else {
|
} else {
|
||||||
$order = 'DESC';
|
$params = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$prvnxt = Photo::selectToArray(['resource-id'], ["`album` = ? AND `uid` = ? AND `scale` = ?" . $sql_extra, $ph[0]['album'], $owner_uid, 0]);
|
$prvnxt = Photo::selectToArray(['resource-id'], ["`album` = ? AND `uid` = ? AND `scale` = ?" . $sql_extra, $ph[0]['album'], $owner_uid, 0], $params);
|
||||||
|
|
||||||
if (DBA::isResult($prvnxt)) {
|
if (DBA::isResult($prvnxt)) {
|
||||||
$prv = null;
|
$prv = null;
|
||||||
|
|
Loading…
Reference in a new issue