[Fusionforge-commits] FusionForge branch master updated. f5011610a86cc106ee3f8c235118a1a5edd55fab

Franck Villaume nerville at fusionforge.org
Sun Apr 20 19:36:22 CEST 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, master has been updated
       via  f5011610a86cc106ee3f8c235118a1a5edd55fab (commit)
      from  e0aa6589cf44939ea6a561a984ce8abc179a7e0b (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 f5011610a86cc106ee3f8c235118a1a5edd55fab
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sun Apr 20 19:35:48 2014 +0200

    plugin hudson: remove useless var and file

diff --git a/src/plugins/hudson/include/hudsonPlugin.class.php b/src/plugins/hudson/include/hudsonPlugin.class.php
index 38e2ad8..b0324e3 100644
--- a/src/plugins/hudson/include/hudsonPlugin.class.php
+++ b/src/plugins/hudson/include/hudsonPlugin.class.php
@@ -59,7 +59,7 @@ class hudsonPlugin extends Plugin {
 // 		if ($hookname == "usermenu") {
 // 			$text = $this->text; // this is what shows in the tab
 // 			if ($G_SESSION->usesPlugin("hudson")) {
-// 				$param = '?type=user&id=' . $G_SESSION->getId()."&pluginname=".$this->name; // we indicate the part we're calling is the user one
+// 				$param = '?type=user&id=' . $G_SESSION->getId(); // we indicate the part we're calling is the user one
 // 				echo $HTML->PrintSubMenu(array($text), array('/plugins/hudson/index.php'.$param));
 // 			}
 // 		} elseif ($hookname == "groupmenu") {
@@ -77,7 +77,7 @@ class hudsonPlugin extends Plugin {
 			}
 			if ( $project->usesPlugin( $this->name )) {
 				$params['TITLES'][] = $this->text;
-				$params['DIRS'][] = '/plugins/hudson/index.php?group_id=' . $group_id . '&pluginname=' . $this->name; // we indicate the part we're calling is the project one
+				$params['DIRS'][] = '/plugins/hudson/?group_id=' . $group_id; // we indicate the part we're calling is the project one
 				$params['ADMIN'][] = '';
 				$params['TOOLTIPS'][] = _('Continuous Integration Scheduler');
 			}
diff --git a/src/plugins/hudson/www/admin/index.php b/src/plugins/hudson/www/admin/index.php
deleted file mode 100644
index 787349a..0000000
--- a/src/plugins/hudson/www/admin/index.php
+++ /dev/null
@@ -1,110 +0,0 @@
-<?php
-
-/*
- * Hudson plugin
- *
- * Daniel Perez <danielperez.arg at gmail.com>
- *
- * This is an example to watch things in action. You can obviously modify things and logic as you see fit
- */
-
-require_once '../../../env.inc.php';
-require_once $gfwww.'include/pre.php';
-require_once $gfconfig.'plugins/hudson/config.php';
-
-// the header that displays for the user portion of the plugin
-function hudson_Project_Header($params) {
-	global $DOCUMENT_ROOT,$HTML,$id;
-	$params['toptab']='hudson';
-	$params['group']=$id;
-	/*
-		Show horizontal links
-	*/
-	site_project_header($params);
-}
-
-// the header that displays for the project portion of the plugin
-function hudson_User_Header($params) {
-	global $DOCUMENT_ROOT,$HTML,$user_id;
-	$params['toptab']='hudson';
-	$params['user']=$user_id;
-	/*
-	 Show horizontal links
-	 */
-	site_user_header($params);
-}
-
-	$user = session_get_user(); // get the session user
-
-	if (!$user || !is_object($user) || $user->isError() || !$user->isActive()) {
-		exit_error("Invalid User", "Cannot Process your request for this user.");
-	}
-
-	$type = getStringFromRequest('type');
-	$id = getStringFromRequest('id');
-	$pluginname = getStringFromRequest('pluginname');
-
-	if (!$type) {
-		exit_error("Cannot Process your request","No TYPE specified"); // you can create items in Base.tab and customize this messages
-	} elseif (!$id) {
-		exit_error("Cannot Process your request","No ID specified");
-	} else {
-		if ($type == 'group') {
-			$group = group_get_object($id);
-			if ( !$group) {
-				exit_error("Invalid Project", "Inexistent Project");
-			}
-			if ( ! ($group->usesPlugin ( $pluginname )) ) {//check if the group has the Hudson plugin active
-				exit_error("Error", "First activate the $pluginname plugin through the Project's Admin Interface");
-			}
-			$userperm = $group->getPermission();//we'll check if the user belongs to the group (optional)
-			if ( !$userperm->IsMember()) {
-				exit_error("Access Denied", "You are not a member of this project");
-			}
-			// other perms checks here...
-			hudson_Project_Header(array('title'=>$pluginname . ' Project Plugin!','pagename'=>"$pluginname",'sectionvals'=>array(group_getname($id))));
-			// DO THE STUFF FOR THE PROJECT PART HERE
-			echo "We are in the Project Hudson plugin <br>";
-			echo "Greetings from planet " . $world; // $world comes from the config file in /etc
-		} elseif ($type == 'user') {
-			$realuser = user_get_object($id);//
-			if (!($realuser) || !($realuser->usesPlugin($pluginname))) {
-				exit_error("Error", "First activate the User's $pluginname plugin through Account Manteinance Page");
-			}
-			if ( (!$user) || ($user->getID() != $id)) { // if someone else tried to access the private Hudson part of this user
-				exit_error("Access Denied", "You cannot access other user's personal $pluginname");
-			}
-			hudson_User_Header(array('title'=>'My '.$pluginname,'pagename'=>"$pluginname",'sectionvals'=>array($realuser->getUnixName())));
-			// DO THE STUFF FOR THE USER PART HERE
-			echo "We are in the User Hudson plugin <br>";
-			echo "Greetings from planet " . $world; // $world comes from the config file in /etc
-		} elseif ($type == 'admin') {
-			$group = group_get_object($id);
-			if ( !$group) {
-				exit_error("Invalid Project", "Inexistent Project");
-			}
-			if ( ! ($group->usesPlugin ( $pluginname )) ) {//check if the group has the Hudson plugin active
-				exit_error("Error", "First activate the $pluginname plugin through the Project's Admin Interface");
-			}
-			$userperm = $group->getPermission();//we'll check if the user belongs to the group
-			if ( !$userperm->IsMember()) {
-				exit_error("Access Denied", "You are not a member of this project");
-			}
-			//only project admin can access here
-			if ( $userperm->isAdmin() ) {
-				hudson_Project_Header(array('title'=>$pluginname . ' Project Plugin!','pagename'=>"$pluginname",'sectionvals'=>array(group_getname($id))));
-				// DO THE STUFF FOR THE PROJECT ADMINISTRATION PART HERE
-				echo "We are in the Project Hudson plugin <font color=\"#ff0000\">ADMINISTRATION</font> <br>";
-				echo "Greetings from planet " . $world; // $world comes from the config file in /etc
-			} else {
-				exit_error("Access Denied", "You are not a project Admin");
-			}
-		}
-	}
-
-	site_project_footer();
-
-// Local Variables:
-// mode: php
-// c-file-style: "bsd"
-// End:

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

Summary of changes:
 src/plugins/hudson/include/hudsonPlugin.class.php |    4 +-
 src/plugins/hudson/www/admin/index.php            |  110 ---------------------
 2 files changed, 2 insertions(+), 112 deletions(-)
 delete mode 100644 src/plugins/hudson/www/admin/index.php


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list