aboutsummaryrefslogtreecommitdiffstats
path: root/mod/search.php
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2011-01-20 08:17:41 +0100
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2011-01-20 08:17:41 +0100
commita8b9b219158e8565af615b852c587787ad58a0a3 (patch)
tree2476b3b0aa892b2711943a500e1869d15b29d607 /mod/search.php
parentb43ec25955de2a2e18cd1d65023341abdcd5b519 (diff)
parent2ffe0d0b1d9589b6b37d8ade0114caef31339001 (diff)
downloadvolse-hubzilla-a8b9b219158e8565af615b852c587787ad58a0a3.tar.gz
volse-hubzilla-a8b9b219158e8565af615b852c587787ad58a0a3.tar.bz2
volse-hubzilla-a8b9b219158e8565af615b852c587787ad58a0a3.zip
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'mod/search.php')
-rw-r--r--mod/search.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/mod/search.php b/mod/search.php
index 20113e75b..a6a4b613f 100644
--- a/mod/search.php
+++ b/mod/search.php
@@ -81,6 +81,7 @@ function search_content(&$a) {
foreach($r as $item) {
+ $total = 0;
$comment = '';
$owner_url = '';
$owner_photo = '';
@@ -91,6 +92,8 @@ function search_content(&$a) {
&& ($item['id'] != $item['parent']))
continue;
+ $total ++;
+
$profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']);
$profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']);
$profile_link = ((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
@@ -130,6 +133,13 @@ function search_content(&$a) {
}
}
+
+ if(! $r[0]['total']) {
+ notice('No results.');
+ return $o;
+ }
+
+
$o .= paginate($a);
return $o;