[Fusionforge-commits] FusionForge branch master updated. ba544321dbfb4e6680eb4c6b62ad94146b65a27c

Alain Peyrat aljeux at fusionforge.org
Wed Oct 17 13:57:35 CEST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  ba544321dbfb4e6680eb4c6b62ad94146b65a27c (commit)
      from  45ca8e05e70ddc0710c67973cbfe49f98756ccd4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ba544321dbfb4e6680eb4c6b62ad94146b65a27c
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Wed Oct 17 13:57:27 2012 +0200

    Minor search improvements

diff --git a/src/www/search/include/renderers/AdvancedSearchHtmlSearchRenderer.class.php b/src/www/search/include/renderers/AdvancedSearchHtmlSearchRenderer.class.php
index 838ec27..7b5e655 100644
--- a/src/www/search/include/renderers/AdvancedSearchHtmlSearchRenderer.class.php
+++ b/src/www/search/include/renderers/AdvancedSearchHtmlSearchRenderer.class.php
@@ -191,9 +191,9 @@ class AdvancedSearchHtmlSearchRenderer extends HtmlGroupSearchRenderer {
 			$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;
 	}
diff --git a/src/www/search/include/renderers/ForumsHtmlSearchRenderer.class.php b/src/www/search/include/renderers/ForumsHtmlSearchRenderer.class.php
index 1a44c98..8bf5384 100644
--- a/src/www/search/include/renderers/ForumsHtmlSearchRenderer.class.php
+++ b/src/www/search/include/renderers/ForumsHtmlSearchRenderer.class.php
@@ -114,7 +114,8 @@ class ForumsHtmlSearchRenderer extends HtmlGroupSearchRenderer {
 	/**
 	 * 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);
diff --git a/src/www/search/include/renderers/FullProjectHtmlSearchRenderer.class.php b/src/www/search/include/renderers/FullProjectHtmlSearchRenderer.class.php
index 33f9918..24008c3 100644
--- a/src/www/search/include/renderers/FullProjectHtmlSearchRenderer.class.php
+++ b/src/www/search/include/renderers/FullProjectHtmlSearchRenderer.class.php
@@ -75,6 +75,7 @@ class FullProjectHtmlSearchRenderer extends HtmlGroupSearchRenderer {
 	 * flush - overwrites the flush method from htmlrenderer
 	 */
 	function flush() {
+		$this->writeHeader();
 		$this->writeBody();
 		$this->writeFooter();
 	}
@@ -83,9 +84,13 @@ class FullProjectHtmlSearchRenderer extends HtmlGroupSearchRenderer {
 	 * 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();
+		}
 	}
 
 	/**
diff --git a/src/www/search/include/renderers/NewsHtmlSearchRenderer.class.php b/src/www/search/include/renderers/NewsHtmlSearchRenderer.class.php
index abfd957..8fb7f4b 100644
--- a/src/www/search/include/renderers/NewsHtmlSearchRenderer.class.php
+++ b/src/www/search/include/renderers/NewsHtmlSearchRenderer.class.php
@@ -46,7 +46,7 @@ class NewsHtmlSearchRenderer extends HtmlGroupSearchRenderer {
 
 		$this->tableHeaders = array(
 			_('Summary'),
-			_('Posted by'),
+			_('Submitted by'),
 			_('Post date'),
 		);
 	}

-----------------------------------------------------------------------

Summary of changes:
 .../renderers/AdvancedSearchHtmlSearchRenderer.class.php    |    4 ++--
 .../include/renderers/ForumsHtmlSearchRenderer.class.php    |    3 ++-
 .../renderers/FullProjectHtmlSearchRenderer.class.php       |   11 ++++++++---
 .../include/renderers/NewsHtmlSearchRenderer.class.php      |    2 +-
 4 files changed, 13 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list