[Fusionforge-commits] r11540 - in trunk/src/common/docman: . views

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Mon Nov 15 19:07:55 CET 2010


Author: nerville
Date: 2010-11-15 19:07:55 +0100 (Mon, 15 Nov 2010)
New Revision: 11540

Modified:
   trunk/src/common/docman/Document.class.php
   trunk/src/common/docman/DocumentGroup.class.php
   trunk/src/common/docman/views/tree.php
Log:
clean-up

Modified: trunk/src/common/docman/Document.class.php
===================================================================
--- trunk/src/common/docman/Document.class.php	2010-11-14 21:42:40 UTC (rev 11539)
+++ trunk/src/common/docman/Document.class.php	2010-11-15 18:07:55 UTC (rev 11540)
@@ -43,6 +43,8 @@
 	 *
 	 * @var	 object  $Group.
 	 */
+	var	$Group;
+
 	/**
 	 * The Search engine path.
 	 *
@@ -103,9 +105,8 @@
 	 *	@param	string	The filename of this document. Can be a URL.
 	 *	@param	string	The filetype of this document. If filename is URL, this should be 'URL';
 	 *	@param	string	The contents of this document.
-	 *	@param	int	The doc_group id of the doc_groups table.
+	 *	@param	int		The doc_group id of the doc_groups table.
 	 *	@param	string	The title of this document.
-	 *	@param	int	The language id of the supported_languages table.
 	 *	@param	string	The description of this document.
 	 *	@return	boolean	success.
 	 */
@@ -208,7 +209,7 @@
 	/**
 	 *  fetchData() - re-fetch the data for this document from the database.
 	 *
-	 *  @param  int	 The document id.
+	 *  @param  int		The document id.
 	 *	@return	boolean	success
 	 */
 	function fetchData($docid) {
@@ -528,7 +529,7 @@
 	 *	removeMonitoredBy - remove this document for a specific user id for monitoring.
 	 *
 	 *	@param	int		User ID
-	 *	@return bool	true if success
+	 *	@return boolean	true if success
 	 */
 	function removeMonitoredBy($userid) {
 		$result = db_query_params('DELETE FROM docdata_monitored_docman WHERE doc_id=$1 AND user_id=$2',
@@ -545,7 +546,7 @@
 	 *	addMonitoredBy - add this document for a specific user id for monitoring.
 	 *
 	 *	@param	int		User ID
-	 *	@return bool	true if success
+	 *	@return boolean	true if success
 	 */
 	function addMonitoredBy($userid) {
 		$result = db_query_params('SELECT * FROM docdata_monitored_docman WHERE user_id=$1 AND doc_id=$2',
@@ -589,8 +590,9 @@
     /**
      *  setLock - set the locking status of the document
      *
-     *  @param  int The status of the lock
-     *  @param  int The userid who set the lock
+     *  @param  int		The status of the lock
+     *  @param  int		The userid who set the lock
+	 *  @param	time	the epoch time
      *  @return boolean success
      */
     function setLock($stateLock,$userid=NULL,$thistime=0) {
@@ -610,7 +612,6 @@
 			$this->setOnUpdateError(_('Document lock failed').' '.db_error());
 			return false;
 		}
-		$this->sendNotice(false);
         $this->data_array['locked'] = $stateLock;
         $this->data_array['locked_by'] = $userid;
         $this->data_array['lockdate'] = $thistime;

Modified: trunk/src/common/docman/DocumentGroup.class.php
===================================================================
--- trunk/src/common/docman/DocumentGroup.class.php	2010-11-14 21:42:40 UTC (rev 11539)
+++ trunk/src/common/docman/DocumentGroup.class.php	2010-11-15 18:07:55 UTC (rev 11540)
@@ -153,8 +153,8 @@
 	/**
 	 * delete - delete a DocumentGroup.
 	 *          delete is recursive and permanent
-	 * @param integer Document Group Id, integer Project Group Id
-	 * @return boolean
+	 * @param	int		Document Group Id, integer Project Group Id
+	 * @return	boolean	success
 	 */
 	function delete($doc_groupid,$project_group_id) {
 		$perm =& $this->Group->getPermission ();
@@ -194,7 +194,7 @@
 	 *	fetchData - re-fetch the data for this DocumentGroup from the database.
 	 *
 	 *	@param	int		ID of the doc_group.
-	 *	@return boolean.
+	 *	@return boolean	success
 	 */
 	function fetchData($id) {
 		$res = db_query_params ('SELECT * FROM doc_groups WHERE doc_group=$1',
@@ -311,9 +311,10 @@
 	* A group has associated documents if and only if there are documents associated to this
 	* group or to any of its childs
 	*
-	* @param array	Array of nested groups information, fetched from DocumentGroupFactory class
-	* @param object	The DocumentFactory object
-	* @param int	(optional) State of the documents
+	* @param	array	Array of nested groups information, fetched from DocumentGroupFactory class
+	* @param	object	The DocumentFactory object
+	* @param	int		(optional) State of the documents
+	* @return	boolean	success
 	*/
 	function hasDocuments(&$nested_groups, &$document_factory, $stateid=0) {
 		$doc_group_id = $this->getID();
@@ -355,8 +356,9 @@
 	/**
 	* hasSubgroup - Checks if this group has a specified subgroup associated to it
 	*
-	* @param array Array of nested groups information, fetched from DocumentGroupFactory class
-	* @param int	ID of the subgroup
+	* @param	array	Array of nested groups information, fetched from DocumentGroupFactory class
+	* @param	int		ID of the subgroup
+	* @return	boolean	success
 	*/
 	function hasSubgroup(&$nested_groups, $doc_subgroup_id) {
 		$doc_group_id = $this->getID();
@@ -375,14 +377,14 @@
 				}
 			}
 		}
-		
 		return false;
 	}
 
 	/**
 	 * setStateID - set the state id of this document group
 	 *
-	 * @param int State ID
+	 * @param	int		State ID
+	 * @return	boolean success
 	 */
 	function setStateID($stateid) {
 		$res = db_query_params ('UPDATE doc_groups SET stateid=$1

Modified: trunk/src/common/docman/views/tree.php
===================================================================
--- trunk/src/common/docman/views/tree.php	2010-11-14 21:42:40 UTC (rev 11539)
+++ trunk/src/common/docman/views/tree.php	2010-11-15 18:07:55 UTC (rev 11540)
@@ -29,8 +29,6 @@
 global $d_arr; // documents array
 global $group_id; // id of the group
 
-session_require_perm ('docman',$group_id,'read');
-
 echo '<h3>Document Tree</h3>';
 $nested_docs=array();
 $idExposeTreeIndex = 0;




More information about the Fusionforge-commits mailing list