diff options
author | Friendika <info@friendika.com> | 2011-09-04 19:58:03 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-09-04 19:58:03 -0700 |
commit | 82f7f33cf58774ac6b07acd64fe0b49cd5b0aa30 (patch) | |
tree | 54400fab49c5f64b917db32c60cc201f2ac6e626 /mod/network.php | |
parent | 481853d2cc44a4bf6c540e72c741ff453305a925 (diff) | |
download | volse-hubzilla-82f7f33cf58774ac6b07acd64fe0b49cd5b0aa30.tar.gz volse-hubzilla-82f7f33cf58774ac6b07acd64fe0b49cd5b0aa30.tar.bz2 volse-hubzilla-82f7f33cf58774ac6b07acd64fe0b49cd5b0aa30.zip |
bookmarks + bug #140
Diffstat (limited to 'mod/network.php')
-rw-r--r-- | mod/network.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mod/network.php b/mod/network.php index 663814ab7..1434f5d31 100644 --- a/mod/network.php +++ b/mod/network.php @@ -14,7 +14,10 @@ function network_init(&$a) { $a->page['aside'] = ''; $search = ((x($_GET,'search')) ? escape_tags($_GET['search']) : ''); - $srchurl = '/network' . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : ''); + $srchurl = '/network' + . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') + . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '') + . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : ''); if(x($_GET,'save')) { $r = q("select * from `search` where `uid` = %d and `term` = '%s' limit 1", @@ -114,6 +117,7 @@ function network_content(&$a, $update = 0) { $cid = ((x($_GET['cid'])) ? intval($_GET['cid']) : 0); $star = ((x($_GET['star'])) ? intval($_GET['star']) : 0); + $bmark = ((x($_GET['bmark'])) ? intval($_GET['bmark']) : 0); if(($a->argc > 2) && $a->argv[2] === 'new') $nouveau = true; @@ -174,6 +178,7 @@ function network_content(&$a, $update = 0) { . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') . ((x($_GET,'search')) ? '&search=' . $_GET['search'] : '') . ((x($_GET,'star')) ? '&star=' . $_GET['star'] : '') + . ((x($_GET,'bmark')) ? '&bmark=' . $_GET['bmark'] : '') . "'; var profile_page = " . $a->pager['page'] . "; </script>\r\n"; } @@ -195,6 +200,9 @@ function network_content(&$a, $update = 0) { $star_sql = (($star) ? " AND `starred` = 1 " : ''); + if($bmark) + $star_sql .= " AND `bookmark` = 1 "; + $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` $star_sql ) "; if($group) { |