aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-22 12:41:16 -0700
committerzotlabs <mike@macgirvin.com>2017-03-22 12:41:16 -0700
commit24b55bbc9ba157f5f3b22c49b36ee9cced10b0e2 (patch)
treec6a48b75ef2f46870bc02405aa9224704464dd32 /Zotlabs
parent65ecc5ae15757b41bda8e0aed23a17d5e258cdc7 (diff)
downloadvolse-hubzilla-24b55bbc9ba157f5f3b22c49b36ee9cced10b0e2.tar.gz
volse-hubzilla-24b55bbc9ba157f5f3b22c49b36ee9cced10b0e2.tar.bz2
volse-hubzilla-24b55bbc9ba157f5f3b22c49b36ee9cced10b0e2.zip
fix photo prvnxt after all the changes yesterday
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Photos.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php
index a0e230ac8..f423440ed 100644
--- a/Zotlabs/Module/Photos.php
+++ b/Zotlabs/Module/Photos.php
@@ -773,7 +773,7 @@ class Photos extends \Zotlabs\Web\Controller {
$o .= replace_macros($tpl, array(
'$photos' => $photos,
'$album' => $album,
- '$album_id' => $datum),
+ '$album_id' => $datum,
'$album_edit' => array(t('Edit Album'), $album_edit),
'$can_post' => $can_post,
'$upload' => array(t('Upload'), z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/upload/' . $datum),
@@ -840,17 +840,16 @@ class Photos extends \Zotlabs\Web\Controller {
else
$order = 'DESC';
-
$prvnxt = q("SELECT hash FROM attach WHERE folder = '%s' AND uid = %d AND is_photo = 1
$sql_attach ORDER BY created $order ",
dbesc($x[0]['folder']),
intval($owner_uid)
);
-
+
if(count($prvnxt)) {
for($z = 0; $z < count($prvnxt); $z++) {
- if($prvnxt[$z]['hash'] == $ph[0]['hash']) {
+ if($prvnxt[$z]['hash'] == $ph[0]['resource_id']) {
$prv = $z - 1;
$nxt = $z + 1;
if($prv < 0)
@@ -861,8 +860,8 @@ class Photos extends \Zotlabs\Web\Controller {
}
}
- $prevlink = z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/image/' . $prvnxt[$prv]['resource_id'] . (($_GET['order'] === 'posted') ? '?f=&order=posted' : '');
- $nextlink = z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/image/' . $prvnxt[$nxt]['resource_id'] . (($_GET['order'] === 'posted') ? '?f=&order=posted' : '');
+ $prevlink = z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/image/' . $prvnxt[$prv]['hash'] . (($_GET['order'] === 'posted') ? '?f=&order=posted' : '');
+ $nextlink = z_root() . '/photos/' . \App::$data['channel']['channel_address'] . '/image/' . $prvnxt[$nxt]['hash'] . (($_GET['order'] === 'posted') ? '?f=&order=posted' : '');
}