[Fusionforge-commits] FusionForge branch master updated. v6.0.3-283-g29a9700

Franck Villaume nerville at libremir.placard.fr.eu.org
Sun Dec 13 18:43:28 CET 2015


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  29a970043dcae8003751c94429a46dd14cf94ff6 (commit)
       via  0d16be0b99d539861771b685c0f0d0c5433d2c49 (commit)
       via  374776d31a538c346d28b547b26dfacbd3fb788d (commit)
       via  b68a90e04ab0791bf2b95c2d5ed1ee4a254140f1 (commit)
      from  494dfd019055239e446c43deb41f1ed73a022599 (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=29a970043dcae8003751c94429a46dd14cf94ff6

commit 29a970043dcae8003751c94429a46dd14cf94ff6
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 13 18:43:06 2015 +0100

    docman search engine: display path rather than folder name only

diff --git a/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php b/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
index 14cc3ec..bac0c26 100644
--- a/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
+++ b/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
@@ -81,7 +81,7 @@ class DocsHtmlSearchRenderer extends HtmlGroupSearchRenderer {
 			$currentDocGroup = documentgroup_get_object($document->getDocGroupID());
 			//section changed
 			if ($lastDocGroupID != $currentDocGroup->getID()) {
-				$return .= '<tr><td colspan="4">'.html_image('ic/folder.png', 22, 22, array('border' => '0')).util_make_link('/docman/?group_id='.$document->Group->getID().'&view=listfile&dirid='.$document->getDocGroupID(),$currentDocGroup->getName()).'</td></tr>';
+				$return .= '<tr><td colspan="4">'.html_image('ic/folder.png', 22, 22, array('border' => '0')).$currentDocGroup->getPath(true).'</td></tr>';
 				$lastDocGroupID = $currentDocGroup->getID();
 				$rowColor = 0;
 			}

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=0d16be0b99d539861771b685c0f0d0c5433d2c49

commit 0d16be0b99d539861771b685c0f0d0c5433d2c49
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 13 18:36:18 2015 +0100

    docman: fix update function. missing localDg object

diff --git a/src/common/docman/Document.class.php b/src/common/docman/Document.class.php
index 76277cd..ee3f00c 100644
--- a/src/common/docman/Document.class.php
+++ b/src/common/docman/Document.class.php
@@ -826,6 +826,7 @@ class Document extends Error {
 			return false;
 		}
 
+		$localDg = new DocumentGroup($this->Group, $doc_group);
 		if (!$localDg->update($localDg->getName(), $localDg->getParentID(), 1)) {
 			$this->setOnUpdateError(_('Error updating document group')._(': ').$localDg->getErrorMessage());
 			db_rollback();

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=374776d31a538c346d28b547b26dfacbd3fb788d

commit 374776d31a538c346d28b547b26dfacbd3fb788d
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 13 18:21:51 2015 +0100

    docman search engine: use object to avoid error on name

diff --git a/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php b/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
index 7c1303d..14cc3ec 100644
--- a/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
+++ b/src/www/search/include/renderers/DocsHtmlSearchRenderer.class.php
@@ -73,27 +73,26 @@ class DocsHtmlSearchRenderer extends HtmlGroupSearchRenderer {
 
 		$return = '';
 
-		$lastDocGroup = null;
+		$lastDocGroupID = null;
 
 		$rowColor = 0;
 		for($i = 0; $i < $rowsCount; $i++) {
+			$document = document_get_object(db_result($result, $i, 'docid'));
+			$currentDocGroup = documentgroup_get_object($document->getDocGroupID());
 			//section changed
-			$currentDocGroup = db_result($result, $i, 'groupname');
-			$groupObject = group_get_object($this->groupId);
-			$document = new Document($groupObject, db_result($result, $i, 'docid'));
-			if ($lastDocGroup != $currentDocGroup) {
-				$return .= '<tr><td colspan="4">'.html_image('ic/folder.png', 22, 22, array('border' => '0')).util_make_link('/docman/?group_id='.$document->Group->getID().'&view=listfile&dirid='.$document->getDocGroupID(),$currentDocGroup).'</td></tr>';
-				$lastDocGroup = $currentDocGroup;
+			if ($lastDocGroupID != $currentDocGroup->getID()) {
+				$return .= '<tr><td colspan="4">'.html_image('ic/folder.png', 22, 22, array('border' => '0')).util_make_link('/docman/?group_id='.$document->Group->getID().'&view=listfile&dirid='.$document->getDocGroupID(),$currentDocGroup->getName()).'</td></tr>';
+				$lastDocGroupID = $currentDocGroup->getID();
 				$rowColor = 0;
 			}
 			$cells = array();
 			$cells[][] = ' ';
 			$cells[][] = util_make_link('/docman/view.php/'.$document->Group->getID().'/'.$document->getID().'/'.urlencode($document->getFileName()), html_image($document->getFileTypeImage(), 22, 22));
-			$cells[][] = db_result($result, $i, 'title');
-			$cells[][] = db_result($result, $i, 'description');
+			$cells[][] = $document->getName();
+			$cells[][] = $document->getDescription();
 			if (forge_check_perm('docman', $document->Group->getID(), 'approve')) {
 				if (!$document->getLocked() && !$document->getReserved()) {
-					$cells[][] = util_make_link('/docman/?group_id='.$document->Group->getID().'&view=listfile&dirid='.$document->getDocGroupID().'&filedetailid='.db_result($result, $i, 'docid'), html_image('docman/edit-file.png', 22, 22, array('alt' => _('Edit this document'))));
+					$cells[][] = util_make_link('/docman/?group_id='.$document->Group->getID().'&view=listfile&dirid='.$document->getDocGroupID().'&filedetailid='.$document->getID(), html_image('docman/edit-file.png', 22, 22, array('alt' => _('Edit this document'))));
 				} else {
 					$cells[][] = ' ';
 				}

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=b68a90e04ab0791bf2b95c2d5ed1ee4a254140f1

commit b68a90e04ab0791bf2b95c2d5ed1ee4a254140f1
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Dec 13 18:19:51 2015 +0100

    indent & space

diff --git a/src/common/search/DocsSearchQuery.class.php b/src/common/search/DocsSearchQuery.class.php
index 8b0d150..9721e1a 100644
--- a/src/common/search/DocsSearchQuery.class.php
+++ b/src/common/search/DocsSearchQuery.class.php
@@ -75,11 +75,9 @@ class DocsSearchQuery extends SearchQuery {
 			$qpa = db_construct_qpa($qpa, ' AND doc_groups.doc_group = ANY ($1)', array(db_int_array_to_any_clause($this->sections)));
 		}
 		if ($this->showNonPublic) {
-			$qpa = db_construct_qpa($qpa,
-						 ' AND doc_data.stateid IN (1, 4, 5)') ;
+			$qpa = db_construct_qpa($qpa, ' AND doc_data.stateid IN (1, 4, 5)') ;
 		} else {
-			$qpa = db_construct_qpa($qpa,
-						 ' AND doc_data.stateid = 1') ;
+			$qpa = db_construct_qpa($qpa, ' AND doc_data.stateid = 1') ;
 		}
 
 		if (isset($options['date_begin']) && !isset($options['date_end'])) {
@@ -111,9 +109,7 @@ class DocsSearchQuery extends SearchQuery {
 						 'SELECT x.* FROM (SELECT doc_data.docid, doc_data.title, doc_data.filename, doc_data.description, doc_groups.groupname, title||$1||description||$1||data_words AS full_string_agg, groups.group_name as project_name FROM doc_data, doc_groups, groups WHERE doc_data.doc_group = doc_groups.doc_group AND doc_data.group_id = groups.group_id ',
 						 array ($this->field_separator));
 			}
-
 			$qpa = $this->addCommonQPA($qpa);
-
 			$qpa = db_construct_qpa($qpa, ') AS x WHERE ');
 			$qpa = $this->addIlikeCondition($qpa, 'full_string_agg');
 			$qpa = db_construct_qpa($qpa, ' ORDER BY x.groupname, x.title');
@@ -134,7 +130,6 @@ class DocsSearchQuery extends SearchQuery {
 					array ($this->field_separator, $words));
 		}
 		$qpa = $this->addCommonQPA($qpa);
-
 		$qpa = db_construct_qpa($qpa, ') AS x ') ;
 		if (count($this->phrases)) {
 			$qpa = db_construct_qpa($qpa, 'WHERE ') ;
@@ -167,11 +162,9 @@ class DocsSearchQuery extends SearchQuery {
 			$sql .= ' AND doc_data.stateid = 1  AND doc_groups.stateid = 1';
 		}
 		$sql .= ' ORDER BY groupname';
-
 		$sections = array();
-		$res = db_query_params($sql,
-					array($groupId));
-		while($data = db_fetch_array($res)) {
+		$res = db_query_params($sql, array($groupId));
+		while ($data = db_fetch_array($res)) {
 			$sections[$data['doc_group']] = $data['groupname'];
 		}
 		return $sections;

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

Summary of changes:
 src/common/docman/Document.class.php                  |  1 +
 src/common/search/DocsSearchQuery.class.php           | 15 ++++-----------
 .../renderers/DocsHtmlSearchRenderer.class.php        | 19 +++++++++----------
 3 files changed, 14 insertions(+), 21 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list