[Fusionforge-commits] r15666 - trunk/src/common/docman

Franck VILLAUME nerville at fusionforge.org
Sun Jun 3 22:20:44 CEST 2012


Author: nerville
Date: 2012-06-03 22:20:43 +0200 (Sun, 03 Jun 2012)
New Revision: 15666

Modified:
   trunk/src/common/docman/Document.class.php
   trunk/src/common/docman/DocumentFactory.class.php
   trunk/src/common/docman/DocumentGroup.class.php
Log:
remove bad __ in function name

Modified: trunk/src/common/docman/Document.class.php
===================================================================
--- trunk/src/common/docman/Document.class.php	2012-06-03 18:09:07 UTC (rev 15665)
+++ trunk/src/common/docman/Document.class.php	2012-06-03 20:20:43 UTC (rev 15666)
@@ -579,7 +579,7 @@
 	 * @return	boolean	success or not.
 	 */
 	function setState($stateid) {
-		return $this->__setValueinDB('stateid', $stateid);
+		return $this->setValueinDB('stateid', $stateid);
 	}
 
 
@@ -590,7 +590,7 @@
 	 * @return	boolean	success or not.
 	 */
 	function setDocGroupID($newdocgroupid) {
-		return $this->__setValueinDB('doc_group', $newdocgroupid);
+		return $this->setValueinDB('doc_group', $newdocgroupid);
 	}
 
 	/**
@@ -930,14 +930,14 @@
 	}
 
 	/**
-	 * __setValueinDB - private function to update columns in db
+	 * setValueinDB - private function to update columns in db
 	 *
 	 * @param	string	the column to update
 	 * @param	int	the value to store
 	 * @return	boolean	success or not
 	 * @access	private
 	 */
-	private function __setValueinDB($column, $value) {
+	private function setValueinDB($column, $value) {
 		switch ($column) {
 			case "stateid":
 			case "doc_group": {

Modified: trunk/src/common/docman/DocumentFactory.class.php
===================================================================
--- trunk/src/common/docman/DocumentFactory.class.php	2012-06-03 18:09:07 UTC (rev 15665)
+++ trunk/src/common/docman/DocumentFactory.class.php	2012-06-03 20:20:43 UTC (rev 15666)
@@ -267,7 +267,7 @@
 	 */
 	function &getDocuments($nocache = 0) {
 		if (!$this->Documents || $nocache) {
-			$this->__getFromStorage();
+			$this->getFromStorage();
 		}
 
 		$return = array();
@@ -320,13 +320,13 @@
 	}
 
 	/**
-	 * __getFromStorage - Retrieve documents from storage (database for all informations).
+	 * getFromStorage - Retrieve documents from storage (database for all informations).
 	 * you can limit query to speed up: warning, once $this->documents is retrieve, it's cached.
 	 *
 	 * @return	boolean	success or not
 	 * @access	private
 	 */
-	private function __getFromStorage() {
+	private function getFromStorage() {
 		$this->Documents = array();
 		$qpa = db_construct_qpa();
 		$qpa = db_construct_qpa($qpa, 'SELECT * FROM docdata_vw WHERE group_id = $1 ',
@@ -354,7 +354,7 @@
 
 		$result = db_query_qpa($qpa);
 		if (!$result) {
-			$this->setError('__getFromStorage::'.db_error());
+			$this->setError('getFromStorage::'.db_error());
 			return false;
 		}
 

Modified: trunk/src/common/docman/DocumentGroup.class.php
===================================================================
--- trunk/src/common/docman/DocumentGroup.class.php	2012-06-03 18:09:07 UTC (rev 15665)
+++ trunk/src/common/docman/DocumentGroup.class.php	2012-06-03 20:20:43 UTC (rev 15666)
@@ -228,11 +228,11 @@
 
 		switch ($uploaded_data_type) {
 			case "application/zip": {
-				$returned = $this->__injectZip($uploaded_data);
+				$returned = $this->injectZip($uploaded_data);
 				break;
 			}
 			case "application/x-rar-compressed": {
-				$returned = $this->__injectRar($uploaded_data);
+				$returned = $this->injectRar($uploaded_data);
 				break;
 			}
 			default: {
@@ -575,7 +575,7 @@
 	 * @access	public
 	 */
 	function setStateID($stateid) {
-		return $this->__setValueinDB('stateid', $stateid);
+		return $this->setValueinDB('stateid', $stateid);
 	}
 
 	/**
@@ -586,23 +586,23 @@
 	 * @access	public
 	 */
 	function setParentDocGroupId($parentDocGroupId) {
-		return $this->__setValueinDB('parent_doc_group', $parentDocGroupId);
+		return $this->setValueinDB('parent_doc_group', $parentDocGroupId);
 	}
 
 	/**
-	 * __injectZip - private method to inject a zip archive tree and files
+	 * injectZip - private method to inject a zip archive tree and files
 	 *
 	 * @param	array	uploaded zip
 	 * @return	boolean	success or not
 	 * @access	private
 	 */
-	private function __injectZip($uploadedZip) {
+	private function injectZip($uploadedZip) {
 		$zip = new ZipArchive();
 		if ($zip->open($uploadedZip['tmp_name'])) {
 			$extractDir = forge_get_config('data_path').'/'.uniqid();
 			if ($zip->extractTo($extractDir)) {
 				$zip->close();
-				if ($this->__injectContent($extractDir)) {
+				if ($this->injectContent($extractDir)) {
 					rmdir($extractDir);
 					return true;
 				} else {
@@ -620,31 +620,31 @@
 	}
 
 	/**
-	 * __injectRar - private method to inject a rar archive tree and files
+	 * injectRar - private method to inject a rar archive tree and files
 	 *
 	 * @param	array	uploaded rar
 	 * @return	boolean	success or not
 	 * @access	private
 	 */
-	private function __injectRar($uploadedRar) {
+	private function injectRar($uploadedRar) {
 		return true;
 	}
 
 	/**
-	 * __injectContent - private method to inject a directory tree and files
+	 * injectContent - private method to inject a directory tree and files
 	 *
 	 * @param	string	the directory to inject
 	 * @return	boolean	success or not
 	 * @access	private
 	 */
-	private function __injectContent($directory) {
+	private function injectContent($directory) {
 		if (is_dir($directory)) {
 			$dir_arr = scandir($directory);
 			for ($i = 0; $i < count($dir_arr); $i++) {
 				if ($dir_arr[$i] != '.' && $dir_arr[$i] != '..') {
 					if (is_dir($directory.'/'.$dir_arr[$i])) {
 						if ($this->create($dir_arr[$i], $this->getID())) {
-							if (!$this->__injectContent($directory.'/'.$dir_arr[$i])) {
+							if (!$this->injectContent($directory.'/'.$dir_arr[$i])) {
 								$this->setError(_('Unable to open directory for inject into tree'));
 								return false;
 							} else {
@@ -676,14 +676,14 @@
 	}
 
 	/**
-	 * __setValueinDB - private function to update columns in db
+	 * setValueinDB - private function to update columns in db
 	 *
 	 * @param	string	the column to update
 	 * @param	int	the value to store
 	 * @return	boolean	success or not
 	 * @access	private
 	 */
-	private function __setValueinDB($column, $value) {
+	private function setValueinDB($column, $value) {
 		switch ($column) {
 			case "stateid":
 			case "parent_doc_group": {




More information about the Fusionforge-commits mailing list