[Fusionforge-commits] r14202 - in trunk/src/plugins/projects-hierarchy: common www

Olivier Berger olberger at fusionforge.org
Tue Aug 23 18:27:28 CEST 2011


Author: olberger
Date: 2011-08-23 18:27:28 +0200 (Tue, 23 Aug 2011)
New Revision: 14202

Modified:
   trunk/src/plugins/projects-hierarchy/common/projects-hierarchyPlugin.class.php
   trunk/src/plugins/projects-hierarchy/www/index.php
Log:
Add needed params for checks in site_project_header

Modified: trunk/src/plugins/projects-hierarchy/common/projects-hierarchyPlugin.class.php
===================================================================
--- trunk/src/plugins/projects-hierarchy/common/projects-hierarchyPlugin.class.php	2011-08-23 16:27:23 UTC (rev 14201)
+++ trunk/src/plugins/projects-hierarchy/common/projects-hierarchyPlugin.class.php	2011-08-23 16:27:28 UTC (rev 14202)
@@ -560,9 +560,10 @@
 	/**
 	 * getHeader - initialize header and js
 	 * @param	string	type : user, project (aka group)
+	 * @param       array   params
 	 * @return	bool	success or not
 	 */
-	function getHeader($type) {
+	function getHeader($type, $params=NULL) {
 		global $gfplugins;
 		$returned = false;
 		switch ($type) {
@@ -576,7 +577,6 @@
 			}
 			case 'admin':
 			default: {
-				$params['toptab']=$this->name;
                                 site_project_header($params);
 				$returned = true;
 				break;

Modified: trunk/src/plugins/projects-hierarchy/www/index.php
===================================================================
--- trunk/src/plugins/projects-hierarchy/www/index.php	2011-08-23 16:27:23 UTC (rev 14201)
+++ trunk/src/plugins/projects-hierarchy/www/index.php	2011-08-23 16:27:28 UTC (rev 14202)
@@ -115,7 +115,11 @@
 				break;
 			}
 		}
-		$projectsHierarchy->getHeader('admin');
+		// params needed by site_project_header() inside getHeader()
+		$params = array(
+			'toptab' => $projectsHierarchy->name,
+			'group' => $id);
+		$projectsHierarchy->getHeader('admin', $params);
 		$projectsHierarchy->getProjectAdminView();
 		$projectsHierarchy->getFooter('admin');
 	}




More information about the Fusionforge-commits mailing list