[Fusionforge-commits] r12798 - in trunk/src/plugins/mantisbt: common www

Franck VILLAUME nerville at fusionforge.org
Wed Mar 16 17:23:51 CET 2011


Author: nerville
Date: 2011-03-16 17:23:51 +0100 (Wed, 16 Mar 2011)
New Revision: 12798

Modified:
   trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php
   trunk/src/plugins/mantisbt/www/index.php
Log:
start implement skeleton for global admin in MantisBT

Modified: trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php
===================================================================
--- trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php	2011-03-16 16:01:49 UTC (rev 12797)
+++ trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php	2011-03-16 16:23:51 UTC (rev 12798)
@@ -111,7 +111,7 @@
 				break;
 			}
 			case "site_admin_option_hook": {
-				echo '<li>'.util_make_link("/plugins/mantisbt/?group_id=forge&type=admin&pluginname=".$this->name,_('Global MantisBT admin')).'</li>';
+				echo '<li>'.util_make_link("/plugins/mantisbt/?type=globaladmin&pluginname=".$this->name,_('Global MantisBT admin')).'</li>';
 				$returned = true;
 				break;
 			}
@@ -591,6 +591,14 @@
 				$returned = true;
 				break;
 			}
+			case 'globaladmin': {
+				session_require_global_perm('forge_admin');
+				global $gfwww;
+				require_once($gfwww.'admin/admin_utils.php');
+				site_admin_header(array('title'=>_('Site MantisBT Admin'), 'toptab' => ''));
+				$returned = true;
+				break;
+			}
 			default: {
 				break;
 			}
@@ -736,6 +744,16 @@
 		$userConf['password'] = $row['mantisbt_password'];
 		return $userConf;
 	}
+
+	/**
+	 * getGlobalAdminView - display the Global Admin View
+	 *
+	 * @return	bool	true
+	 */
+	function getGlobalAdminView() {
+		echo 'TOBEIMPLEMENTED';
+		return true;
+	}
 }
 // Local Variables:
 // mode: php

Modified: trunk/src/plugins/mantisbt/www/index.php
===================================================================
--- trunk/src/plugins/mantisbt/www/index.php	2011-03-16 16:01:49 UTC (rev 12797)
+++ trunk/src/plugins/mantisbt/www/index.php	2011-03-16 16:23:51 UTC (rev 12798)
@@ -196,14 +196,14 @@
 		$use_tooltips = $user->usesTooltips();
 
 		switch ($action) {
-			case "inituser":
-			case "updateIssue":
-			case "updateNote":
-			case "addNote":
-			case "deleteNote":
-			case "addAttachment":
-			case "deleteAttachment":
-			case "updateuserConf": {
+			case 'inituser':
+			case 'updateIssue':
+			case 'updateNote':
+			case 'addNote':
+			case 'deleteNote':
+			case 'addAttachment':
+			case 'deleteAttachment':
+			case 'updateuserConf': {
 				global $gfplugins;
 				include($gfplugins.$mantisbt->name.'/action/'.$action.'.php');
 				break;
@@ -288,18 +288,18 @@
 		}
 
 		switch ($action) {
-			case "init": {
+			case 'init': {
 				global $gfplugins;
 				include($gfplugins.$mantisbt->name.'/action/'.$action.'.php');
 				break;
 			}
-			case "addCategory":
-			case "addVersion":
-			case "renameCategory":
-			case "deleteCategory":
-			case "deleteVersion":
-			case "updateVersion":
-			case "updateConf": {
+			case 'addCategory':
+			case 'addVersion':
+			case 'renameCategory':
+			case 'deleteCategory':
+			case 'deleteVersion':
+			case 'updateVersion':
+			case 'updateConf': {
 				global $gfplugins;
 				include($gfplugins.$mantisbt->name.'/action/'.$action.'.php');
 				break;
@@ -310,7 +310,7 @@
 		//only project admin can access here
 
 		switch ($view) {
-			case "init": {
+			case 'init': {
 				$mantisbt->getInitDisplay();
 				break;
 			}
@@ -321,6 +321,11 @@
 		}
 		break;
 	}
+	case 'globaladmin': {
+		$mantisbt->getHeader('globaladmin');
+		$mantisbt->getGlobalAdminView();
+		break;
+	}
 }
 
 site_project_footer(array());




More information about the Fusionforge-commits mailing list