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, master has been updated
       via  af9f886779c205f4f717e12c6c4d308bd64cf53a (commit)
      from  eac13f3235fbea820b925a3193796f16cc62d1fe (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=af9f886779c205f4f717e12c6c4d308bd64cf53a

commit af9f886779c205f4f717e12c6c4d308bd64cf53a
Author: Franck Villaume <franck.villa...@trivialdev.com>
Date:   Sat Sep 17 15:47:06 2016 +0200

    remove dead code, remove deprecated function call isProject, clean-up

diff --git a/src/common/include/Navigation.class.php 
b/src/common/include/Navigation.class.php
index 00a0217..1b7f53b 100644
--- a/src/common/include/Navigation.class.php
+++ b/src/common/include/Navigation.class.php
@@ -322,7 +322,7 @@ class Navigation extends FFError {
                                }
                        }
                        if ($project && is_object($project)) {
-                               if (!$project->isError() && 
$project->isProject()) {
+                               if (!$project->isError()) {
                                        $menu['titles'][] = 
$project->getPublicName();
                                        $menu['tooltips'][] = _('Project home 
page, widgets selected to follow specific items.');
                                        if (isset ($GLOBALS['sys_noforcetype']) 
&& $GLOBALS['sys_noforcetype']) {
@@ -365,9 +365,6 @@ class Navigation extends FFError {
                                //wasn't found or some other problem
                                return null;
                        }
-                       if (!$group->isProject()) {
-                               return null;
-                       }
 
                        $selected = 0;
 
diff --git a/src/plugins/contribtracker/common/ContribTrackerPlugin.class.php 
b/src/plugins/contribtracker/common/ContribTrackerPlugin.class.php
index d55a229..20f1448 100644
--- a/src/plugins/contribtracker/common/ContribTrackerPlugin.class.php
+++ b/src/plugins/contribtracker/common/ContribTrackerPlugin.class.php
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * ContribTrackerPlugin Class
  *
@@ -48,9 +47,6 @@ contributions, along with their authors.");
                        if ($project->isError()) {
                                return;
                        }
-                       if (!$project->isProject()) {
-                               return;
-                       }
                        if ( $project->usesPlugin ( $this->name ) ) {
                                $params['TITLES'][] = '<nobr>'._('Contribution 
tracker').'</nobr>' ;
                                $params['TOOLTIPS'][] = _('Follow the 
contributions by contributors to this project');
@@ -58,36 +54,6 @@ contributions, along with their authors.");
                                $params['ADMIN'][]='';
                        }
                        (($params['toptab'] == $this->name) ? 
$params['selected']=(count($params['TITLES'])-1) : '' );
-               } elseif ($hookname == "groupisactivecheckbox") {
-                       //Check if the group is active
-                       // this code creates the checkbox in the project edit 
public info page to activate/deactivate the plugin
-                       $group_id=$params['group'];
-                       $group = group_get_object($group_id);
-                       echo "<tr>";
-                       echo "<td>";
-                       echo ' <input type="CHECKBOX" 
name="use_contribtrackerplugin" value="1" ';
-                       // CHECKED OR UNCHECKED?
-                       if ( $group->usesPlugin ( $this->name ) ) {
-                               echo "CHECKED";
-                       }
-                       echo "><br/>";
-                       echo "</td>";
-                       echo "<td>";
-                       echo "<strong>";
-                       echo _('Use the Contribution Tracker plugin') ;
-                       echo "</strong>";
-                       echo "</td>";
-                       echo "</tr>";
-               } elseif ($hookname == "groupisactivecheckboxpost") {
-                       // this code actually activates/deactivates the plugin 
after the form was submitted in the project edit public info page
-                       $group_id=$params['group'];
-                       $group = group_get_object($group_id);
-                       $use_contribtrackerplugin = 
getStringFromRequest('use_contribtrackerplugin');
-                       if ( $use_contribtrackerplugin == 1 ) {
-                               $group->setPluginUse ( $this->name );
-                       } else {
-                               $group->setPluginUse ( $this->name, false );
-                       }
                } elseif ($hookname == "project_admin_plugins") {
                        // this displays the link in the project admin options 
page to its ContribTracker administration
                        $group_id = $params['group_id'];
@@ -173,10 +139,8 @@ contributions, along with their authors.");
                                echo '</div>';
                        }
                } elseif ($hookname == "site_admin_option_hook") {
-                       ?>
-                       <li><?php echo util_make_link 
('/plugins/'.$this->name.'/global_admin.php',
-                                               _('Edit actors and roles'). ' 
[' . _('Contribution tracker plugin') . ']'); ?></li>
-                       <?php
+                       echo html_e('li', array(),
+                                       
util_make_link('/plugins/'.$this->name.'/global_admin.php', _('Edit actors and 
roles'). ' [' . _('Contribution tracker plugin') . ']'));
                }
        }
 
diff --git a/src/plugins/helloworld/include/helloworldPlugin.class.php 
b/src/plugins/helloworld/include/helloworldPlugin.class.php
index fd23334..8f2098b 100644
--- a/src/plugins/helloworld/include/helloworldPlugin.class.php
+++ b/src/plugins/helloworld/include/helloworldPlugin.class.php
@@ -1,9 +1,7 @@
 <?php
-
 /**
  * helloworldPlugin Class
  *
- *
  * This file is part of FusionForge.
  *
  * FusionForge is free software; you can redistribute it and/or modify
@@ -55,45 +53,16 @@ class helloworldPlugin extends Plugin {
                        if ($project->isError()) {
                                return;
                        }
-                       if (!$project->isProject()) {
-                               return;
-                       }
                        if ( $project->usesPlugin ( $this->name ) ) {
                                $params['TITLES'][]=$this->text;
                                $params['DIRS'][]=util_make_url 
('/plugins/helloworld/index.php?type=group&id=' . $group_id . "&pluginname=" . 
$this->name) ; // we indicate the part we're calling is the project one
+                               $params['TOOLTIPS'][]='';
                        } else {
                                $params['TITLES'][]=$this->text." is [Off]";
                                $params['DIRS'][]='';
+                               $params['TOOLTIPS'][]='';
                        }
                        (($params['toptab'] == $this->name) ? 
$params['selected']=(count($params['TITLES'])-1) : '' );
-               } elseif ($hookname == "groupisactivecheckbox") {
-                       //Check if the group is active
-                       // this code creates the checkbox in the project edit 
public info page to activate/deactivate the plugin
-                       $group_id=$params['group'];
-                       $group = group_get_object($group_id);
-                       echo "<tr>";
-                       echo "<td>";
-                       echo ' <input type="checkbox" 
name="use_helloworldplugin" value="1" ';
-                       // checked or unchecked?
-                       if ( $group->usesPlugin ( $this->name ) ) {
-                               echo "checked";
-                       }
-                       echo " /><br/>";
-                       echo "</td>";
-                       echo "<td>";
-                       echo "<strong>Use ".$this->text." Plugin</strong>";
-                       echo "</td>";
-                       echo "</tr>";
-               } elseif ($hookname == "groupisactivecheckboxpost") {
-                       // this code actually activates/deactivates the plugin 
after the form was submitted in the project edit public info page
-                       $group_id=$params['group'];
-                       $group = group_get_object($group_id);
-                       $use_helloworldplugin = 
getStringFromRequest('use_helloworldplugin');
-                       if ( $use_helloworldplugin == 1 ) {
-                               $group->setPluginUse ( $this->name );
-                       } else {
-                               $group->setPluginUse ( $this->name, false );
-                       }
                } elseif ($hookname == "user_personal_links") {
                        // this displays the link in the user's profile page to 
it's personal HelloWorld (if you want other sto access it, youll have to change 
the permissions in the index.php
                        $userid = $params['user_id'];
diff --git a/src/plugins/hudson/include/hudsonPlugin.class.php 
b/src/plugins/hudson/include/hudsonPlugin.class.php
index cb09fed..f3208b3 100644
--- a/src/plugins/hudson/include/hudsonPlugin.class.php
+++ b/src/plugins/hudson/include/hudsonPlugin.class.php
@@ -77,9 +77,6 @@ control over it to the project administrator.");
                        if ($project->isError()) {
                                return;
                        }
-                       if (!$project->isProject()) {
-                               return;
-                       }
                        if ( $project->usesPlugin( $this->name )) {
                                $params['TITLES'][] = $this->text;
                                $params['DIRS'][] = 
'/plugins/hudson/?group_id=' . $group_id; // we indicate the part we're calling 
is the project one
diff --git a/src/plugins/mailman/include/mailmanPlugin.class.php 
b/src/plugins/mailman/include/mailmanPlugin.class.php
index 8546a60..2cfc60a 100644
--- a/src/plugins/mailman/include/mailmanPlugin.class.php
+++ b/src/plugins/mailman/include/mailmanPlugin.class.php
@@ -1,8 +1,10 @@
 <?php
-
 /**
  * mailmanPlugin class
  *
+ * Portions Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All 
rights reserved
+ * Portions Copyright 2010 (c) Mélanie Le Bail
+ * Copyright 2016, Franck Villaume - TrivialDev
  * This file is part of FusionForge.
  *
  * FusionForge is free software; you can redistribute it and/or modify
@@ -19,8 +21,6 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Portions Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All 
rights reserved
- * Portions Copyright 2010 (c) Mélanie Le Bail
  */
 
 require_once 'plugins_utils.php';
@@ -87,13 +87,16 @@ class mailmanPlugin extends Plugin {
                        if ($project->isError()) {
                                return;
                        }
-                       if (!$project->isProject()) {
-                               return;
-                       }
                        if ( $project->usesPlugin ( $this->name ) ) {
                                $params['TITLES'][]=$this->text;
-                               
$params['DIRS'][]='/plugins/mailman/index.php?group_id=' . $group_id . 
'&pluginname=' . $this->name; // we indicate the part we're calling is the 
project one
-                $params['ADMIN'][]='';
+                               $params['DIRS'][]='/plugins/mailman/?group_id=' 
. $group_id . '&pluginname=' . $this->name; // we indicate the part we're 
calling is the project one
+                               if (session_loggedin()) {
+                                       $userperm = $project->getPermission();
+                                       if ($userperm->isAdmin()) {
+                                               $params['ADMIN'][]='';
+                                       }
+                               }
+                               $params['TOOLTIPS'][] = NULL;
                        }
                        (($params['toptab'] == $this->name) ? 
$params['selected']=(count($params['TITLES'])-1) : '' );
                } elseif ($hookname == "groupisactivecheckbox") {
diff --git a/src/plugins/mantisbt/common/MantisBTPlugin.class.php 
b/src/plugins/mantisbt/common/MantisBTPlugin.class.php
index 45f9aba..2ce1e41 100644
--- a/src/plugins/mantisbt/common/MantisBTPlugin.class.php
+++ b/src/plugins/mantisbt/common/MantisBTPlugin.class.php
@@ -60,7 +60,7 @@ _('Use Mantis Bugtracker as another ticket management tool.');
                        case 'groupmenu': {
                                $group_id = $params['group'];
                                $project = group_get_object($group_id);
-                               if (!$project || !is_object($project) || 
$project->isError() || !$project->isProject()) {
+                               if (!$project || !is_object($project) || 
$project->isError()) {
                                        return;
                                }
                                if ($project->usesPlugin($this->name)) {
diff --git a/src/plugins/mediawiki/common/mediawikiPlugin.class.php 
b/src/plugins/mediawiki/common/mediawikiPlugin.class.php
index 23831e2..e8d32d6 100644
--- a/src/plugins/mediawiki/common/mediawikiPlugin.class.php
+++ b/src/plugins/mediawiki/common/mediawikiPlugin.class.php
@@ -91,13 +91,16 @@ _("This plugin allows each project to embed Mediawiki under 
a tab.");
                        if ($project->isError()) {
                                return;
                        }
-                       if (!$project->isProject()) {
-                               return;
-                       }
                        if ( $project->usesPlugin ( $this->name ) ) {
                                $params['TITLES'][]=$this->text;
                                
$params['DIRS'][]=util_make_url('/plugins/mediawiki/wiki/'.$project->getUnixName().'/index.php');
-                               $params['ADMIN'][] = 
util_make_url('/plugins/mediawiki/plugin_admin.php?group_id='.$project->getID());
+                               if (session_loggedin()) {
+                                       $user = session_get_user();
+                                       $userperm = $project->getPermission();
+                                       if ($userperm->isAdmin()) {
+                                               $params['ADMIN'][] = 
util_make_url('/plugins/mediawiki/plugin_admin.php?group_id='.$project->getID());
+                                       }
+                               }
                                $params['TOOLTIPS'][] = _('Mediawiki Space');
                        }
                        (($params['toptab'] == $this->name) ? 
$params['selected']=(count($params['TITLES'])-1) : '' );
@@ -109,9 +112,6 @@ _("This plugin allows each project to embed Mediawiki under 
a tab.");
                        if ($project->isError()) {
                                return;
                        }
-                       if (!$project->isProject()) {
-                               return;
-                       }
                        if ( $project->usesPlugin ( $this->name ) ) {
                                $params['result'] .= '<div 
class="public-area-box">';
                                $params['result'] .= 
util_make_link('/plugins/mediawiki/wiki/'.$project->getUnixName().'/index.php',
diff --git a/src/plugins/moinmoin/common/MoinMoinPlugin.class.php 
b/src/plugins/moinmoin/common/MoinMoinPlugin.class.php
index 921dcc0..fd59984 100644
--- a/src/plugins/moinmoin/common/MoinMoinPlugin.class.php
+++ b/src/plugins/moinmoin/common/MoinMoinPlugin.class.php
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * MoinMoinPlugin Class
  *
@@ -70,9 +69,6 @@ _("This plugin allows each project to embed MoinMoinWiki 
under a tab.");
                        if ($project->isError()) {
                                return;
                        }
-                       if (!$project->isProject()) {
-                               return;
-                       }
                        if ($project->usesPlugin($this->name)) {
                                $params['TITLES'][] = $this->text;
                                $params['DIRS'][] = $this->getWikiUrl($project);
@@ -87,32 +83,6 @@ _("This plugin allows each project to embed MoinMoinWiki 
under a tab.");
                                        $params['selected'] = 
array_search($this->text, $params['TITLES']);
                                }
                        }
-               } elseif ($hookname == "groupisactivecheckbox") {
-                       //Check if the group is active
-                       // this code creates the checkbox in the project edit 
public info page to activate/deactivate the plugin
-                       $group = group_get_object($group_id);
-                       echo "<tr>";
-                       echo "<td>";
-                       echo ' <input type="checkbox" name="use_moinmoinplugin" 
value="1" ';
-                       // checked or unchecked?
-                       if ( $group->usesPlugin ( $this->name ) ) {
-                               echo "checked";
-                       }
-                       echo " /><br/>";
-                       echo "</td>";
-                       echo "<td>";
-                       echo "<strong>Use ".$this->text." Plugin</strong>";
-                       echo "</td>";
-                       echo "</tr>";
-               } elseif ($hookname == "groupisactivecheckboxpost") {
-                       // this code actually activates/deactivates the plugin 
after the form was submitted in the project edit public info page
-                       $group = group_get_object($group_id);
-                       $use_moinmoinplugin = 
getStringFromRequest('use_moinmoinplugin');
-                       if ( $use_moinmoinplugin == 1 ) {
-                               $group->setPluginUse ( $this->name );
-                       } else {
-                               $group->setPluginUse ( $this->name, false );
-                       }
                } elseif ($hookname == "project_public_area") {
                        $project = group_get_object($group_id);
                        if (!$project || !is_object($project)) {
@@ -121,9 +91,6 @@ _("This plugin allows each project to embed MoinMoinWiki 
under a tab.");
                        if ($project->isError()) {
                                return;
                        }
-                       if (!$project->isProject()) {
-                               return;
-                       }
                        if ( $project->usesPlugin ( $this->name ) ) {
                                $params['result'] .= '<div 
class="public-area-box">';
                                $params['result'] .= 
util_make_link($this->getWikiUrl($project), html_image('ic/wiki20g.png', 20, 
20, array('alt' => 'Wiki')).'&nbsp;'.'MoinMoin', array(), true);
diff --git a/src/plugins/oauthprovider/include/oauthprovider_plugin.php 
b/src/plugins/oauthprovider/include/oauthprovider_plugin.php
index 73d53f0..20c5e6d 100644
--- a/src/plugins/oauthprovider/include/oauthprovider_plugin.php
+++ b/src/plugins/oauthprovider/include/oauthprovider_plugin.php
@@ -2,7 +2,7 @@
 /**
  * oauthproviderPlugin Class
  *
- * This file is (c) Copyright 2010, 2011 by Olivier BERGER, Madhumita DHAR, 
Institut TELECOM
+ * Copyright 2010, 2011 by Olivier BERGER, Madhumita DHAR, Institut TELECOM
  *
  * This file is part of FusionForge. FusionForge is free software;
  * you can redistribute it and/or modify it under the terms of the
@@ -23,8 +23,6 @@
 // will most probably not be set sufficient for the whole forge, but 
temporarily for one script, which will call
 // session_set_for_authplugin('oauthprovider');
 
-// TODO : fix missing copyright
-
 class oauthproviderPlugin extends ForgeAuthPlugin {
 
        public $oauth_token = null;
@@ -73,87 +71,17 @@ class oauthproviderPlugin extends ForgeAuthPlugin {
                        if ($project->isError()) {
                                return;
                        }
-                       if (!$project->isProject()) {
-                               return;
-                       }
                        if ( $project->usesPlugin ( $this->name ) ) {
                                $params['TITLES'][]=$this->text;
                                $params['DIRS'][]=util_make_url 
('/plugins/oauthprovider/index.php?type=group&id=' . $group_id) ; // we 
indicate the part we're calling is the project one
+                               $params['TOOLTIPS'][] = '';
                        } else {
                                $params['TITLES'][]=$this->text." is [Off]";
                                $params['DIRS'][]='';
+                               $params['TOOLTIPS'][] = '';
                        }
                        (($params['toptab'] == $this->name) ? 
$params['selected']=(count($params['TITLES'])-1) : '' );
        }
-       /*
-        * works with the function implementations in Plugin.class.php
-        * re-implementation below is redundant
-        *
-        function groupisactivecheckbox($params) {
-               //Check if the group is active
-                       // this code creates the checkbox in the project edit 
public info page to activate/deactivate the plugin
-                       $group_id=$params['group'];
-                       $group = group_get_object($group_id);
-                       echo "<tr>";
-                       echo "<td>";
-                       echo ' <input type="checkbox" 
name="use_oauthproviderplugin" value="1" ';
-                       // checked or unchecked?
-                       if ( $group->usesPlugin ( $this->name ) ) {
-                               echo "checked";
-                       }
-                       echo " /><br/>";
-                       echo "</td>";
-                       echo "<td>";
-                       echo "<strong>Use ".$this->text." Plugin</strong>";
-                       echo "</td>";
-                       echo "</tr>";
-       }
-       function groupisactivecheckboxpost($params) {
-                               global $use_oauthproviderplugin;
-
-       // this code actually activates/deactivates the plugin after the form 
was submitted in the project edit public info page
-                       $group_id=$params['group'];
-                       $group = group_get_object($group_id);
-                       $use_oauthproviderplugin = 
getStringFromRequest('use_oauthproviderplugin');
-                       if ( $use_oauthproviderplugin == 1 ) {
-                               $group->setPluginUse ( $this->name );
-                       } else {
-                               $group->setPluginUse ( $this->name, false );
-                       }
-       }
-       /*function userisactivecheckbox ($params) {
-               global $G_SESSION;
-               //Check if the group is active
-                       // this code creates the checkbox in the project edit 
public info page to activate/deactivate the plugin
-                       $userid = $params['user_id'];
-                       $user = user_get_object($userid);
-                       echo "<tr>";
-                       echo "<td>";
-                       echo ' <input type="checkbox" 
name="use_oauthproviderplugin" value="1" ';
-                       // checked or unchecked?
-                       if ( $user->usesPlugin ( $this->name ) ) {
-                               echo "checked";
-                       }
-                       echo " /><br/>";
-                       echo "</td>";
-                       echo "<td>";
-                       echo "<strong>Use ".$this->text." Plugin</strong>";
-                       echo "</td>";
-                       echo "</tr>";
-       }
-       function userisactivecheckboxpost($params) {
-                               global $use_oauthproviderplugin;
-
-       // this code actually activates/deactivates the plugin after the form 
was submitted in the project edit public info page
-                       $userid = $params['user_id'];
-                       $user = user_get_object($userid);
-                       $use_oauthproviderplugin = 
getStringFromPost('use_oauthproviderplugin');
-                       if ( $use_oauthproviderplugin == 1 ) {
-                               $user->setPluginUse ( $this->name );
-                       } else {
-                               $user->setPluginUse ( $this->name, false );
-                       }
-       }*/
 
        function user_personal_links($params) {
        // this displays the link in the user's profile page to it's personal 
oauthprovider (if you want other sto access it, youll have to change the 
permissions in the index.php
@@ -318,5 +246,4 @@ class oauthproviderPlugin extends ForgeAuthPlugin {
                        }
                }
        }
-
 }
diff --git a/src/plugins/oslc/include/oslcPlugin.class.php 
b/src/plugins/oslc/include/oslcPlugin.class.php
index 383670a..c890b7f 100644
--- a/src/plugins/oslc/include/oslcPlugin.class.php
+++ b/src/plugins/oslc/include/oslcPlugin.class.php
@@ -1,9 +1,8 @@
 <?php
-
 /**
  * oslcPlugin Class
  *
- *
+ * Copyright 2016, Franck Villaume - TrivialDev
  * This file is part of FusionForge.
  *
  * FusionForge is free software; you can redistribute it and/or modify
@@ -57,18 +56,25 @@ class oslcPlugin extends Plugin {
                        if ($project->isError()) {
                                return;
                        }
-                       if (!$project->isProject()) {
-                               return;
-                       }
                        if ( $project->usesPlugin ( $this->name ) ) {
                                $params['TITLES'][]=$this->text;
                                
$params['DIRS'][]=util_make_uri('/plugins/oslc/');
-                               $params['ADMIN'][]='';
+                               if (session_loggedin()) {
+                                       $userperm = $project->getPermission();
+                                       if ($userperm->isAdmin()) {
+                                               $params['ADMIN'][]='';
+                                       }
+                               }
                                $params['TOOLTIPS'][] = NULL;
                        } else {
                                $params['TITLES'][]=$this->text." is [Off]";
                                $params['DIRS'][]='';
-                               $params['ADMIN'][]='';
+                               if (session_loggedin()) {
+                                       $userperm = $project->getPermission();
+                                       if ($userperm->isAdmin()) {
+                                               $params['ADMIN'][]='';
+                                       }
+                               }
                                $params['TOOLTIPS'][] = NULL;
                        }
                        (($params['toptab'] == $this->name) ? 
$params['selected']=(count($params['TITLES'])-1) : '' );
diff --git a/src/plugins/projectimport/common/ProjectImportPlugin.class.php 
b/src/plugins/projectimport/common/ProjectImportPlugin.class.php
index b4dd4c5..b5dcd45 100644
--- a/src/plugins/projectimport/common/ProjectImportPlugin.class.php
+++ b/src/plugins/projectimport/common/ProjectImportPlugin.class.php
@@ -28,15 +28,6 @@ class ProjectImportPlugin extends Plugin {
                $this->name = "projectimport" ;
                $this->text = "Project import" ; // To show in the tabs, use...
                $this->hooks[] = "groupmenu" ;  // To put into the project tabs
-               /*
-               $this->hooks[] = "user_personal_links";//to make a link to the 
user's personal part of the plugin
-               $this->hooks[] = "usermenu" ;
-               $this->hooks[] = "groupisactivecheckbox" ; // The "use ..." 
checkbox in editgroupinfo
-               $this->hooks[] = "groupisactivecheckboxpost" ; //
-               $this->hooks[] = "userisactivecheckbox" ; // The "use ..." 
checkbox in user account
-               $this->hooks[] = "userisactivecheckboxpost" ; //
-               $this->hooks[] = "project_admin_plugins"; // to show up in the 
admin page fro group
-               */
                // The plugin has a link added to the Project administration 
part of site admin
                $this->hooks[] = "site_admin_project_maintenance_hook";
                $this->hooks[] = "site_admin_user_maintenance_hook";
@@ -44,14 +35,7 @@ class ProjectImportPlugin extends Plugin {
 
        function CallHook($hookname, &$params) {
                global $use_projectimportplugin,$G_SESSION,$HTML;
-               /*if ($hookname == "usermenu") {
-                       $text = $this->text; // this is what shows in the tab
-                       if ($G_SESSION->usesPlugin("projectimport")) {
-                               $param = '?type=user&id=' . $G_SESSION->getId() 
. "&pluginname=" . $this->name; // we indicate the part we're calling is the 
user one
-                               echo ' | ' . $HTML->PrintSubMenu (array ($text),
-                                                 array 
('/plugins/projectimport/index.php' . $param ));
-                       }
-               } else */ if ($hookname == "groupmenu") {
+               if ($hookname == "groupmenu") {
                        $group_id=$params['group'];
                        $project = group_get_object($group_id);
                        if (!$project || !is_object($project)) {
@@ -60,14 +44,11 @@ class ProjectImportPlugin extends Plugin {
                        if ($project->isError()) {
                                return;
                        }
-                       if (!$project->isProject()) {
-                               return;
-                       }
                        if ( $project->usesPlugin ( $this->name ) ) {
                                $params['TITLES'][]=$this->text;
                                $params['ADMIN'][] = NULL;
                                $params['TOOLTIPS'][] = NULL;
-                               $params['DIRS'][]=util_make_url 
('/plugins/projectimport/index.php?type=group&group_id=' . $group_id . 
"&pluginname=" . $this->name) ; // we indicate the part we're calling is the 
project one
+                               $params['DIRS'][]=util_make_url 
('/plugins/'.$this->name.'/?type=group&group_id=' . $group_id . "&pluginname=" 
. $this->name) ; // we indicate the part we're calling is the project one
                        } else {
                                $params['TITLES'][]=$this->text." is [Off]";
                                $params['ADMIN'][] = NULL;
@@ -75,93 +56,7 @@ class ProjectImportPlugin extends Plugin {
                                $params['DIRS'][]='';
                        }
                        (($params['toptab'] == $this->name) ? 
$params['selected']=(count($params['TITLES'])-1) : '' );
-               } /*elseif ($hookname == "groupisactivecheckbox") {
-                       //Check if the group is active
-                       // this code creates the checkbox in the project edit 
public info page to activate/deactivate the plugin
-                       $group_id=$params['group'];
-                       $group = group_get_object($group_id);
-                       echo "<tr>";
-                       echo "<td>";
-                       echo ' <input type="checkbox" 
name="use_projectimportplugin" value="1" ';
-                       // checked or unchecked?
-                       if ( $group->usesPlugin ( $this->name ) ) {
-                               echo "checked";
-                       }
-                       echo " /><br/>";
-                       echo "</td>";
-                       echo "<td>";
-                       echo "<strong>Use ".$this->text." Plugin</strong>";
-                       echo "</td>";
-                       echo "</tr>";
-               } elseif ($hookname == "groupisactivecheckboxpost") {
-                       // this code actually activates/deactivates the plugin 
after the form was submitted in the project edit public info page
-                       $group_id=$params['group'];
-                       $group = group_get_object($group_id);
-                       $use_projectimportplugin = 
getStringFromRequest('use_projectimportplugin');
-                       if ( $use_projectimportplugin == 1 ) {
-                               $group->setPluginUse ( $this->name );
-                       } else {
-                               $group->setPluginUse ( $this->name, false );
-                       }
-               } elseif ($hookname == "userisactivecheckbox") {
-                       //check if user is active
-                       // this code creates the checkbox in the user account 
manteinance page to activate/deactivate the plugin
-                       $user = $params['user'];
-                       echo "<tr>";
-                       echo "<td>";
-                       echo ' <input type="checkbox" 
name="use_projectimportplugin" value="1" ';
-                       // checked or unchecked?
-                       if ( $user->usesPlugin ( $this->name ) ) {
-                               echo "checked";
-                       }
-                       echo " />    Use ".$this->text." Plugin";
-                       echo "</td>";
-                       echo "</tr>";
-               } elseif ($hookname == "userisactivecheckboxpost") {
-                       // this code actually activates/deactivates the plugin 
after the form was submitted in the user account manteinance page
-                       $user = $params['user'];
-                       $use_projectimportplugin = 
getStringFromRequest('use_projectimportplugin');
-                       if ( $use_projectimportplugin == 1 ) {
-                               $user->setPluginUse ( $this->name );
-                       } else {
-                               $user->setPluginUse ( $this->name, false );
-                       }
-                       echo "<tr>";
-                       echo "<td>";
-                       echo ' <input type="checkbox" 
name="use_projectimportplugin" value="1" ';
-                       // checked or unchecked?
-                       if ( $user->usesPlugin ( $this->name ) ) {
-                               echo "checked";
-                       }
-                       echo " />    Use ".$this->text." Plugin";
-                       echo "</td>";
-                       echo "</tr>";
-               } elseif ($hookname == "user_personal_links") {
-                       // this displays the link in the user's profile page to 
it's personal ProjectImport (if you want other sto access it, youll have to 
change the permissions in the index.php
-                       $userid = $params['user_id'];
-                       $user = user_get_object($userid);
-                       $text = $params['text'];
-                       //check if the user has the plugin activated
-                       if ($user->usesPlugin($this->name)) {
-                               echo '  <p>' ;
-                               echo util_make_link 
("/plugins/projectimport/index.php?id=$userid&type=user&pluginname=".$this->name,
-                                                    _('View Personal 
ProjectImport')
-                                       );
-                               echo '</p>';
-                       }
-               } elseif ($hookname == "project_admin_plugins") {
-                       // this displays the link in the project admin options 
page to it's  ProjectImport administration
-                       $group_id = $params['group_id'];
-                       $group = group_get_object($group_id);
-                       if ( $group->usesPlugin ( $this->name ) ) {
-                               echo util_make_link 
("/plugins/projectimport/index.php?id=".$group->getID().'&type=admin&pluginname='.$this->name,
-                                                    _('View the ProjectImport 
Administration')).'<br />';
-                       }
-               }
-               elseif ($hookname == "blahblahblah") {
-                       // ...
                }
-               */
        }
 
        /**
diff --git a/src/plugins/projectlabels/common/ProjectLabelsPlugin.class.php 
b/src/plugins/projectlabels/common/ProjectLabelsPlugin.class.php
index c494152..351fd11 100644
--- a/src/plugins/projectlabels/common/ProjectLabelsPlugin.class.php
+++ b/src/plugins/projectlabels/common/ProjectLabelsPlugin.class.php
@@ -1,4 +1,25 @@
 <?php
+/**
+ * ProjectLabelsPlugin Class
+ *
+ * Copyright 2016, Franck Villaume - TrivialDev
+ *
+ * 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
 
 class ProjectLabelsPlugin extends Plugin {
        function __construct() {
@@ -13,11 +34,8 @@ for a “project of the month”.");
        }
 
        function CallHook($hookname, &$params) {
-               global $HTML;
-
                if ($hookname == "site_admin_option_hook") {
-                       echo '<li>' . util_make_link 
('/plugins/projectlabels/index.php',
-                                                     _('Project labels'). ' [' 
. _('Project labels plugin') . ']') . '</li>';
+                       echo html_e('li', array(), 
util_make_link('/plugins/'.$this->name.'/index.php', _('Project labels 
plugin')));
                } elseif ($hookname == "project_before_widgets") {
                        $group_id=$params['group_id'];
                        $project = group_get_object($group_id);
@@ -25,8 +43,6 @@ for a “project of the month”.");
                                return;
                        if ($project->isError())
                                return;
-                       if (!$project->isProject())
-                               return;
                        $res_tabs = db_query_params ('SELECT 
plugin_projectlabels_labels.label_text FROM plugin_projectlabels_labels, 
plugin_projectlabels_group_labels
                                              WHERE 
plugin_projectlabels_group_labels.group_id=$1 AND 
plugin_projectlabels_group_labels.label_id = 
plugin_projectlabels_labels.label_id',
                                                     array ($group_id));
diff --git a/src/plugins/soapadmin/include/soapadminPlugin.class.php 
b/src/plugins/soapadmin/include/soapadminPlugin.class.php
index 1be0210..d085406 100644
--- a/src/plugins/soapadmin/include/soapadminPlugin.class.php
+++ b/src/plugins/soapadmin/include/soapadminPlugin.class.php
@@ -1,9 +1,7 @@
 <?php
-
 /**
  * soapadminPlugin Class
  *
- *
  * This file is part of FusionForge.
  *
  * FusionForge is free software; you can redistribute it and/or modify
@@ -54,9 +52,6 @@ class soapadminPlugin extends Plugin {
                        if ($project->isError()) {
                                return;
                        }
-                       if (!$project->isProject()) {
-                               return;
-                       }
                        if ( $project->usesPlugin ( $this->name ) ) {
                                $params['TITLES'][]=$this->text;
                                $params['DIRS'][]=util_make_url 
('/plugins/soapadmin/index.php?type=group&id=' . $group_id . '&pluginname=' . 
$this->name) ; // we indicate the part we're calling is the project one
@@ -65,67 +60,6 @@ class soapadminPlugin extends Plugin {
                                $params['DIRS'][]='';
                        }
                        (($params['toptab'] == $this->name) ? 
$params['selected']=(count($params['TITLES'])-1) : '' );
-               } elseif ($hookname == "groupisactivecheckbox") {
-                       //Check if the group is active
-                       // this code creates the checkbox in the project edit 
public info page to activate/deactivate the plugin
-                       $group_id=$params['group'];
-                       $group = group_get_object($group_id);
-                       echo "<tr>";
-                       echo "<td>";
-                       echo ' <input type="checkbox" 
name="use_soapadminplugin" value="1" ';
-                       // checked or unchecked?
-                       if ( $group->usesPlugin ( $this->name ) ) {
-                               echo "checked";
-                       }
-                       echo " /><br/>";
-                       echo "</td>";
-                       echo "<td>";
-                       echo "<strong>Use ".$this->text." Plugin</strong>";
-                       echo "</td>";
-                       echo "</tr>";
-               } elseif ($hookname == "groupisactivecheckboxpost") {
-                       // this code actually activates/deactivates the plugin 
after the form was submitted in the project edit public info page
-                       $group_id=$params['group'];
-                       $group = group_get_object($group_id);
-                       $use_soapadminplugin = 
getStringFromRequest('use_soapadminplugin');
-                       if ( $use_soapadminplugin == 1 ) {
-                               $group->setPluginUse ( $this->name );
-                       } else {
-                               $group->setPluginUse ( $this->name, false );
-                       }
-               } elseif ($hookname == "userisactivecheckbox") {
-                       //check if user is active
-                       // this code creates the checkbox in the user account 
manteinance page to activate/deactivate the plugin
-                       $user = $params['user'];
-                       echo "<tr>";
-                       echo "<td>";
-                       echo ' <input type="checkbox" 
name="use_soapadminplugin" value="1" ';
-                       // checked or unchecked?
-                       if ( $user->usesPlugin ( $this->name ) ) {
-                               echo "checked";
-                       }
-                       echo " />    Use ".$this->text." Plugin";
-                       echo "</td>";
-                       echo "</tr>";
-               } elseif ($hookname == "userisactivecheckboxpost") {
-                       // this code actually activates/deactivates the plugin 
after the form was submitted in the user account manteinance page
-                       $user = $params['user'];
-                       $use_soapadminplugin = 
getStringFromRequest('use_soapadminplugin');
-                       if ( $use_soapadminplugin == 1 ) {
-                               $user->setPluginUse ( $this->name );
-                       } else {
-                               $user->setPluginUse ( $this->name, false );
-                       }
-                       echo "<tr>";
-                       echo "<td>";
-                       echo ' <input type="checkbox" 
name="use_soapadminplugin" value="1" ';
-                       // checked or unchecked?
-                       if ( $user->usesPlugin ( $this->name ) ) {
-                               echo "checked";
-                       }
-                       echo " />    Use ".$this->text." Plugin";
-                       echo "</td>";
-                       echo "</tr>";
                } elseif ($hookname == "user_personal_links") {
                        // this displays the link in the user's profile page to 
it's personal SoapAdmin (if you want other sto access it, youll have to change 
the permissions in the index.php
                        $userid = $params['user_id'];
@@ -148,9 +82,6 @@ class soapadminPlugin extends Plugin {
                                                     _('SoapAdmin 
Admin')).'</p>' ;
                        }
                }
-               elseif ($hookname == "blahblahblah") {
-                       // ...
-               }
        }
 }
 
diff --git a/src/plugins/taskboard/common/TaskBoardPlugin.class.php 
b/src/plugins/taskboard/common/TaskBoardPlugin.class.php
index 6343fdb..d05a386 100644
--- a/src/plugins/taskboard/common/TaskBoardPlugin.class.php
+++ b/src/plugins/taskboard/common/TaskBoardPlugin.class.php
@@ -50,8 +50,6 @@ _('Agile TaskBoard: Supports Scrum and Kanban 
methodologies.');
                                return;
                        if ($group->isError())
                                return;
-                       if (!$group->isProject())
-                               return;
 
                        if($group->usesPlugin($this->name)) {
                                $params['TITLES'][] = $this->text;
diff --git a/src/plugins/wiki/common/WikiPlugin.class.php 
b/src/plugins/wiki/common/WikiPlugin.class.php
index 64951f1..0a9ca61 100644
--- a/src/plugins/wiki/common/WikiPlugin.class.php
+++ b/src/plugins/wiki/common/WikiPlugin.class.php
@@ -57,11 +57,10 @@ page edits displayed on activity tab, and multi-project 
wiki preferences.");
                                return;
                        if ($project->isError())
                                return;
-                       if (!$project->isProject())
-                               return;
                        if ($project->usesPlugin($this->name)) {
                                $params['TITLES'][]=$this->text;
                                
$params['DIRS'][]='/wiki/g/'.$project->getUnixName().'/HomePage';
+                               $params['TOOLTIPS'][] = null;
                        } else {
                                $this->hooks["groupmenu"] = "";
                                //$params['TITLES'][]=$this->text." [Off]";

-----------------------------------------------------------------------

Summary of changes:
 src/common/include/Navigation.class.php            |   5 +-
 .../common/ContribTrackerPlugin.class.php          |  40 +-------
 .../helloworld/include/helloworldPlugin.class.php  |  35 +------
 src/plugins/hudson/include/hudsonPlugin.class.php  |   3 -
 .../mailman/include/mailmanPlugin.class.php        |  19 ++--
 .../mantisbt/common/MantisBTPlugin.class.php       |   2 +-
 .../mediawiki/common/mediawikiPlugin.class.php     |  14 +--
 .../moinmoin/common/MoinMoinPlugin.class.php       |  33 -------
 .../oauthprovider/include/oauthprovider_plugin.php |  79 +--------------
 src/plugins/oslc/include/oslcPlugin.class.php      |  20 ++--
 .../common/ProjectImportPlugin.class.php           | 109 +--------------------
 .../common/ProjectLabelsPlugin.class.php           |  28 ++++--
 .../soapadmin/include/soapadminPlugin.class.php    |  69 -------------
 .../taskboard/common/TaskBoardPlugin.class.php     |   2 -
 src/plugins/wiki/common/WikiPlugin.class.php       |   3 +-
 15 files changed, 65 insertions(+), 396 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
Fusionforge-commits@lists.fusionforge.org
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to