[Fusionforge-commits] FusionForge branch Branch_5_3 updated. c33c1ef484089225525dfa7f5eac1a131a3e8221
Franck Villaume
nerville at fusionforge.org
Fri Mar 14 10:47:53 CET 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, Branch_5_3 has been updated
via c33c1ef484089225525dfa7f5eac1a131a3e8221 (commit)
from 4a6801d21336af2dccab3e0f852c17451495eb7a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c33c1ef484089225525dfa7f5eac1a131a3e8221
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date: Fri Mar 14 10:47:26 2014 +0100
extsubproj: display widget only if project uses this plugin
diff --git a/src/plugins/extsubproj/include/extsubprojPlugin.class.php b/src/plugins/extsubproj/include/extsubprojPlugin.class.php
index 4a8b79b..6920fbe 100644
--- a/src/plugins/extsubproj/include/extsubprojPlugin.class.php
+++ b/src/plugins/extsubproj/include/extsubprojPlugin.class.php
@@ -228,13 +228,13 @@ class extsubprojPlugin extends Plugin {
* @return boolean
*/
function widgets($params) {
- require_once 'common/widget/WidgetLayoutManager.class.php';
- if ($params['owner_type'] == WidgetLayoutManager::OWNER_TYPE_GROUP) {
- $params['fusionforge_widgets'][] = 'plugin_extsubproj_project_subprojects';
- }/*
- if ($params['owner_type'] == WidgetLayoutManager::OWNER_TYPE_USER) {
- $params['fusionforge_widgets'][] = 'plugin_scmgit_user_myrepositories';
- }*/
+ $group = group_get_object($GLOBALS['group_id']);
+ if ($group->usesPlugin($this->name)) {
+ require_once 'common/widget/WidgetLayoutManager.class.php';
+ if ($params['owner_type'] == WidgetLayoutManager::OWNER_TYPE_GROUP) {
+ $params['fusionforge_widgets'][] = 'plugin_extsubproj_project_subprojects';
+ }
+ }
return true;
}
-----------------------------------------------------------------------
Summary of changes:
.../extsubproj/include/extsubprojPlugin.class.php | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
hooks/post-receive
--
FusionForge
More information about the Fusionforge-commits
mailing list