aboutsummaryrefslogtreecommitdiffstats
path: root/mod/network.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-24 04:17:46 -0700
committerFriendika <info@friendika.com>2011-10-24 04:17:46 -0700
commitf48fd5aa1651cdc801473e9d24c1736304533e63 (patch)
treefafca7b9ace612d39e3ce4267fddaeb7164cd430 /mod/network.php
parent87aedacec77025c8d1474d26b364be6ba58e1192 (diff)
downloadvolse-hubzilla-f48fd5aa1651cdc801473e9d24c1736304533e63.tar.gz
volse-hubzilla-f48fd5aa1651cdc801473e9d24c1736304533e63.tar.bz2
volse-hubzilla-f48fd5aa1651cdc801473e9d24c1736304533e63.zip
more tagging
Diffstat (limited to 'mod/network.php')
-rw-r--r--mod/network.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/mod/network.php b/mod/network.php
index 04c2a1782..491603f35 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -333,10 +333,14 @@ function network_content(&$a, $update = 0) {
$sql_extra2 = (($nouveau) ? '' : " AND `item`.`parent` = `item`.`id` ");
- if(x($_GET,'search'))
- $sql_extra .= " AND `item`.`body` REGEXP '" . dbesc(escape_tags($_GET['search'])) . "' ";
+ if(x($_GET,'search')) {
+ $search = escape_tags($_GET['search']);
+ $sql_extra .= sprintf(" AND ( `item`.`body` REGEXP '%s' OR `item`.`tag` REGEXP '%s' ) ",
+ dbesc($search),
+ dbesc('\\]' . $search . '\\[')
+ );
+ }
-
$r = q("SELECT COUNT(*) AS `total`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0