From e795d1265e9d49439e4af66184d50f6affe079c6 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 3 Jul 2011 21:30:48 -0700 Subject: [PATCH] show keywords in match results --- mod/match.php | 2 +- mod/msearch.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mod/match.php b/mod/match.php index 4316d8bd70..5dd80fe3ef 100644 --- a/mod/match.php +++ b/mod/match.php @@ -43,7 +43,7 @@ function match_content(&$a) { foreach($j->results as $jj) { $o .= '
'; - $o .= '' . '' . $jj->name . '
'; + $o .= '' . '' . $jj->name . '
'; $o .= '
'; $o .= '
' . $jj->name . '
'; $o .= '
'; diff --git a/mod/msearch.php b/mod/msearch.php index dc94962954..541fd2c7e7 100644 --- a/mod/msearch.php +++ b/mod/msearch.php @@ -16,7 +16,7 @@ function msearch_post(&$a) { if(count($r)) $total = $r[0]['total']; - $r = q("SELECT `username`, `nickname`, `user`.`uid` FROM `user` LEFT JOIN `profile` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `hidewall` = 0 AND MATCH `pub_keywords` AGAINST ('%s') LIMIT %d , %d ", + $r = q("SELECT `pub_keywords`, `username`, `nickname`, `user`.`uid` FROM `user` LEFT JOIN `profile` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `hidewall` = 0 AND MATCH `pub_keywords` AGAINST ('%s') LIMIT %d , %d ", dbesc($search), intval($startrec), intval($perpage) @@ -29,6 +29,7 @@ function msearch_post(&$a) { 'name' => $rr['name'], 'url' => $a->get_baseurl() . '/profile/' . $rr['nickname'], 'photo' => $a->get_baseurl() . '/photo/avatar/' . $rr['uid'] . 'jpg' + 'tags' => str_replace(array(',',' '),array(' ',' '),$rr['pub_keywords']); ); }