[Fusionforge-commits] FusionForge branch Branch_5_1 updated. 128646fab0b1c6b0530f470033f14651f28696bf

Thorsten Glaser mirabilos at fusionforge.org
Mon Nov 12 13:45:10 CET 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, Branch_5_1 has been updated
       via  128646fab0b1c6b0530f470033f14651f28696bf (commit)
      from  c4eac526126aece17588a0e38c0a2a9cc694c61f (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 128646fab0b1c6b0530f470033f14651f28696bf
Author: Roland Mas <lolando at fusionforge.org>
Date:   Fri Nov 9 13:31:30 2012 +0100

    merge RBAC fixes from Branch_5_2:
    
    commit 381a3683760f954e70a5aaa9bdf68d2fa1bcdaff
    Author: Roland Mas <lolando at debian.org>
    Date:   Fri Nov 9 13:31:21 2012 +0100
    
        Fixed crash when editing role permissions in projects where forums/pm/trackers are disabled

diff --git a/src/common/include/RBAC.php b/src/common/include/RBAC.php
index 577c419..fa2a00d 100644
--- a/src/common/include/RBAC.php
+++ b/src/common/include/RBAC.php
@@ -559,23 +559,29 @@ abstract class BaseRole extends Error {
 		}
 
 		$atf = new ArtifactTypeFactory ($project) ;
-		$tids = $atf->getAllArtifactTypeIds () ;
-		foreach ($tids as $tid) {
-			$result['tracker'][$tid] = $this->getVal ('tracker', $tid) ;
+		if (!$atf->isError()) {
+			$tids = $atf->getAllArtifactTypeIds () ;
+			foreach ($tids as $tid) {
+				$result['tracker'][$tid] = $this->getVal ('tracker', $tid) ;
+			}
 		}
 		$sections[] = 'tracker' ;
 
 		$ff = new ForumFactory ($project) ;
-		$fids = $ff->getAllForumIds () ;
-		foreach ($fids as $fid) {
-			$result['forum'][$fid] = $this->getVal ('forum', $fid) ;
+		if (!$ff->isError()) {
+			$fids = $ff->getAllForumIds();
+			foreach ($fids as $fid) {
+				$result['forum'][$fid] = $this->getVal('forum', $fid);
+			}
 		}
 		$sections[] = 'forum' ;
 
 		$pgf = new ProjectGroupFactory ($project) ;
-		$pgids = $pgf->getAllProjectGroupIds () ;
-		foreach ($pgids as $pgid) {
-			$result['pm'][$pgid] = $this->getVal ('pm', $pgid) ;
+		if (!$pgf->isError()) {
+			$pgids = $pgf->getAllProjectGroupIds();
+			foreach ($pgids as $pgid) {
+				$result['pm'][$pgid] = $this->getVal('pm', $pgid);
+			}
 		}
 		$sections[] = 'pm' ;
 

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

Summary of changes:
 src/common/include/RBAC.php |   24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list