summaryrefslogtreecommitdiff
path: root/actions/groupsearch.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-04-08 22:55:13 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-04-08 22:55:13 +0000
commite5657ca4bbd8a43bf2dd44c2554e807a45224bd7 (patch)
tree3ad9a722f787e277ab571d40522cd5289da738dc /actions/groupsearch.php
parente632f3be6f48c187b8049f35756b25ae80be2f0b (diff)
parent070cd3533c3474dc065c6681befb92dac51f4bf7 (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'actions/groupsearch.php')
-rw-r--r--actions/groupsearch.php24
1 files changed, 15 insertions, 9 deletions
diff --git a/actions/groupsearch.php b/actions/groupsearch.php
index 109a53ce1..06b4a7755 100644
--- a/actions/groupsearch.php
+++ b/actions/groupsearch.php
@@ -72,12 +72,23 @@ class GroupsearchAction extends SearchAction
$terms = preg_split('/[\s,]+/', $q);
$results = new GroupSearchResults($user_group, $terms, $this);
$results->show();
+ $user_group->free();
+ $this->pagination($page > 1, $cnt > GROUPS_PER_PAGE,
+ $page, 'groupsearch', array('q' => $q));
} else {
- $this->element('p', 'error', _('No results'));
+ $this->element('p', 'error', _('No results.'));
+ $this->searchSuggestions($q);
+ if (common_logged_in()) {
+ $message = _('If you can\'t find the group you\'re looking for, you can [create it](%%action.newgroup%%) yourself.');
+ }
+ else {
+ $message = _('Why not [register an account](%%action.register%%) and [create the group](%%action.newgroup%%) yourself!');
+ }
+ $this->elementStart('div', 'guide');
+ $this->raw(common_markup_to_html($message));
+ $this->elementEnd('div');
+ $user_group->free();
}
- $user_group->free();
- $this->pagination($page > 1, $cnt > GROUPS_PER_PAGE,
- $page, 'groupsearch', array('q' => $q));
}
}
@@ -98,10 +109,5 @@ class GroupSearchResults extends GroupList
{
return preg_replace($this->pattern, '<strong>\\1</strong>', htmlspecialchars($text));
}
-
- function isReadOnly()
- {
- return true;
- }
}