aboutsummaryrefslogtreecommitdiffstats
path: root/mod/network.php
diff options
context:
space:
mode:
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