[Vtigercrm-commits] [vtiger-commits] r4027 - /vtigercrm/trunk/include/utils/CommonUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Mar 1 04:24:33 EST 2006


Author: saraj
Date: Wed Mar  1 02:24:29 2006
New Revision: 4027

Log:
function mkdirs added

Modified:
    vtigercrm/trunk/include/utils/CommonUtils.php

Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Wed Mar  1 02:24:29 2006
@@ -987,6 +987,9 @@
     return $update_info;
 }
 
+/**
+ * This function is used to get the Contact Images with the script for scrolling and the thumbnailview .
+ */
 
 function getContactImages($parenttab)
 {
@@ -1017,6 +1020,12 @@
 		return $imagelists;
 }
 
+/**
+ * This function is used to get the Product Images for the given Product  .
+ * It accepts the product id as argument and returns the Images with the script for 
+ * rotating the product Images
+ */
+
 function getProductImages($id)
 {
     global $adb;
@@ -1036,6 +1045,12 @@
 	if($imagename != '')
 		return $script;
 }	
+
+/**
+ * This function is used to save the Images .
+ * It acceps the File lists,modulename,id and the mode as arguments  
+ * It returns the array details of the upload
+ */
 
 function SaveImage($_FILES,$module,$id,$mode)
 {
@@ -1188,6 +1203,11 @@
 	}
 }
 
+/**
+ * This function is used get the User Count  .
+ * It returns the array which has the total users ,admin users,and the non admin users 
+ */
+
 function UserCount()
 {
 	global $adb;
@@ -1200,4 +1220,22 @@
 	return $count;
 }
 
+/**
+ * This function is used to create folders recursively   .
+ */
+
+function mkdirs($dir, $mode = 0777, $recursive = true)
+{
+	if( is_null($dir) || $dir === "" ){
+		return FALSE;
+	}
+	if( is_dir($dir) || $dir === "/" ){
+		return TRUE;
+	}
+	if( mkdirs(dirname($dir), $mode, $recursive) ){
+		return mkdir($dir, $mode);
+	}
+	return FALSE;
+}
+										    
 ?>





More information about the vtigercrm-commits mailing list