[Fusionforge-commits] r12395 - in trunk/src/plugins/mantisbt: action common www www/admin www/group

Franck VILLAUME nerville at fusionforge.org
Sun Feb 27 13:02:02 CET 2011


Author: nerville
Date: 2011-02-27 13:02:01 +0100 (Sun, 27 Feb 2011)
New Revision: 12395

Added:
   trunk/src/plugins/mantisbt/action/addCategory.php
   trunk/src/plugins/mantisbt/action/addVersion.php
   trunk/src/plugins/mantisbt/action/deleteCategory.php
   trunk/src/plugins/mantisbt/action/deleteVersion.php
   trunk/src/plugins/mantisbt/action/renameCategory.php
   trunk/src/plugins/mantisbt/action/updateVersion.php
Removed:
   trunk/src/plugins/mantisbt/action/admin/
Modified:
   trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php
   trunk/src/plugins/mantisbt/www/admin/index.php
   trunk/src/plugins/mantisbt/www/group/index.php
   trunk/src/plugins/mantisbt/www/index.php
Log:
make it work ... numerous fix

Copied: trunk/src/plugins/mantisbt/action/addCategory.php (from rev 12392, trunk/src/plugins/mantisbt/action/admin/addCategory.php)
===================================================================
--- trunk/src/plugins/mantisbt/action/addCategory.php	                        (rev 0)
+++ trunk/src/plugins/mantisbt/action/addCategory.php	2011-02-27 12:02:01 UTC (rev 12395)
@@ -0,0 +1,39 @@
+<?php
+/*
+ * Copyright 2010, Franck Villaume - Capgemini
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+/* addCategory action page */
+
+$nameCategory = $_POST['nameCategory'];
+
+if (!empty($nameCategory)) {
+	try {
+		$clientSOAP = new SoapClient(forge_get_config('server_url','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
+		$clientSOAP->__soapCall('mc_project_add_category', array("username" => $username, "password" => $password, "p_project_id" => $idProjetMantis, "p_category_name" => $nameCategory));
+	} catch (SoapFault $soapFault) {
+		$error_msg = _('Task failed:').' '.$soapFault->faultstring;
+		session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&error_msg='.urlencode($error_msg));
+	}
+	$feedback = _('Category added successfully');
+	session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&feedback='.urlencode($feedback));
+}
+$warning_msg = _('Missing category name');
+session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&warning_msg='.urlencode($warning_msg));
+?>

Copied: trunk/src/plugins/mantisbt/action/addVersion.php (from rev 12392, trunk/src/plugins/mantisbt/action/admin/addVersion.php)
===================================================================
--- trunk/src/plugins/mantisbt/action/addVersion.php	                        (rev 0)
+++ trunk/src/plugins/mantisbt/action/addVersion.php	2011-02-27 12:02:01 UTC (rev 12395)
@@ -0,0 +1,62 @@
+<?php
+/*
+ * Copyright 2010, Franck Villaume - Capgemini
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+/* addVersion action page */
+if (isset($_POST['version']) && !empty($_POST['version'])) {
+	$versionStruct = array();
+	$versionStruct['name'] = $_POST['version'];
+	$versionStruct['project_id'] = $idProjetMantis;
+	$versionStruct['released'] = '';
+	$versionStruct['description'] = '';
+	$versionStruct['date_order'] = '';
+	try {
+		$clientSOAP = new SoapClient(forge_get_config('server_url','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
+		$clientSOAP->__soapCall('mc_project_version_add', array("username" => $username, "password" => $password, "version" => $versionStruct));
+		if (isset($_POST['transverse'])) {
+			$listChild = $clientSOAP->__soapCall('mc_project_get_all_subprojects', array("username" => $username, "password" => $password, "project_id" => $idProjetMantis));
+			foreach ($listChild as $key => $child) {
+				$listVersions = $clientSOAP->__soapCall('mc_project_get_versions', array("username" => $username, "password" => $password, "project_id" => $child));
+				$todo = 1;
+				foreach ($listVersions as $key => $version ) {
+					if ($version->name == $versionStruct['name'])
+						$todo = 0;
+				}
+				if ($todo) {
+					try {
+						$versionStruct['project_id'] = $child;
+						$clientSOAP->__soapCall('mc_project_version_add', array("username" => $username, "password" => $password, "version" => $versionStruct));
+					} catch (SoapFault $soapFault) {
+						$msg = _('Task failed:').' '.$versionStruct['name'].' '.$soapFault->faultstring;
+						session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&error_msg='.urlencode($msg));
+					}
+				}
+			}
+		}
+	} catch (SoapFault $soapFault) {
+		$msg = _('Task failed:').' '.$versionStruct['name'].' '.$soapFault->faultstring;
+		session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&error_msg='.urlencode($msg));
+	}
+	$feedback = _('Task succeeded');
+	session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&feedback='.urlencode($feedback));
+}
+$warning_msg = _('Missing version');
+session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&warning_msg='.urlencode($warning_msg));
+?>

Copied: trunk/src/plugins/mantisbt/action/deleteCategory.php (from rev 12392, trunk/src/plugins/mantisbt/action/admin/deleteCategory.php)
===================================================================
--- trunk/src/plugins/mantisbt/action/deleteCategory.php	                        (rev 0)
+++ trunk/src/plugins/mantisbt/action/deleteCategory.php	2011-02-27 12:02:01 UTC (rev 12395)
@@ -0,0 +1,42 @@
+<?php
+
+/*
+ * Copyright 2010, Capgemini
+ * Authors: Franck Villaume - capgemini
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+/* deleteCategory action page */
+
+$deleteCategory = $_POST['deleteCategory'];
+
+if ($deleteCategory) {
+    try {
+	    $clientSOAP = new SoapClient("http://".forge_get_config('server','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
+	    $clientSOAP->__soapCall('mc_project_delete_category', array("username" => $username, "password" => $password, "p_project_id" => $idProjetMantis, "p_category_name" => $deleteCategory));
+    } catch (SoapFault $soapFault) {
+        $msg = 'Error : '.$soapFault->faultstring;
+        session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&error_msg='.urlencode($msg));
+    }
+    $feedback = 'Opération réussie';
+    session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&feedback='.urlencode($feedback));
+} else {
+    $warning = 'Param&egravetres manquants';
+    session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&warning_msg='.urlencode($warning));
+}
+?>

Copied: trunk/src/plugins/mantisbt/action/deleteVersion.php (from rev 12392, trunk/src/plugins/mantisbt/action/admin/deleteVersion.php)
===================================================================
--- trunk/src/plugins/mantisbt/action/deleteVersion.php	                        (rev 0)
+++ trunk/src/plugins/mantisbt/action/deleteVersion.php	2011-02-27 12:02:01 UTC (rev 12395)
@@ -0,0 +1,42 @@
+<?php
+
+/*
+ * Copyright 2010, Capgemini
+ * Authors: Franck Villaume - capgemini
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+/* deleteVersion action page */
+
+$deleteVersion = $_POST['deleteVersion'];
+
+if ($deleteVersion) {
+    try {
+	    $clientSOAP = new SoapClient("http://".forge_get_config('server','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
+	    $clientSOAP->__soapCall('mc_project_version_delete', array("username" => $username, "password" => $password, "version_id" => $deleteVersion));
+    } catch (SoapFault $soapFault) {
+        $msg = 'Erreur : '.$soapFault->faultstring;
+        session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&error_msg='.urlencode($msg));
+    }
+    $feedback = 'Opération réussie';
+    session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&feedback='.urlencode($feedback));
+} else {
+    $warning = 'Param&egravetres manquants';
+    session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&warning_msg='.urlencode($warning));
+}
+?>

Copied: trunk/src/plugins/mantisbt/action/renameCategory.php (from rev 12392, trunk/src/plugins/mantisbt/action/admin/renameCategory.php)
===================================================================
--- trunk/src/plugins/mantisbt/action/renameCategory.php	                        (rev 0)
+++ trunk/src/plugins/mantisbt/action/renameCategory.php	2011-02-27 12:02:01 UTC (rev 12395)
@@ -0,0 +1,43 @@
+<?php
+
+/*
+ * Copyright 2010, Capgemini
+ * Authors: Franck Villaume - capgemini
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+/* renameCategory action page */
+
+$newCategoryName = $_POST['newCategoryName'];
+$renameCategory = $_POST['renameCategory'];
+
+if ( $newCategoryName && $renameCategory ) {
+    try {
+	    $clientSOAP = new SoapClient("http://".forge_get_config('server','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
+	    $clientSOAP->__soapCall('mc_project_rename_category_by_name', array("username" => $username, "password" => $password, "p_project_id" => $idProjetMantis, "p_category_name" => $renameCategory, "p_category_name_new" => $newCategoryName, "p_assigned_to" => ''));
+    } catch (SoapFault $soapFault) {
+        $msg = 'Error : '.$soapFault->faultstring;
+        session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&error_msg='.urlencode($msg));
+    }
+    $feedback = 'Opération réussie';
+    session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&feedback='.urlencode($feedback));
+} else {
+    $warning = 'Param&egravetres manquants';
+    session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&warning_msg='.urlencode($warning));
+}
+?>

Copied: trunk/src/plugins/mantisbt/action/updateVersion.php (from rev 12392, trunk/src/plugins/mantisbt/action/admin/updateVersion.php)
===================================================================
--- trunk/src/plugins/mantisbt/action/updateVersion.php	                        (rev 0)
+++ trunk/src/plugins/mantisbt/action/updateVersion.php	2011-02-27 12:02:01 UTC (rev 12395)
@@ -0,0 +1,62 @@
+<?php
+
+/*
+ * Copyright 2010, Capgemini
+ * Authors: Franck Villaume - capgemini
+ *
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+/* update a version action page */
+
+$version_id = $_POST['version_id'];
+
+$version_data = array();
+if ( $_POST['version_release'] == 1 ) {
+	$version_data['released'] = 1;
+} else {
+	$version_data['released'] = 0;
+}
+$version_data['project_id'] = $idProjetMantis;
+$version_data['name'] = $_POST['version_name'];
+list($day, $month, $year) = split('[/.-]', $_POST['version_date_order']);
+$version_data['date_order'] = $month."/".$day."/".$year;
+$version_data['description'] = '';
+
+try {
+    $clientSOAP = new SoapClient("http://".forge_get_config('server','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
+    $clientSOAP->__soapCall('mc_project_version_update', array("username" => $username, "password" => $password, "version_id" => $version_id, "version" => $version_data));
+    if (isset($_POST['transverse'])) {
+        $listChild = $clientSOAP->__soapCall('mc_project_get_all_subprojects', array("username" => $username, "password" => $password, "project_id" => $idProjetMantis));
+        foreach ($listChild as $key => $child) {
+            $listVersions = $clientSOAP->__soapCall('mc_project_get_versions', array("username" => $username, "password" => $password, "project_id" => $child));
+            foreach ($listVersions as $key => $version) {
+                if ($version->name == $_POST['version_old_name'])
+                    $child_version_id = $version->id;
+            }
+            $version_data['project_id'] = $child;
+            $clientSOAP->__soapCall('mc_project_version_update', array("username" => $username, "password" => $password, "version_id" => $child_version_id, "version" => $version_data));
+        }
+    }
+} catch (SoapFault $soapFault) {
+    $msg = 'Erreur : '.$version_data['name'].' '.$soapFault->faultstring;
+    session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisb&error_msg='.urlencode($msg));
+}
+$feedback = 'Opération réussie';
+session_redirect('plugins/mantisbt/?type=admin&id='.$id.'&pluginname=mantisbt&feedback='.urlencode($feedback));
+
+?>

Modified: trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php
===================================================================
--- trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php	2011-02-27 11:41:37 UTC (rev 12394)
+++ trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php	2011-02-27 12:02:01 UTC (rev 12395)
@@ -467,14 +467,14 @@
 	/**
 	 * getMantisBTConf - get the mantisbt configuration id for a specific group_id
 	 *
-	 * @param	int	the group_id
 	 * @return	array	the mantisbt configuration array
 	 * @access	public
 	 */
-	function getMantisBTConf($groupId) {
-		$group = group_get_object($groupId);
+	function getMantisBTConf() {
+		global $group_id;
+		$group = group_get_object($group_id);
 		$mantisbtConfArray = array();
-		$resIdProjetMantis = db_query_params('SELECT * FROM plugin_mantisbt WHERE id_group = $1', array($groupId));
+		$resIdProjetMantis = db_query_params('SELECT * FROM plugin_mantisbt WHERE id_group = $1', array($group_id));
 		if (!$resIdProjetMantis) {
 			$group->setError('getMantisBTId::error '.db_error());
 			return $mantisbtConfArray;
@@ -508,6 +508,43 @@
 	}
 
 	/**
+	 * getAdminView - display the admin page
+	 * @return	bool	true only currently
+	 */
+	function getAdminView() {
+		global $gfplugins;
+		require_once $gfplugins.$this->name.'/www/admin/index.php';
+		return true;
+	}
+
+	/**
+	 * getSubMenu - display the submenu
+	 * @return	bool	true only currently
+	 */
+	function getSubMenu() {
+		global $HTML;
+		global $group_id;
+		global $user;
+		$group = group_get_object($group_id);
+		// submenu
+		$labelTitle = array();
+		$labelTitle[] = _('Roadmap');
+		$labelTitle[] = _('Tickets');
+		$labelPage = array();
+		$labelPage[] = "/plugins/mantisbt/?type=group&group_id=".$group_id."&pluginname=".$this->name."&view=roadmap";
+		$labelPage[] = "/plugins/mantisbt/?type=group&group_id=".$group_id."&pluginname=".$this->name;
+		$userperm = $group->getPermission($user);
+		if ( $userperm->isAdmin() ) {
+			$labelTitle[] = _('Administration');
+			$labelPage[] = "/plugins/mantisbt/?type=admin&group_id=".$group_id."&pluginname=".$this->name;
+			$labelTitle[] = _('Statistics');
+			$labelPage[] = "/plugins/mantisbt/?type=admin&group_id=".$group_id."&pluginname=".$this->name."&view=stat";
+		}
+
+		echo $HTML->subMenu($labelTitle, $labelPage);
+	}
+
+	/**
 	 * getHeader - initialize header and js
 	 * @param	string	type : user, project (aka group)
 	 * @return	bool	success or not

Modified: trunk/src/plugins/mantisbt/www/admin/index.php
===================================================================
--- trunk/src/plugins/mantisbt/www/admin/index.php	2011-02-27 11:41:37 UTC (rev 12394)
+++ trunk/src/plugins/mantisbt/www/admin/index.php	2011-02-27 12:02:01 UTC (rev 12395)
@@ -1,7 +1,7 @@
 <?php
 /*
  * Admin MantisBT page
- * Copyright 2010, Franck Villaume - Capgemini
+ * Copyright 2010-2011, Franck Villaume - Capgemini
  * http://fusionforge.org
  *
  * This file is part of FusionForge.
@@ -21,38 +21,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-$action = getStringFromRequest('action');
+global $mantisbt;
+global $mantisbtConf;
+
 $view = getStringFromRequest('view');
 
-switch ($action) {
-	case "addCategory":
-	case "addVersion":
-	case "renameCategory":
-	case "deleteCategory":
-	case "deleteVersion":
-	case "updateVersion": {
-		include ("mantisbt/action/admin/$action.php");
-		break;
-	}
-}
+$mantisbt->getSubMenu();
 
-// submenu
-$labelTitle = array();
-$labelTitle[] = _('Roadmap');
-$labelTitle[] = _('Tickets');
-$labelPage = array();
-$labelPage[] = "/plugins/mantisbt/?type=group&id=".$id."&pluginname=".$pluginname."&view=roadmap";
-$labelPage[] = "/plugins/mantisbt/?type=group&id=".$id."&pluginname=".$pluginname;
-$userperm = $group->getPermission($user);
-if ( $userperm->isAdmin() ) {
-	$labelTitle[] = _('Administration');
-	$labelPage[] = "/plugins/mantisbt/?type=admin&id=".$id."&pluginname=".$pluginname;
-	$labelTitle[] = _('Statistics');
-	$labelPage[] = "/plugins/mantisbt/?type=admin&id=".$id."&pluginname=".$pluginname."&view=stat";
-}
-
-echo $HTML->subMenu($labelTitle, $labelPage);
-
 switch ($view) {
 	case "editVersion":
 	case "stat": {

Modified: trunk/src/plugins/mantisbt/www/group/index.php
===================================================================
--- trunk/src/plugins/mantisbt/www/group/index.php	2011-02-27 11:41:37 UTC (rev 12394)
+++ trunk/src/plugins/mantisbt/www/group/index.php	2011-02-27 12:02:01 UTC (rev 12395)
@@ -27,23 +27,8 @@
 global $group_id;
 global $gfplugins;
 
-// submenu
-$labelTitle = array();
-$labelTitle[] = _('Roadmap');
-$labelTitle[] = _('Tickets');
-$labelPage = array();
-$labelPage[] = "/plugins/".$mantisbt->name."/?type=group&group_id=".$group_id."&pluginname=".$mantisbt->name."&view=roadmap";
-$labelPage[] = "/plugins/".$mantisbt->name."/?type=group&group_id=".$group_id."&pluginname=".$mantisbt->name;
-$userperm = $group->getPermission($user);
-if ($userperm->isAdmin()) {
-	$labelTitle[] = _('Administration');
-	$labelPage[] = "/plugins/".$mantisbt->name."/?type=admin&group_id=".$group_id."&pluginname=".$mantisbt->name;
-	$labelTitle[] = _('Statistics');
-	$labelPage[] = "/plugins/".$mantisbt->name."/?type=admin&group_id=".$group_id."&pluginname=".$mantisbt->name."&view=stat";
-}
+$mantisbt->getSubMenu();
 
-echo $HTML->subMenu($labelTitle, $labelPage);
-
 // page a afficher
 switch ($view) {
 	case "editIssue":

Modified: trunk/src/plugins/mantisbt/www/index.php
===================================================================
--- trunk/src/plugins/mantisbt/www/index.php	2011-02-27 11:41:37 UTC (rev 12394)
+++ trunk/src/plugins/mantisbt/www/index.php	2011-02-27 12:02:01 UTC (rev 12395)
@@ -78,7 +78,7 @@
 			exit_permission_denied(_('You are not a member of this project'), 'home');
 		}
 
-		$mantisbtConf = $mantisbt->getMantisBTConf($group_id);
+		$mantisbtConf = $mantisbt->getMantisBTConf();
 
 		if ($mantisbtConf['id_mantisbt'] === 0) {
 			$warning_msg = _('The mantisbt plugin for this project is not initialized.');
@@ -181,7 +181,13 @@
 		}
 
 		switch ($action) {
-			case "init": {
+			case "init":
+			case "addCategory":
+			case "addVersion":
+			case "renameCategory":
+			case "deleteCategory":
+			case "deleteVersion":
+			case "updateVersion":  {
 				global $gfplugins;
 				include($gfplugins.$mantisbt->name.'/action/'.$action.'.php');
 				break;
@@ -196,6 +202,10 @@
 					$mantisbt->getInitDisplay();
 					break;
 				}
+				default: {
+					$mantisbt->getAdminView();
+					break;
+				}
 			}
 		} else {
 			exit_permission_denied(_('You are not Admin of this project'), 'home');




More information about the Fusionforge-commits mailing list