diff options
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Chanview.php | 12 | ||||
-rw-r--r-- | Zotlabs/Module/Item.php | 7 | ||||
-rw-r--r-- | Zotlabs/Module/Sse_bs.php | 15 |
3 files changed, 20 insertions, 14 deletions
diff --git a/Zotlabs/Module/Chanview.php b/Zotlabs/Module/Chanview.php index afeb2aacf..fc1146023 100644 --- a/Zotlabs/Module/Chanview.php +++ b/Zotlabs/Module/Chanview.php @@ -17,19 +17,19 @@ class Chanview extends \Zotlabs\Web\Controller { $r = null; if($_REQUEST['hash']) { - $r = q("select * from xchan where xchan_hash = '%s'", + $r = q("select * from xchan where xchan_hash = '%s' and xchan_deleted = 0", dbesc($_REQUEST['hash']) ); } if($_REQUEST['address']) { - $r = q("select * from xchan where xchan_addr = '%s'", + $r = q("select * from xchan where xchan_addr = '%s' and xchan_deleted = 0", dbesc(punify($_REQUEST['address'])) ); } elseif(local_channel() && intval($_REQUEST['cid'])) { $r = q("SELECT abook.*, xchan.* FROM abook left join xchan on abook_xchan = xchan_hash - WHERE abook_channel = %d and abook_id = %d", + WHERE abook_channel = %d and abook_id = %d and xchan_deleted = 0", intval(local_channel()), intval($_REQUEST['cid']) ); @@ -39,7 +39,7 @@ class Chanview extends \Zotlabs\Web\Controller { // if somebody re-installed they will have more than one xchan, use the most recent name date as this is // the most useful consistently ascending table item we have. - $r = q("select * from xchan where xchan_url = '%s' order by xchan_name_date desc", + $r = q("select * from xchan where xchan_url = '%s' and xchan_deleted = 0 order by xchan_name_date desc", dbesc($_REQUEST['url']) ); } @@ -71,7 +71,7 @@ class Chanview extends \Zotlabs\Web\Controller { if(array_path_exists('signature/signer',$zf) && $zf['signature']['signer'] === $_REQUEST['url'] && intval($zf['signature']['header_valid'])) { Libzot::import_xchan($zf['data']); - $r = q("select * from xchan where xchan_url = '%s'", + $r = q("select * from xchan where xchan_url = '%s' and xchan_deleted = 0", dbesc($_REQUEST['url']) ); if($r) { @@ -80,7 +80,7 @@ class Chanview extends \Zotlabs\Web\Controller { } if(! $r) { if(discover_by_webbie($_REQUEST['url'])) { - $r = q("select * from xchan where xchan_url = '%s'", + $r = q("select * from xchan where xchan_url = '%s' and xchan_deleted = 0", dbesc($_REQUEST['url']) ); if($r) { diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php index 518352667..0e76755a8 100644 --- a/Zotlabs/Module/Item.php +++ b/Zotlabs/Module/Item.php @@ -280,16 +280,17 @@ class Item extends Controller { if(argc() > 1 && argv(1) !== 'drop') { - $x = q("select uid, item_wall, llink, mid from item where mid = '%s' or mid = '%s' ", + $x = q("select uid, item_wall, llink, mid from item where mid = '%s' or mid = '%s' or uuid = '%s'", dbesc(z_root() . '/item/' . argv(1)), - dbesc(z_root() . '/activity/' . argv(1)) + dbesc(z_root() . '/activity/' . argv(1)), + dbesc(argv(1)) ); if($x) { foreach($x as $xv) { if (intval($xv['item_wall'])) { $c = channelx_by_n($xv['uid']); if ($c) { - goaway($c['xchan_url'] . '?mid=' . gen_link_id($xv['mid'])); + goaway(z_root() . '/channel/' . $c['channel_address'] . '?mid=' . gen_link_id($xv['mid'])); } } } diff --git a/Zotlabs/Module/Sse_bs.php b/Zotlabs/Module/Sse_bs.php index ca86f4f1f..388a9ba4d 100644 --- a/Zotlabs/Module/Sse_bs.php +++ b/Zotlabs/Module/Sse_bs.php @@ -55,8 +55,13 @@ class Sse_bs extends Controller { self::$xchans = ids_to_querystr($x, 'xchan_hash', true); } - if(intval(argv(2)) > 0) + if(intval(argv(2)) > 0) { self::$offset = argv(2); + } + else { + $_SESSION['sse_loadtime'] = datetime_convert(); + } + $network = false; $dm = false; @@ -176,7 +181,7 @@ class Sse_bs extends Controller { $sql_extra2 ORDER BY created DESC LIMIT $limit OFFSET $offset", intval(self::$uid), - dbescdate($_SESSION['page_loadtime']), + dbescdate($_SESSION['sse_loadtime']), dbesc(self::$ob_hash) ); @@ -252,7 +257,7 @@ class Sse_bs extends Controller { $sql_extra2 ORDER BY created DESC LIMIT $limit OFFSET $offset", intval(self::$uid), - dbescdate($_SESSION['page_loadtime']), + dbescdate($_SESSION['sse_loadtime']), dbesc(self::$ob_hash) ); @@ -328,7 +333,7 @@ class Sse_bs extends Controller { $sql_extra2 ORDER BY created DESC LIMIT $limit OFFSET $offset", intval(self::$uid), - dbescdate($_SESSION['page_loadtime']), + dbescdate($_SESSION['sse_loadtime']), dbesc(self::$ob_hash) ); @@ -415,7 +420,7 @@ class Sse_bs extends Controller { $sql_extra2 ORDER BY created DESC LIMIT $limit OFFSET $offset", intval($sys['channel_id']), - dbescdate($_SESSION['page_loadtime']), + dbescdate($_SESSION['sse_loadtime']), dbesc(self::$ob_hash), dbescdate($_SESSION['static_loadtime']) ); |