[Fusionforge-commits] FusionForge branch Branch_5_3 updated. 3316f7d4e9a0eb5c1ba1980f6bf910c7652c3aa3

Franck VILLAUME nerville at fusionforge.org
Thu Jan 23 11:32:29 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  3316f7d4e9a0eb5c1ba1980f6bf910c7652c3aa3 (commit)
      from  6aa3d99fbf63d5ddc0a53a8cc0882b2ada688640 (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 3316f7d4e9a0eb5c1ba1980f6bf910c7652c3aa3
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Thu Jan 23 11:31:00 2014 +0100

    indent

diff --git a/src/common/include/AuthPlugin.class.php b/src/common/include/AuthPlugin.class.php
index 1d2923c..0445e2c 100644
--- a/src/common/include/AuthPlugin.class.php
+++ b/src/common/include/AuthPlugin.class.php
@@ -102,8 +102,8 @@ abstract class ForgeAuthPlugin extends Plugin {
 	/**
 	 * Is there a valid session?
 	 *
-	 * @param unknown_type $params
-	 * @return FORGE_AUTH_AUTHORITATIVE_ACCEPT, FORGE_AUTH_AUTHORITATIVE_REJECT or FORGE_AUTH_NOT_AUTHORITATIVE
+	 * @param	array	$params
+	 * @return	FORGE_AUTH_AUTHORITATIVE_ACCEPT, FORGE_AUTH_AUTHORITATIVE_REJECT or FORGE_AUTH_NOT_AUTHORITATIVE
 	 * TODO : document 'auth_token' param
 	 */
 	function checkAuthSession(&$params) {
@@ -135,8 +135,8 @@ abstract class ForgeAuthPlugin extends Plugin {
 	 *
 	 * This will generate a valid forge user (by default, it was generated and cached already in saved_user)
 	 *
-	 * @param unknown_type $params
-	 * @return array $params['results'] containing user object
+	 * @param	array	$params
+	 * @return	array	$params['results'] containing user object
 	 */
 	function fetchAuthUser(&$params) {
 		if ($this->saved_user && $this->isSufficient()) {
@@ -146,7 +146,7 @@ abstract class ForgeAuthPlugin extends Plugin {
 
 	/**
 	 * Terminate an authentication session
-	 * @param unknown_type $params
+	 * @param	array	$params
 	 */
 	function closeAuthSession($params) {
 		if ($this->isSufficient() || $this->isRequired()) {
@@ -156,7 +156,7 @@ abstract class ForgeAuthPlugin extends Plugin {
 
 	/**
 	 * Add new roles not necessarily stored in the database
-	 * @param unknown_type $params
+	 * @param	array	$params
 	 */
 	function getExtraRoles(&$params) {
 		// $params['new_roles'][] = RBACEngine::getInstance()->getRoleById(123);
@@ -164,7 +164,7 @@ abstract class ForgeAuthPlugin extends Plugin {
 
 	/**
 	 * Filter out unwanted roles
-	 * @param unknown_type $params
+	 * @param	array	$params
 	 */
 	function restrictRoles(&$params) {
 		// $params['dropped_roles'][] = RBACEngine::getInstance()->getRoleById(123);
@@ -177,7 +177,7 @@ abstract class ForgeAuthPlugin extends Plugin {
 	/**
 	 * Returns the session cookie name for the auth plugin (by default forge_session_AUTHPLUGINNAME)
 	 *
-	 * @return string
+	 * @return	string
 	 */
 	protected function getCookieName() {
 		if ($this->cookie_name) {
@@ -207,8 +207,9 @@ abstract class ForgeAuthPlugin extends Plugin {
 
 	/**
 	 * Start a new session for a user
-	 * @param string $username
-	 * @return boolean
+	 *
+	 * @param	string	$username
+	 * @return	boolean
 	 */
 	function startSession($username) {
 		if ($this->isSufficient() || $this->isRequired()) {
@@ -231,7 +232,7 @@ abstract class ForgeAuthPlugin extends Plugin {
 
 	/**
 	 * TODO: Enter description here ...
-	 * @return Ambigous <Ambigous, NULL, boolean>
+	 * @return	Ambigous	<Ambigous, NULL, boolean>
 	 */
 	public function isRequired() {
 		return forge_get_config('required', $this->name);
@@ -239,7 +240,7 @@ abstract class ForgeAuthPlugin extends Plugin {
 
 	/**
 	 * TODO: Enter description here ...
-	 * @return Ambigous <Ambigous, NULL, boolean>
+	 * @return	Ambigous	<Ambigous, NULL, boolean>
 	 */
 	public function isSufficient() {
 		return forge_get_config('sufficient', $this->name);
@@ -247,8 +248,8 @@ abstract class ForgeAuthPlugin extends Plugin {
 
 	/**
 	 * TODO: Enter description here ...
-	 * @param unknown_type $event
-	 * @return boolean
+	 * @param	unknown_type	$event
+	 * @return	boolean
 	 */
 	public function syncDataOn($event) {
 		$configval = forge_get_config('sync_data_on', $this->name);
diff --git a/src/common/include/RBAC.php b/src/common/include/RBAC.php
index c262ae0..dc0525e 100644
--- a/src/common/include/RBAC.php
+++ b/src/common/include/RBAC.php
@@ -255,8 +255,8 @@ abstract class BaseRole extends Error {
 	 *
 	 * If an update occurred and you need to access the updated info.
 	 *
-	 * @param		int		$role_id
-	 * @return		bool	success
+	 * @param	int	$role_id
+	 * @return	bool	success
 	 */
 	function fetchData($role_id) {
 		unset($this->data_array);
@@ -378,8 +378,11 @@ abstract class BaseRole extends Error {
 	}
 
 	/**
-	 * TODO: Enter description here ...
-	 * @return multitype:
+	 * getGlobalSettings - get the permissions for global settings
+	 *
+	 * The following sections are global : forge_admin, forge_stats, approve_projects, approve_news
+	 *
+	 * @return	array	array of permission for global settings
 	 */
 	function getGlobalSettings () {
 		$result = array();
@@ -401,9 +404,10 @@ abstract class BaseRole extends Error {
 	}
 
 	/**
-	 * TODO: Enter description here ...
-	 * @param  unknown_type   $section
-	 * @param  unknown_type   $reference
+	 * getSetting - TODO: Enter description here ...
+	 *
+	 * @param	string	$section
+	 * @param	unknown_type	$reference
 	 * @return number|boolean
 	 */
 	function getSetting($section, $reference) {
@@ -557,11 +561,11 @@ abstract class BaseRole extends Error {
 	}
 
 	/**
-	 *	getVal - get a value out of the array of settings for this role.
+	 * getVal - get a value out of the array of settings for this role.
 	 *
-	 *	@param	string	$section	The name of the role.
-	 *	@param	integer	$ref_id		The ref_id (ex: group_artifact_id, group_forum_id) for this item.
-	 *	@return integer	The value of this item.
+	 * @param	string	$section	The name of the role.
+	 * @param	integer	$ref_id		The ref_id (ex: group_artifact_id, group_forum_id) for this item.
+	 * @return integer	The value of this item.
 	 */
 	function getVal($section, $ref_id) {
 		if (!$ref_id) {
@@ -571,10 +575,10 @@ abstract class BaseRole extends Error {
 	}
 
 	/**
-	 *  &getRoleVals - get all the values and language text strings for this section.
+	 * &getRoleVals - get all the values and language text strings for this section.
 	 *
-	 *	@param	string	$section
-	 *  @return array	Assoc array of values for this section.
+	 * @param	string	$section
+	 * @return	array	Assoc array of values for this section.
 	 */
 	function &getRoleVals($section) {
 		global $role_vals, $rbac_permission_names;
@@ -738,12 +742,12 @@ abstract class BaseRole extends Error {
 	}
 
 	/**
-	 *	update - update a role in the database.
+	 * update - update a role in the database.
 	 *
-	 *	@param	string	$role_name		The name of the role.
-	 *	@param	array	$data			A multi-dimensional array of data in this format: $data['section_name']['ref_id']=$val
-	 *  @param  boolean $check_perms	Perform permission checking
-	 *	@return	boolean	True on success or false on failure.
+	 * @param	string	$role_name	The name of the role.
+	 * @param	array	$data		A multi-dimensional array of data in this format: $data['section_name']['ref_id']=$val
+	 * @param	boolean	$check_perms	Perform permission checking
+	 * @return	boolean	True on success or false on failure.
 	 */
 	function update($role_name,$data,$check_perms=true) {
 		global $SYS;
@@ -1218,10 +1222,10 @@ class RoleComparator {
 	}
 
 	/**
-	 * TODO: Enter description here ...
-	 * @param Role $a
-	 * @param Role $b
-	 * @return number
+	 * CompareNoRef - TODO: Enter description here ...
+	 * @param	Role	$a
+	 * @param	Role	$b
+	 * @return	number
 	 */
 	function CompareNoRef ($a, $b) {
 		$ap = $a->getHomeProject() ;
diff --git a/src/common/include/account.php b/src/common/include/account.php
index d2f2737..e525c90 100644
--- a/src/common/include/account.php
+++ b/src/common/include/account.php
@@ -25,8 +25,8 @@
 /**
  * account_pwvalid() - Validates a password
  *
- * @param		string	$pw	The plaintext password string
- * @return		bool	true on success/false on failure
+ * @param	string	$pw	The plaintext password string
+ * @return	bool	true on success/false on failure
  *
  */
 function account_pwvalid($pw) {
@@ -40,9 +40,9 @@ function account_pwvalid($pw) {
 /**
  * account_namevalid() - Validates a login username
  *
- * @param		string	$name	The username string
- * @param		bool	$unix	Check for an unix username
- * @return		bool	true on success/false on failure
+ * @param	string	$name	The username string
+ * @param	bool	$unix	Check for an unix username
+ * @return	bool	true on success/false on failure
  *
  */
 function account_namevalid($name, $unix=false) {
@@ -105,8 +105,8 @@ function account_namevalid($name, $unix=false) {
 /**
  * account_groupnamevalid() - Validates an account group name
  *
- * @param		string	$name	The group name string
- * @return		bool	true on success/false on failure
+ * @param	string	$name	The group name string
+ * @return	bool	true on success/false on failure
  *
  */
 function account_groupnamevalid($name) {
@@ -131,11 +131,11 @@ function account_groupnamevalid($name) {
 }
 
 /**
- * genchr() - Generate a random character
+ * genchr - Generate a random character
  *
  * This is a local function used for account_salt()
  *
- * @return int $num A random character
+ * @return	string	A random character
  *
  */
 function genchr(){
@@ -147,7 +147,7 @@ function genchr(){
 }
 
 /**
- * account_gensalt() - A random salt generator
+ * account_gensalt - A random salt generator
  *
  * @returns	string	The random salt string
  *
@@ -181,7 +181,7 @@ function account_gensalt(){
 }
 
 /**
- * account_genunixpw() - Generate unix password
+ * account_genunixpw - Generate unix password
  *
  * @param	string	$plainpw	The plaintext password string
  * @return	string	The encrypted password
@@ -199,8 +199,9 @@ function account_genunixpw($plainpw) {
 }
 
 /**
- * account_get_user_default_shell() - return default user shell
+ * account_get_user_default_shell - return default user shell
  *
+ * @return	string	the shell absolute path.
  */
 function account_get_user_default_shell() {
 	$user_default_shell = forge_get_config('user_default_shell');
@@ -212,8 +213,9 @@ function account_get_user_default_shell() {
 }
 
 /**
- * account_getavailableshells() - return available shells for the users
+ * account_getavailableshells - return available shells for the users
  *
+ * @return	array	Available shells
  */
 function account_getavailableshells($add_user_default_shell = TRUE) {
 	// we'd better use the shells defined inside the 'chroot' in /var/lib/gforge/chroot/etc/shells it it exists
@@ -247,10 +249,10 @@ function account_getavailableshells($add_user_default_shell = TRUE) {
 }
 
 /**
- * account_shellselects() - Print out shell selects
- *
- * @param	string	The current shell
+ * account_shellselects - Print out shell selects
  *
+ * @param	string	the current shell
+ * @return	string	HTML code options for a select tag
  */
 function account_shellselects($current) {
 	$html = '';
@@ -281,7 +283,7 @@ function account_shellselects($current) {
 }
 
 /**
- * account_user_homedir() - Returns full path of user home directory
+ * account_user_homedir - Returns full path of user home directory
  *
  * @param	string	The username
  * @return	string	home directory path
@@ -292,7 +294,7 @@ function account_user_homedir($user) {
 }
 
 /**
- * account_group_homedir() - Returns full path of group home directory
+ * account_group_homedir - Returns full path of group home directory
  *
  * @param	string	The group name
  * @return	string	home directory path
@@ -303,10 +305,10 @@ function account_group_homedir($group) {
 }
 
 /**
- * checkKeys() - Simple function that tries to check the validity of public ssh keys with a regexp.
+ * checkKeys - Simple function that tries to check the validity of public ssh keys with a regexp.
  * Exits with an error message if an invalid key is found.
  *
- * @param string $keys	A string with a set of keys to check. Each key is delimited by a carriage return.
+ * @param	string	$keys	A string with a set of keys to check. Each key is delimited by a carriage return.
  */
 function checkKeys($keys) {
 	$key = strtok($keys, "\n");

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

Summary of changes:
 src/common/include/AuthPlugin.class.php |   29 +++++++++---------
 src/common/include/RBAC.php             |   50 +++++++++++++++++--------------
 src/common/include/account.php          |   42 +++++++++++++-------------
 3 files changed, 64 insertions(+), 57 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list