[evolvis-commits] r17512: add global tabs (outerTabs) by means of mapping them to group #1 (Site Admin)

mirabilos at evolvis.org mirabilos at evolvis.org
Fri Sep 2 12:33:04 CEST 2011


Author: mirabilos
Date: 2011-09-02 12:33:03 +0200 (Fri, 02 Sep 2011)
New Revision: 17512

Modified:
   branches/ev48fixes/plugins/fusionforge-plugin-extratabs/data/usr/share/gforge/plugins/extratabs/common/ExtraTabsPlugin.class.php
Log:
add global tabs (outerTabs) by means of mapping them to group #1 (Site Admin)


Modified: branches/ev48fixes/plugins/fusionforge-plugin-extratabs/data/usr/share/gforge/plugins/extratabs/common/ExtraTabsPlugin.class.php
===================================================================
--- branches/ev48fixes/plugins/fusionforge-plugin-extratabs/data/usr/share/gforge/plugins/extratabs/common/ExtraTabsPlugin.class.php	2011-09-02 10:27:12 UTC (rev 17511)
+++ branches/ev48fixes/plugins/fusionforge-plugin-extratabs/data/usr/share/gforge/plugins/extratabs/common/ExtraTabsPlugin.class.php	2011-09-02 10:33:03 UTC (rev 17512)
@@ -32,6 +32,7 @@
 		$this->hooks[] = "groupisactivecheckbox" ; // The "use ..." checkbox in editgroupinfo
 		$this->hooks[] = "groupisactivecheckboxpost" ; //
 		$this->hooks[] = "groupmenu" ;  // To put into the project tabs
+		$this->hooks[] = "outermenu" ;  // To put into the global tabs
 		$this->hooks[] = "clone_project_from_template" ;
 	}
 
@@ -92,8 +93,15 @@
 			} else {
 				$group->setPluginUse ( $this->name, false );
 			}
-		} elseif ($hookname == "groupmenu") {
-			$group_id=$params['group'];
+		} elseif ($hookname == "groupmenu" || $hookname == "outermenu") {
+			$group_id = util_ifsetor($params['group'], 0);
+			if ($hookname == "outermenu") {
+				/* global tabs belong to Site Admin group */
+				$group_id = 1;
+			} else if ($group_id == 1) {
+				/* we don't display them on the group too */
+				return;
+			}
 			$project = group_get_object($group_id);
 			if (!$project || !is_object($project))
 				return;



More information about the evolvis-commits mailing list