[Fusionforge-commits] FusionForge branch master updated. 6.0.4-1081-g6159427

Franck Villaume nerville at libremir.placard.fr.eu.org
Mon Oct 17 21:55:12 CEST 2016


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  61594276c4675d7f350d525e69e6ce0e18c9bae2 (commit)
       via  e8e252cfbce236a70ece493d040f1f16530bb7ce (commit)
      from  0c6626f0f871d9b9e856780f4936f61627fb7765 (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=61594276c4675d7f350d525e69e6ce0e18c9bae2

commit 61594276c4675d7f350d525e69e6ce0e18c9bae2
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Oct 17 16:21:43 2016 +0200

    remove empty line

diff --git a/src/common/include/FFError.class.php b/src/common/include/FFError.class.php
index ef0ba12..8040fc6 100644
--- a/src/common/include/FFError.class.php
+++ b/src/common/include/FFError.class.php
@@ -214,7 +214,6 @@ class FFError {
 	function isMissingParamsError(){
 		return ($this->error_code == ERROR__MISSING_PARAMS_ERROR);
 	}
-
 }
 
 // Local Variables:

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

commit e8e252cfbce236a70ece493d040f1f16530bb7ce
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Oct 17 15:13:32 2016 +0200

    docman: ensure dirid is valid with project-hierarchy support

diff --git a/src/common/docman/views/listfile.php b/src/common/docman/views/listfile.php
index 4ed530f..4fbe03b 100644
--- a/src/common/docman/views/listfile.php
+++ b/src/common/docman/views/listfile.php
@@ -36,6 +36,7 @@ global $g; // the Group object
 global $dm; // the docman manager
 global $warning_msg;
 global $start; // use to set the offset
+global $childgroup_id;
 
 $linkmenu = 'listfile';
 $baseredirecturl = '/docman/?group_id='.$group_id;
@@ -46,7 +47,6 @@ include ($gfcommon.'docman/views/tree.php');
 echo html_ac(html_ap() - 1);
 
 // plugin projects-hierarchy support
-$childgroup_id = getIntFromRequest('childgroup_id');
 if ($childgroup_id) {
 	$redirecturl .= '&childgroup_id='.$childgroup_id;
 	$g = group_get_object($childgroup_id);
@@ -104,17 +104,17 @@ if ($dirid) {
 	$ndg = documentgroup_get_object($dirid, $g->getID());
 	if ($ndg->isError()) {
 		$error_msg = $ndg->getErrorMessage();
-		session_redirect($baseredirecturl);
+		session_redirect($baseredirecturl, false);
 	}
 	$DocGroupName = $ndg->getName();
 	$dgpath = $ndg->getPath(true, false);
 	if (!$DocGroupName) {
 		$error_msg = $g->getErrorMessage();
-		session_redirect($baseredirecturl);
+		session_redirect($baseredirecturl, false);
 	}
 	if (($ndg->getState() != 1 && $ndg->getState() != 5) || !$dgpath) {
 		$error_msg = _('Invalid folder');
-		session_redirect($baseredirecturl.'&view=listfile');
+		session_redirect($baseredirecturl.'&view=listfile', false);
 	}
 	$nbDocs = $ndg->getNumberOfDocuments(1);
 	if (forge_check_perm('docman', $g->getID(), 'approve')) {
@@ -315,12 +315,12 @@ if (isset($nested_docs[$dirid]) && is_array($nested_docs[$dirid])) {
 			$nextcell = '';
 			$editfileaction = '/docman/?action=editfile&fromview=listfile&dirid='.$d->getDocGroupID();
 			$notifyaction = '/docman/?action=notifyusers&fromview=listfile&dirid='.$d->getDocGroupID();
-			if (isset($GLOBALS['childgroup_id']) && $GLOBALS['childgroup_id']) {
-				$editfileaction .= '&childgroup_id='.$GLOBALS['childgroup_id'];
-				$notifyaction .= '&childgroup_id='.$GLOBALS['childgroup_id'];
+			if ($childgroup_id) {
+				$editfileaction .= '&childgroup_id='.$childgroup_id;
+				$notifyaction .= '&childgroup_id='.$childgroup_id;
 			}
-			$editfileaction .= '&group_id='.$GLOBALS['group_id'];
-			$notifyaction .= '&group_id='.$GLOBALS['group_id'];
+			$editfileaction .= '&group_id='.$group_id;
+			$notifyaction .= '&group_id='.$group_id;
 			if (!$d->getLocked() && !$d->getReserved()) {
 				$nextcell .= util_make_link($redirecturl.'&action=trashfile&fileid='.$d->getID(), $HTML->getDeletePic(_('Move this document to trash'), 'delfile'));
 				$nextcell .= util_make_link('#', $HTML->getEditFilePic(_('Edit this document'), 'editdocument'), array('onclick' => 'javascript:controllerListFile.toggleEditFileView({action:\''.util_make_uri($editfileaction).'\', lockIntervalDelay: 60000, childGroupId: '.util_ifsetor($childgroup_id, 0).' , id:'.$d->getID().', groupId:'.$d->Group->getID().', docgroupId:'.$d->getDocGroupID().', statusId:'.$d->getStateID().', statusDict:'.$dm->getStatusNameList('json').', docgroupDict:'.$dm->getDocGroupList($nested_groups, 'json').', isText:\''.$d->isText().'\', isHtml:\''.$d->isHtml().'\', useCreateOnline:'.$d->Group->useCreateOnline().', docManURL:\''.util_make_uri('/docman').'\'})', 'title' => _('Edit this document')), true);
diff --git a/src/www/docman/index.php b/src/www/docman/index.php
index 8ae45ce..198a230 100644
--- a/src/www/docman/index.php
+++ b/src/www/docman/index.php
@@ -65,16 +65,19 @@ if (!$g->usesDocman())
 if ($g->isError())
 	exit_error($g->getErrorMessage(), 'docman');
 
+$childgroup_id = getIntFromRequest('childgroup_id', 0);
 $dirid = getIntFromRequest('dirid', 0);
 if ($dirid) {
-	$chkdg = documentgroup_get_object($dirid, $g->getID());
+	if ($childgroup_id) {
+		$chkdg = documentgroup_get_object($dirid, group_get_object($childgroup_id)->getID());
+	} else {
+		$chkdg = documentgroup_get_object($dirid, $g->getID());
+	}
 	if (!is_object($chkdg)) {
 		session_redirect('/docman/?group_id='.$group_id);
 	}
 }
 
-$childgroup_id = getIntFromRequest('childgroup_id');
-
 /* everything sounds ok, now let's do the job */
 $action = getStringFromRequest('action');
 if (file_exists(forge_get_config('source_path').'/common/docman/actions/'.$action.'.php')) {

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

Summary of changes:
 src/common/docman/views/listfile.php | 18 +++++++++---------
 src/common/include/FFError.class.php |  1 -
 src/www/docman/index.php             |  9 ++++++---
 3 files changed, 15 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list