[Fusionforge-commits] r12389 - trunk/src/plugins/mantisbt/common
Franck VILLAUME
nerville at fusionforge.org
Sat Feb 26 13:07:44 CET 2011
Author: nerville
Date: 2011-02-26 13:07:44 +0100 (Sat, 26 Feb 2011)
New Revision: 12389
Modified:
trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php
Log:
clean up
Modified: trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php
===================================================================
--- trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php 2011-02-26 12:00:12 UTC (rev 12388)
+++ trunk/src/plugins/mantisbt/common/MantisBTPlugin.class.php 2011-02-26 12:07:44 UTC (rev 12389)
@@ -445,7 +445,7 @@
return $returned;
}
- /*
+ /**
* __getDBType - return the type of DB used for mantisbt
*
* @return string type of the DB
@@ -497,12 +497,23 @@
return $mantisbtConfArray;
}
+ /**
+ * getInitDisplay - display the init page
+ * @return bool true only currently
+ */
function getInitDisplay() {
global $gfplugins;
require_once $gfplugins.$this->name.'/view/init.php';
+ return true;
}
+ /**
+ * getHeader - initialize header and js
+ * @param string type : user, project (aka group)
+ * @return bool success or not
+ */
function getHeader($type) {
+ $returned = false;
$params['toptab'] = $this->name;
html_use_tooltips();
use_javascript('scripts/MantisBTController.js');
@@ -514,21 +525,31 @@
$params['pagename'] = $this->name;
$params['sectionvals'] = array(group_getname($group_id));
site_project_header($params);
+ $returned = true;
break;
}
case 'user': {
global $user_id;
$params['user'] = $user_id;
site_user_header($params);
+ $returned = true;
break;
}
default: {
break;
}
}
-
+ return $returned;
}
+ /**
+ * initialize - initialize the mantisbt plugin
+ * create mantisbt project if needed
+ * save config in db
+ * @param int the group id
+ * @param array configuration array
+ * @return bool success or not
+ */
function initialize($group_id, $confArr) {
if ($confArr['mantisbtcreate']) {
$idProjectMantis = $this->addProjectMantis($group_id, $confArr);
More information about the Fusionforge-commits
mailing list