[Fusionforge-commits] r17944 - in trunk/src: common/docman common/docman/include common/forum common/import common/include common/include/system common/survey common/tracker www/news www/pm www/pm/msproject

Marc-Etienne VARGENAU vargenau at fusionforge.org
Thu Sep 12 17:32:42 CEST 2013


Author: vargenau
Date: 2013-09-12 17:32:42 +0200 (Thu, 12 Sep 2013)
New Revision: 17944

Modified:
   trunk/src/common/docman/Parsedata.class.php
   trunk/src/common/docman/include/DocumentGroupHTML.class.php
   trunk/src/common/docman/include/webdav.php
   trunk/src/common/forum/ForumMessage.class.php
   trunk/src/common/import/import_tasks.php
   trunk/src/common/import/import_trackers.php
   trunk/src/common/include/Permission.class.php
   trunk/src/common/include/PluginManager.class.php
   trunk/src/common/include/Role.class.php
   trunk/src/common/include/UserManager.class.php
   trunk/src/common/include/system/LDAP.class.php
   trunk/src/common/include/system/pgsql.class.php
   trunk/src/common/survey/SurveyResponseFactory.class.php
   trunk/src/common/tracker/ArtifactsForUser.class.php
   trunk/src/www/news/news_utils.php
   trunk/src/www/pm/calendar.php
   trunk/src/www/pm/msproject/msp.php
Log:
Update PHP Doc

Modified: trunk/src/common/docman/Parsedata.class.php
===================================================================
--- trunk/src/common/docman/Parsedata.class.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/docman/Parsedata.class.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -33,7 +33,6 @@
 	/**
 	 * Constructor.
 	 *
-	 * @param	string	path to the parser list file
 	 * @return	\Parsedata
 	 */
 	function __construct() {

Modified: trunk/src/common/docman/include/DocumentGroupHTML.class.php
===================================================================
--- trunk/src/common/docman/include/DocumentGroupHTML.class.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/docman/include/DocumentGroupHTML.class.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -56,11 +56,11 @@
 	/**
 	 * showSelectNestedGroups - Display the tree of document groups inside a <select> tag
 	 *
-	 * @param	array	Array of groups.
-	 * @param	string	The name that will be assigned to the input
-	 * @param	bool	Allow selection of "None"
-	 * @param	int	The ID of the group that should be selected by default (if any)
-	 * @param	array	Array of IDs of groups that should not be displayed
+	 * @param	array	$group_arr		Array of groups.
+	 * @param	string	$select_name	The name that will be assigned to the input
+	 * @param	bool	$allow_none		Allow selection of "None"
+	 * @param	int		$selected_id	The ID of the group that should be selected by default (if any)
+	 * @param	array	$dont_display	Array of IDs of groups that should not be displayed
 	 * @return	string	html select box code
 	 */
 	function showSelectNestedGroups($group_arr, $select_name, $allow_none = true, $selected_id = 0, $dont_display = array()) {

Modified: trunk/src/common/docman/include/webdav.php
===================================================================
--- trunk/src/common/docman/include/webdav.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/docman/include/webdav.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -70,8 +70,8 @@
 	 * PROPFIND - use by any webdav client like cadaver
 	 * called by HTTP_WebDAV_Server
 	 *
-	 * @param	array	options passed by previous functions in HTTP_WebDAV_Server
-	 * @param	array	files passed by previous functions in HTTP_WebDAV_Server
+	 * @param	array	$options	options passed by previous functions in HTTP_WebDAV_Server
+	 * @param	array	$files		files passed by previous functions in HTTP_WebDAV_Server
 	 * @return bool
 	 */
 	function PROPFIND(&$options, &$files) {

Modified: trunk/src/common/forum/ForumMessage.class.php
===================================================================
--- trunk/src/common/forum/ForumMessage.class.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/forum/ForumMessage.class.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -48,13 +48,13 @@
 	/**
 	 *  Constructor.
 	 *
-	 *	@param	$Forum  object	The Forum object to which this ForumMessage is associated.
-	 *  @param  $msg_id int	 The message_id.
-	 *  @param  $arr	array   The associative array of data.
-	 *	@param 	$pending	boolean	Whether the message is a pending one.
-	 *	@return	boolean	success.
+	 *	@param	object	$Forum 		The Forum object to which this ForumMessage is associated.
+	 *  @param  int		$msg_id 	The message_id.
+	 *  @param  array	$arr		The associative array of data.
+	 *	@param 	bool	$pending	Whether the message is a pending one.
+	 *	@return	bool	success.
 	 */
-	function ForumMessage(&$Forum, $msg_id=false, $arr=false, $pending=false) {
+	function ForumMessage(&$Forum, $msg_id=false, $arr=array(), $pending=false) {
 		$this->Error();
 		if (!$Forum || !is_object($Forum)) {
 			$this->setError(_('Invalid Forum Object'));

Modified: trunk/src/common/import/import_tasks.php
===================================================================
--- trunk/src/common/import/import_tasks.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/import/import_tasks.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -30,8 +30,8 @@
 	}
 	/**
 	 * addComments - Add followup comments to an Artifact Object
-	 * @param $artifact the artifact object where history should be added
-	 * @param $comments array the artifact's data in json format (an array)
+	 * @param object	$artifact the artifact object where history should be added
+	 * @param array		$comments the artifact's data in json format (an array)
 	 */
 	function addComments($artifact, $comments){
 		foreach($comments as $c){
@@ -152,6 +152,7 @@
 	 * Create each task for the considered project group
 	 * @param $pg   ProjectGroup
 	 * @param $data    array
+	 * @param $cats
 	 * @return bool
 	 */
 	function createTasks($pg, $data, $cats){

Modified: trunk/src/common/import/import_trackers.php
===================================================================
--- trunk/src/common/import/import_trackers.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/import/import_trackers.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -21,7 +21,7 @@
  * findType - get the type of a field from its name, value, and vocabulary : default 0 (text box), otherwise 1 (select box) or 2 (multi choice field)
  * @param string        $fieldName Name of the field
  * @param string|array  $fieldValue Value of the field
- * @param $vocabulary	Vocabulary of a tracker
+ * @param string		$vocabulary	Vocabulary of a tracker
  * @return int
  */
 function findType($fieldName, $fieldValue, $vocabulary){

Modified: trunk/src/common/include/Permission.class.php
===================================================================
--- trunk/src/common/include/Permission.class.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/include/Permission.class.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -33,9 +33,8 @@
  * permission_get_object is useful so you can pool Permission objects/save database queries
  * You should always use this instead of instantiating the object directly
  *
- * @param		object	The Group in question
- * @param		object	The User needing Permission
- * @return a Permission or false on failure
+ * @param		$_Group object	The Group in question
+ * @return      object	a Permission or false on failure
  *
  */
 function &permission_get_object(&$_Group, &$_User = NULL) {

Modified: trunk/src/common/include/PluginManager.class.php
===================================================================
--- trunk/src/common/include/PluginManager.class.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/include/PluginManager.class.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -68,8 +68,8 @@
 	/**
 	 * GetPluginObject() - get a particular plugin object
 	 *
-	 * @param	string	name of plugin
-	 * @return	object	plugin object or false if not available
+	 * @param	string	$pluginname		name of plugin
+	 * @return	object					plugin object or false if not available
 	 */
 	function GetPluginObject($pluginname) {
 		if (!isset($this->plugins_objects[$pluginname])) {
@@ -211,7 +211,8 @@
 	 * RegisterPlugin() - register a plugin
 	 *
 	 * @param	object	an object of a subclass of the Plugin class
-	 */
+     * @return bool
+     */
 	function RegisterPlugin(&$pluginobject) {
 		if (!$pluginobject->GetName()) {
 			exit_error(_("Some plugin did not provide a name. I'd gladly tell you which one, but obviously I cannot. Sorry."),'');
@@ -316,6 +317,7 @@
  * register_plugin () - register a plugin
  *
  * @param pluginobject - an object of a subclass of the Plugin class
+ * @return bool
  */
 function register_plugin(&$pluginobject) {
 	$pm =& plugin_manager_get_object () ;
@@ -325,8 +327,9 @@
 /**
  * plugin_hook () - run a set of hooks
  *
- * @param hookname - name of the hook
- * @param params - parameters for the hook
+ * @param string $hookname - name of the hook
+ * @param array  $params - parameters for the hook
+ * @return bool
  */
 function plugin_hook($hookname, $params = false) {
 	$pm =& plugin_manager_get_object () ;
@@ -338,6 +341,7 @@
  *
  * @param hookname - name of the hook
  * @param params - parameters for the hook
+ * @return bool
  */
 function plugin_hook_by_reference ($hookname, &$params) {
 	$pm =& plugin_manager_get_object () ;
@@ -348,6 +352,7 @@
  * plugin_hook_listeners () - count the number of listeners on a hook
  *
  * @param hookname - name of the hook
+ * @return int
  */
 function plugin_hook_listeners ($hookname, $params=false) {
 	$pm =& plugin_manager_get_object () ;

Modified: trunk/src/common/include/Role.class.php
===================================================================
--- trunk/src/common/include/Role.class.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/include/Role.class.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -38,9 +38,10 @@
 	/**
 	 * Role($group,$id) - CONSTRUCTOR.
 	 *
-	 * @param	object	The Group object.
-	 * @param	int|bool	The role_id.
-	 */
+	 * @param	object		$group		The Group object.
+	 * @param	int|bool	$role_id	The role_id.
+     * @return	bool
+     */
 	function Role($Group, $role_id = false) {
 		$this->BaseRole();
 		if (!$Group || !is_object($Group) || $Group->isError()) {

Modified: trunk/src/common/include/UserManager.class.php
===================================================================
--- trunk/src/common/include/UserManager.class.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/include/UserManager.class.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -36,12 +36,12 @@
 	}
 
 	/**
-	 * @param $session_hash string Optional parameter. If given, this will force
+	 * @param string	$session_hash	Optional parameter. If given, this will force
 	 *                             the load of the user with the given session_hash.
 	 *                             else it will check from the user cookies & ip
-	 * @return User the user currently logged in (who made the request)
+	 * @return object	User the user currently logged in (who made the request)
 	 */
-	function getCurrentUser($session_hash = false) {
+	function getCurrentUser($session_hash = '') {
 		if (!session_get_user()) {
 			return new GFUser();
 		}

Modified: trunk/src/common/include/system/LDAP.class.php
===================================================================
--- trunk/src/common/include/system/LDAP.class.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/include/system/LDAP.class.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -64,7 +64,7 @@
 	/**
 	 * gfLdapConnect() - Connect to the LDAP server
 	 *
-	 * @returns true on success/false on error
+	 * @returns bool	true on success/false on error
 	 *
 	 */
 	function gfLdapConnect() {
@@ -344,9 +344,9 @@
 	/**
 	 * gfLdapCreateUserFromProps() - Creates an LDAP user from
 	 *
-	 * @param		string	The username
-	 * @param		string	????
-	 * @param		string	The encrypted password
+	 * @param		string	$username	The username
+	 * @param		string	$cn
+	 * @param		string	$crypt_pw	The encrypted password
 	 * @return bool	true on success/false on error
 	 *
 	 */

Modified: trunk/src/common/include/system/pgsql.class.php
===================================================================
--- trunk/src/common/include/system/pgsql.class.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/include/system/pgsql.class.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -61,7 +61,7 @@
 	/**
 	* sysUseUnixName() - Check if user/group used the unix_name
 	*
-	* @param	string	The unix_name to check
+	* @param	string	$unix_name	The unix_name to check
 	* @return	boolean	true if used/false is free
 	*/
 	function sysUseUnixName($unix_name) {

Modified: trunk/src/common/survey/SurveyResponseFactory.class.php
===================================================================
--- trunk/src/common/survey/SurveyResponseFactory.class.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/survey/SurveyResponseFactory.class.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -66,9 +66,8 @@
 	/**
 	 *  Constructor.
 	 *
-	 *	@param	object	The Survey object
-	 *	@param	object	The Question object to which this survey Response is associated.
-     *  @param  int     The survey_id
+	 *	@param	object	$survey		The Survey object
+	 *	@param	object	$question	The Question object to which this survey Response is associated.
 	 */
 	function __construct(&$Survey, &$Question ) {
 		$this->Error();

Modified: trunk/src/common/tracker/ArtifactsForUser.class.php
===================================================================
--- trunk/src/common/tracker/ArtifactsForUser.class.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/common/tracker/ArtifactsForUser.class.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -36,7 +36,7 @@
 	/**
 	* __construct - Creates a new ArtifactsForUser object
 	*
-	* @param User $user	the User object for which to collect artifacts
+	* @param object	$user	the User object for which to collect artifacts
 	*/
 	function __construct(&$user) {
 		$this->User =& $user;

Modified: trunk/src/www/news/news_utils.php
===================================================================
--- trunk/src/www/news/news_utils.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/www/news/news_utils.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -79,7 +79,7 @@
  * @param bool $show_forum
  * @return string
  */
-function news_show_latest($group_id='',$limit=10,$show_summaries=true,$allow_submit=true,$flat=false,$tail_headlines=0,$show_forum=true) {
+function news_show_latest($group_id=0,$limit=10,$show_summaries=true,$allow_submit=true,$flat=false,$tail_headlines=0,$show_forum=true) {
 
 	if (!$group_id) {
 		$group_id=forge_get_config('news_group');

Modified: trunk/src/www/pm/calendar.php
===================================================================
--- trunk/src/www/pm/calendar.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/www/pm/calendar.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -130,12 +130,11 @@
  * Create link to a task.
  * This returns a string that is a link to a particular task.
  *
- * @author    Ryan T. Sammartino <ryants at shaw dot ca>
- * @param     $task  the task to make a link for.
- * @param     $type  either 'begin' for beginning of a task or 'end' for
- *                   end of a task.
- * @return string
- * @date      2002-01-04
+ * @author  Ryan T. Sammartino <ryants at shaw dot ca>
+ * @param   object	$task  the task to make a link for.
+ * @param   string	$type  either 'begin' for beginning of a task or 'end' for end of a task.
+ * @return	string
+ * @date    2002-01-04
  *
  */
 function make_task_link($task, $type) {

Modified: trunk/src/www/pm/msproject/msp.php
===================================================================
--- trunk/src/www/pm/msproject/msp.php	2013-09-11 12:04:44 UTC (rev 17943)
+++ trunk/src/www/pm/msproject/msp.php	2013-09-12 15:32:42 UTC (rev 17944)
@@ -206,7 +206,7 @@
 * Return the projects by user.
 *
 * @author	Luis Hurtado	luis at gforgegroup.com
-* @param	$session_hash	User session
+* @param	object	$session_hash	User session
 * @return	array	Groups		User groups
 * @date		2005-01-19
 *




More information about the Fusionforge-commits mailing list