$result .= $renderer->getRows();
$result .= $GLOBALS['HTML']->listTableBottom();
} elseif(method_exists($renderer, 'getSections') && (count($renderer->getSections($this->groupId)) == 0)) {
- $result .= '<p>'.sprintf(_('No matches found for <em>%s</em> - No sections available (check your permissions)'), $this->words).'</p>';
+ $result .= '<p>'.sprintf(_('No matches found for ā%1$sā - No sections available (check your permissions)'), $this->words).'</p>';
} else {
- $result .= '<p>'.sprintf(_('No matches found for <em>%s</em>'), $this->words).'</p>';
+ $result .= '<p>'.sprintf(_('No matches found for ā%1$sā'), $this->words).'</p>';
}
return $result;
}
/**
* getSections - get the array of possible sections to search in
*
- * @return array sections
+ * @param int $groupId
+ * @return array sections
*/
static function getSections($groupId) {
$userIsGroupMember = ForumsHtmlSearchRenderer::isGroupMember($groupId);
* flush - overwrites the flush method from htmlrenderer
*/
function flush() {
+ $this->writeHeader();
$this->writeBody();
$this->writeFooter();
}
* writeBody - write the Body of the output
*/
function writeBody() {
- $title = _('Entire project search');
- site_project_header(array('title' => $title, 'group' => $this->groupId, 'toptab' => 'home'));
- echo $this->getResult();
+ if (!$this->words) {
+ echo '<p class="error">'._('Error') . _(': ') . _('Please enter a term to search for').'</p>';
+ } elseif (!forge_get_config('use_fti') && (strlen($this->words) < 3)) {
+ echo '<p class="error">'._('Error') . _(': ') . _('Search must be at least three characters').'</p>';
+ } else {
+ echo $this->getResult();
+ }
}
/**
$this->tableHeaders = array(
_('Summary'),
- _('Posted by'),
+ _('Submitted by'),
_('Post date'),
);
}