aboutsummaryrefslogtreecommitdiffstats
path: root/mod/network.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/network.php')
-rw-r--r--mod/network.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/mod/network.php b/mod/network.php
index 04c2a1782..9fed8592e 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -328,15 +328,21 @@ function network_content(&$a, $update = 0) {
}
}
- if((! $group) && (! $cid) && (! $update))
+ if((! $group) && (! $cid) && (! $update)) {
$o .= get_birthdays();
+ $o .= get_events();
+ }
$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