aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Hq.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-11-21 10:19:50 +0100
committerMario Vavti <mario@mariovavti.com>2017-11-21 10:19:50 +0100
commit159d6469fd45818dd24137894ce1792531753417 (patch)
treed6ccad9ad937f95b8b99aeb6e28a7a75aa460259 /Zotlabs/Module/Hq.php
parent0325efeb350f575f70f18e9f199ad273e5ba1d15 (diff)
downloadvolse-hubzilla-159d6469fd45818dd24137894ce1792531753417.tar.gz
volse-hubzilla-159d6469fd45818dd24137894ce1792531753417.tar.bz2
volse-hubzilla-159d6469fd45818dd24137894ce1792531753417.zip
make browser history buttons work with ajax calls in /display and /hq
Diffstat (limited to 'Zotlabs/Module/Hq.php')
-rw-r--r--Zotlabs/Module/Hq.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php
index 92dfc8587..71008b6d2 100644
--- a/Zotlabs/Module/Hq.php
+++ b/Zotlabs/Module/Hq.php
@@ -47,19 +47,24 @@ class Hq extends \Zotlabs\Web\Controller {
$r = q("SELECT mid FROM item
WHERE uid = %d
AND mid = parent_mid
- $item_normal
ORDER BY created DESC
limit 1",
local_channel()
);
- $item_hash = 'b64.' . base64url_encode($r[0]['mid']);
- if(!$item_hash) {
+ if(!$r[0]['mid']) {
\App::$error = 404;
notice( t('Item not found.') . EOL);
return;
}
+
+ $item_hash = 'b64.' . base64url_encode($r[0]['mid']);
}
+
+ if(strpos($item_hash,'b64.') === 0)
+ $decoded = @base64url_decode(substr($item_hash,4));
+ if($decoded)
+ $item_hash = $decoded;
$updateable = false;
@@ -101,11 +106,6 @@ class Hq extends \Zotlabs\Web\Controller {
$target_item = null;
- if(strpos($item_hash,'b64.') === 0)
- $decoded = @base64url_decode(substr($item_hash,4));
- if($decoded)
- $item_hash = $decoded;
-
$r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted, item_blocked from item where mid like '%s' limit 1",
dbesc($item_hash . '%')
);