aboutsummaryrefslogtreecommitdiffstats
path: root/mod/network.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-12-15 14:37:31 -0800
committerfriendica <info@friendica.com>2014-12-15 14:37:31 -0800
commitf28103d595c0e02dfd30d44b3115915994e9ecc0 (patch)
treeb5076f4f5440738033d8d009799ff1d394250dbe /mod/network.php
parent1780ba5e7d1571d82a6428c4907d6a264217c778 (diff)
downloadvolse-hubzilla-f28103d595c0e02dfd30d44b3115915994e9ecc0.tar.gz
volse-hubzilla-f28103d595c0e02dfd30d44b3115915994e9ecc0.tar.bz2
volse-hubzilla-f28103d595c0e02dfd30d44b3115915994e9ecc0.zip
wall tags
Diffstat (limited to 'mod/network.php')
-rw-r--r--mod/network.php40
1 files changed, 25 insertions, 15 deletions
diff --git a/mod/network.php b/mod/network.php
index 522622f03..d444dbd59 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -34,6 +34,21 @@ function network_content(&$a, $update = 0, $load = false) {
$channel = $a->get_channel();
+
+ $datequery = $datequery2 = '';
+
+ $group = 0;
+
+ $nouveau = false;
+
+ $datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
+ $datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : '');
+ $nouveau = ((x($_GET,'new')) ? intval($_GET['new']) : 0);
+ $gid = ((x($_GET,'gid')) ? intval($_GET['gid']) : 0);
+ $category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
+ $hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
+
+
$search = (($_GET['search']) ? $_GET['search'] : '');
if($search) {
if(strpos($search,'@') === 0) {
@@ -47,23 +62,11 @@ function network_content(&$a, $update = 0, $load = false) {
}
}
elseif(strpos($search,'#') === 0) {
- $search = $_GET['search'] = substr($search,1);
+ $hashtags = substr($search,1);
+ $search = $_GET['search'] = '';
}
}
-
- $datequery = $datequery2 = '';
-
- $group = 0;
-
- $nouveau = false;
-
- $datequery = ((x($_GET,'dend') && is_a_date_arg($_GET['dend'])) ? notags($_GET['dend']) : '');
- $datequery2 = ((x($_GET,'dbegin') && is_a_date_arg($_GET['dbegin'])) ? notags($_GET['dbegin']) : '');
- $nouveau = ((x($_GET,'new')) ? intval($_GET['new']) : 0);
- $gid = ((x($_GET,'gid')) ? intval($_GET['gid']) : 0);
-
-
if($datequery)
$_GET['order'] = 'post';
@@ -199,6 +202,12 @@ function network_content(&$a, $update = 0, $load = false) {
}
}
+ if(x($category)) {
+ $sql_extra .= protect_sprintf(term_query('item', $category, TERM_CATEGORY));
+ }
+ if(x($hashtags)) {
+ $sql_extra .= protect_sprintf(term_query('item', $hashtags, TERM_HASHTAG));
+ }
if(! $update) {
// The special div is needed for liveUpdate to kick in for this page.
@@ -238,7 +247,8 @@ function network_content(&$a, $update = 0, $load = false) {
'$search' => (($search) ? $search : ''),
'$order' => $order,
'$file' => $file,
- '$cats' => '',
+ '$cats' => $category,
+ '$tags' => $hashtags,
'$dend' => $datequery,
'$mid' => '',
'$dbegin' => $datequery2