diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-10-07 16:40:43 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-10-07 16:40:43 +0200 |
commit | 71c206fdb9d8ccdd0b65feb49db93a58ea51e0e6 (patch) | |
tree | 6e653fc2153b2b7bdb4d1add24e1dae19f05bf64 /Zotlabs/Module/Pubstream.php | |
parent | 4c0e8a61aecc5c90d532016dc42f13ab07646335 (diff) | |
download | volse-hubzilla-71c206fdb9d8ccdd0b65feb49db93a58ea51e0e6.tar.gz volse-hubzilla-71c206fdb9d8ccdd0b65feb49db93a58ea51e0e6.tar.bz2 volse-hubzilla-71c206fdb9d8ccdd0b65feb49db93a58ea51e0e6.zip |
pubstream single view fixes
Diffstat (limited to 'Zotlabs/Module/Pubstream.php')
-rw-r--r-- | Zotlabs/Module/Pubstream.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php index 4583f912b..15e2d8a74 100644 --- a/Zotlabs/Module/Pubstream.php +++ b/Zotlabs/Module/Pubstream.php @@ -22,13 +22,18 @@ class Pubstream extends \Zotlabs\Web\Controller { $mid = ((x($_REQUEST,'mid')) ? $_REQUEST['mid'] : ''); + if(strpos($mid,'b64.') === 0) + $decoded = @base64url_decode(substr($mid,4)); + if($decoded) + $mid = $decoded; + $item_normal = item_normal(); $item_normal_update = item_normal_update(); $static = ((array_key_exists('static',$_REQUEST)) ? intval($_REQUEST['static']) : 0); - if(! $update) { + if(! $update && !$load) { nav_set_selected(t('Public Stream')); @@ -46,6 +51,10 @@ class Pubstream extends \Zotlabs\Web\Controller { . "; var profile_page = " . \App::$pager['page'] . "; divmore_height = " . intval($maxheight) . "; </script>\r\n"; + //if we got a decoded hash we must encode it again before handing to javascript + if($decoded) + $mid = 'b64.' . base64url_encode($mid); + \App::$page['htmlhead'] .= replace_macros(get_markup_template("build_query.tpl"),array( '$baseurl' => z_root(), '$pgtype' => 'pubstream', @@ -127,7 +136,7 @@ class Pubstream extends \Zotlabs\Web\Controller { left join abook on item.author_xchan = abook.abook_xchan WHERE mid like '%s' $uids $item_normal and (abook.abook_blocked = 0 or abook.abook_flags is null) - $sql_extra3 $sql_extra $sql_nets", + $sql_extra3 $sql_extra $sql_nets LIMIT 1", dbesc($mid . '%') ); } @@ -149,7 +158,7 @@ class Pubstream extends \Zotlabs\Web\Controller { left join abook on item.author_xchan = abook.abook_xchan WHERE mid like '%s' $uids $item_normal_update $simple_update and (abook.abook_blocked = 0 or abook.abook_flags is null) - $sql_extra3 $sql_extra $sql_nets", + $sql_extra3 $sql_extra $sql_nets LIMIT 1", dbesc($mid . '%') ); } @@ -193,6 +202,9 @@ class Pubstream extends \Zotlabs\Web\Controller { $mode = ('network'); $o .= conversation($items,$mode,$update,$page_mode); + + if($mid) + $o .= '<div id="content-complete"></div>'; if(($items) && (! $update)) $o .= alt_pager($a,count($items)); |