[Fusionforge-commits] FusionForge branch Branch_5_3 updated. ea11f6e9219833c95e28d2814d4cc43ab056d814

Franck Villaume nerville at fusionforge.org
Thu Mar 6 17:20:39 CET 2014


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, Branch_5_3 has been updated
       via  ea11f6e9219833c95e28d2814d4cc43ab056d814 (commit)
      from  5002302981ca51505e5a5c8fe260fec2be4d0abc (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 ea11f6e9219833c95e28d2814d4cc43ab056d814
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Thu Mar 6 17:19:39 2014 +0100

    docman: fix massive actions. url too long

diff --git a/src/common/docman/actions/delfile.php b/src/common/docman/actions/delfile.php
index d5daa76..eee3b0f 100644
--- a/src/common/docman/actions/delfile.php
+++ b/src/common/docman/actions/delfile.php
@@ -3,6 +3,7 @@
  * FusionForge Documentation Manager
  *
  * Copyright 2011, Franck Villaume - Capgemini
+ * Copyright 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -33,12 +34,9 @@ if (!forge_check_perm('docman', $g->getID(), 'approve')) {
 }
 
 $arr_fileid = explode(',',getStringFromRequest('fileid'));
-$return_msg = _('Document(s)').' ';
 foreach ($arr_fileid as $fileid) {
 	if (!empty($fileid)) {
 		$d = new Document($g, $fileid);
-		$return_msg .= $d->getFilename().' ';
-
 		if ($d->isError())
 			session_redirect('/docman/?group_id='.$group_id.'&view=listfile&dirid='.$dirid.'&error_msg='.urlencode($d->getErrorMessage()));
 
@@ -49,5 +47,6 @@ foreach ($arr_fileid as $fileid) {
 		session_redirect('/docman/?group_id='.$group_id.'&view=listfile&dirid='.$dirid.'&warning_msg='.urlencode($warning_msg));
 	}
 }
-$return_msg .= _('deleted successfully.');
+$count = count($arr_fileid);
+$return_msg = sprintf(ngettext('%s document deleted successfully.', '%s documents deleted successfully.', $count), $count);
 session_redirect('/docman/?group_id='.$group_id.'&view=listtrashfile&dirid='.$dirid.'&feedback='.urlencode($return_msg));
diff --git a/src/common/docman/actions/trashfile.php b/src/common/docman/actions/trashfile.php
index 98933fe..4348815 100644
--- a/src/common/docman/actions/trashfile.php
+++ b/src/common/docman/actions/trashfile.php
@@ -5,6 +5,7 @@
  * Copyright 2000, Quentin Cregan/Sourceforge
  * Copyright 2002-2003, Tim Perdue/GForge, LLC
  * Copyright 2010-2011, Franck Villaume - Capgemini
+ * Copyright 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -47,12 +48,9 @@ if ($childgroup_id) {
 }
 
 $arr_fileid = explode(',',getStringFromRequest('fileid'));
-$return_msg = _('Document(s)').' ';
 foreach ($arr_fileid as $fileid) {
 	if (!empty($fileid)) {
 		$d = new Document($g, $fileid);
-		$return_msg .= $d->getFilename().' ';
-
 		if ($d->isError())
 			session_redirect($redirecturl.'&error_msg='.urlencode($d->getErrorMessage()));
 
@@ -63,5 +61,6 @@ foreach ($arr_fileid as $fileid) {
 		session_redirect($redirecturl.'&warning_msg='.urlencode($warning_msg));
 	}
 }
-$return_msg .= _('moved to trash successfully.');
+$count = count($arr_fileid);
+$return_msg = sprintf(ngettext('%s document moved to trash successfully.', '%s documents moved to trash successfully.', $count), $count);
 session_redirect($redirecturl.'&feedback='.urlencode($return_msg));
diff --git a/src/common/docman/actions/validatefile.php b/src/common/docman/actions/validatefile.php
index 607a770..5d46d85 100644
--- a/src/common/docman/actions/validatefile.php
+++ b/src/common/docman/actions/validatefile.php
@@ -3,7 +3,7 @@
  * FusionForge Documentation Manager
  *
  * Copyright 2010-2011, Franck Villaume - Capgemini
- * Copyright 2013, Franck Villaume - TrivialDev
+ * Copyright 2013-2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -42,12 +42,9 @@ if (!forge_check_perm('docman', $g->getID(), 'approve')) {
 }
 
 $arr_fileid = explode(',', getStringFromRequest('fileid'));
-$return_msg = _('Document(s)').' ';
 foreach ($arr_fileid as $fileid) {
 	if (!empty($fileid)) {
 		$d = new Document($g, $fileid);
-		$return_msg .= $d->getFilename().' ';
-
 		if ($d->isError())
 			session_redirect($urlredirect.'&error_msg='.urlencode($d->getErrorMessage()));
 
@@ -58,5 +55,6 @@ foreach ($arr_fileid as $fileid) {
 		session_redirect($urlredirect.'&warning_msg='.urlencode($warning_msg));
 	}
 }
-$return_msg .= _('activated successfully.');
+$count = count($arr_fileid);
+$return_msg = sprintf(ngettext('%s document validated successfully.', '%s documents validated successfully.', $count), $count);
 session_redirect($urlredirect.'&feedback='.urlencode($return_msg));

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

Summary of changes:
 src/common/docman/actions/delfile.php      |    7 +++----
 src/common/docman/actions/trashfile.php    |    7 +++----
 src/common/docman/actions/validatefile.php |    8 +++-----
 3 files changed, 9 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list