[Vtigercrm-commits] [vtiger-commits] r4578 - in /vtigercrm/trunk/include/utils: DetailViewUtils.php GetUserGroups.php InventoryUtils.php SearchUtils.php UserInfoUtil.php utils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue Mar 28 02:58:41 EST 2006


Author: saraj
Date: Tue Mar 28 00:58:32 2006
New Revision: 4578

Log:
removed commented code

Modified:
    vtigercrm/trunk/include/utils/DetailViewUtils.php
    vtigercrm/trunk/include/utils/GetUserGroups.php
    vtigercrm/trunk/include/utils/InventoryUtils.php
    vtigercrm/trunk/include/utils/SearchUtils.php
    vtigercrm/trunk/include/utils/UserInfoUtil.php
    vtigercrm/trunk/include/utils/utils.php

Modified: vtigercrm/trunk/include/utils/DetailViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/DetailViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/DetailViewUtils.php Tue Mar 28 00:58:32 2006
@@ -116,8 +116,6 @@
 			$account_name = getAccountName($account_id);
 		}
 		//Account Name View	
-		//$label_fld[] = $mod_strings[$fieldlabel];
-		//$label_fld[] ='<a href="index.php?module=Accounts&action=DetailView&record='.$account_id.'">'.$account_name.'</a>';
 		$label_fld[] = $mod_strings[$fieldlabel];
 		$label_fld[] = $account_name;
 		$label_fld["secid"] = $account_id;
@@ -231,7 +229,6 @@
           $label_fld[] = $contact_name;
 		$label_fld["secid"] = $contact_id;
 		$label_fld["link"] = "index.php?module=Contacts&action=DetailView&record=".$contact_id; 
-		//$label_fld[] ='<a href="index.php?module=Contacts&action=DetailView&record='.$contact_id.'">'.$contact_name.'</a>';
         }
 	elseif($uitype == 59)
 	{
@@ -244,7 +241,6 @@
 		$label_fld[] = $product_name;
 		$label_fld["secid"] = $product_id;
 		$label_fld["link"] = "index.php?module=Products&action=DetailView&record=".$product_id; 
-		//$label_fld[] ='<a href="index.php?module=Products&action=DetailView&record='.$product_id.'">'.$product_name.'</a>';
 		
 	}
         elseif($uitype == 61)
@@ -666,7 +662,6 @@
           $label_fld[] = $potential_name;
 		$label_fld["secid"] = $potential_id;
 		$label_fld["link"] = "index.php?module=Potentials&action=DetailView&record=".$potential_id; 
-		//$label_fld[] = '<a href="index.php?module=Potentials&action=DetailView&record='.$potential_id.'">'.$potential_name.'</a>';
         }
 	elseif($uitype == 78)
         {
@@ -679,7 +674,6 @@
           $label_fld[] = $quote_name;
 		$label_fld["secid"] = $quote_id;
 		$label_fld["link"] = "index.php?module=Quotes&action=DetailView&record=".$quote_id; 
-		//$label_fld[] = '<a href="index.php?module=Quotes&action=DetailView&record='.$quote_id.'">'.$quote_name.'</a>';
         }
 	elseif($uitype == 79)
         {
@@ -692,7 +686,6 @@
            $label_fld[] = $purchaseorder_name;
 		 $label_fld["secid"] = $purchaseorder_id;
 		 $label_fld["link"] = "index.php?module=PurchaseOrder&action=DetailView&record=".$purchaseorder_id; 
-		//$label_fld[] = '<a href="index.php?module=PurchaseOrder&action=DetailView&record='.$purchaseorder_id.'">'.$purchaseorder_name.'</a>';
         }
 	elseif($uitype == 80)
         {
@@ -705,7 +698,6 @@
           $label_fld[] = $salesorder_name;
 		$label_fld["secid"] = $salesorder_id;
 		$label_fld["link"] = "index.php?module=SalesOrder&action=DetailView&record=".$salesorder_id; 
-		//$label_fld[] = '<a href="index.php?module=SalesOrder&action=DetailView&record='.$salesorder_id.'">'.$salesorder_name.'</a>';
         }
 	elseif($uitype == 30)
 	{

Modified: vtigercrm/trunk/include/utils/GetUserGroups.php
==============================================================================
--- vtigercrm/trunk/include/utils/GetUserGroups.php (original)
+++ vtigercrm/trunk/include/utils/GetUserGroups.php Tue Mar 28 00:58:32 2006
@@ -41,11 +41,6 @@
 
 		//Setting the User Role
 		$userRole = fetchUserRole($userid);
-
-		//echo 'user2group Array<BR>';
-		//print_r($this->user_groups);
-		//echo 'user2group Array<BR>';
-
 		//Retreiving from the user2role
 		$query="select * from group2role where roleid='".$userRole."'";
                 $result = $adb->query($query);
@@ -68,14 +63,12 @@
 			$parentRolelist .= "'".$par_rol_id."',";		
 		}
 		$parentRolelist .= "'".$userRole."')";
-		//echo '<BR> '.$parentRolelist.'<BR>';		
 		$query="select * from group2rs where roleandsubid in".$parentRolelist;
                 $result = $adb->query($query);
                 $num_rows=$adb->num_rows($result);
                 for($i=0;$i<$num_rows;$i++)
                 {
                         $now_group_id=$adb->query_result($result,$i,'groupid');
-			//echo '<BR>    '.$now_group_id.'  <BR>';
  
 			if(! in_array($now_group_id,$this->user_groups))
 			{
@@ -85,12 +78,9 @@
                 }
 		foreach($this->user_groups as $grp_id)
 		{
-			//echo '<BR>'.$grp_id.'<BR>';
 			$focus = new GetParentGroups();
 			$focus->getAllParentGroups($grp_id);
 			
-			//print_r($focus->parent_groups);
-			//echo '<BR><BR>';
 			foreach($focus->parent_groups as $par_grp_id)
 			{
 				if(! in_array($par_grp_id,$this->user_groups))

Modified: vtigercrm/trunk/include/utils/InventoryUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/InventoryUtils.php (original)
+++ vtigercrm/trunk/include/utils/InventoryUtils.php Tue Mar 28 00:58:32 2006
@@ -47,7 +47,6 @@
 		$productBlock[] = Array('Product Details' => 'Product Details');
 		
 	}
-	//echo '<pre>';print_r($productBlock);echo '</pre>';
 	return $productBlock;
 }
 ?>

Modified: vtigercrm/trunk/include/utils/SearchUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/SearchUtils.php (original)
+++ vtigercrm/trunk/include/utils/SearchUtils.php Tue Mar 28 00:58:32 2006
@@ -333,11 +333,6 @@
                         $fieldcolname = $adb->query_result($result,$i,"columnname");
 			$fieldtype = explode("~",$fieldtype);
 			$fieldtypeofdata = $fieldtype[0];
-                        /*if($fieldcolname == "crmid" || $fieldcolname == "parent_id")
-                        {
-                           $fieldtablename = "crmentity";
-			   $fieldcolname = "setype";
-                        }*/
                         $fieldlabel = $adb->query_result($result,$i,"fieldlabel");
 				if($fieldlabel == "Related To")
 				{
@@ -351,7 +346,6 @@
 
                                 }
                         $fieldlabel1 = str_replace(" ","_",$fieldlabel);
-                        //$module_columnlist[$optionvalue] = $fieldlabel;
 			if ($i==0)
 			$OPTION_SET .= "<option value=\'".$fieldtablename.".".$fieldcolname."\' selected>".$fieldlabel."</option>";
 			else

Modified: vtigercrm/trunk/include/utils/UserInfoUtil.php
==============================================================================
--- vtigercrm/trunk/include/utils/UserInfoUtil.php (original)
+++ vtigercrm/trunk/include/utils/UserInfoUtil.php Tue Mar 28 00:58:32 2006
@@ -1646,8 +1646,6 @@
 		global $adb;
 		global $current_user;
 		$tabid = getTabid($module);
-		//echo "tab id is ".$tabid;
-		//echo '<BR>';
 		$actionid = getActionid($action);
 		$profile_id = fetchUserProfileId($user_id);
 		$tab_per_Data = getAllTabsPermission($profile_id);
@@ -1659,14 +1657,10 @@
 		//Checking whether this tab is allowed
 		if($tab_per_Data[$tabid] == 0)
 		{
-			//echo "inside tab permission success";
-			//echo '<BR>';
 			$permission = 'yes';
 			//Checking whether this action is allowed
 			if($permissionData[$tabid][$actionid] == 0)
 			{
-				//echo "inside action permission success";
-	                        //echo '<BR>';	
 				$permission = 'yes';
 				$rec_owner_id = '';
 				if($record_id != '' && $module != 'Notes' && $module != 'Products' && $module != 'Faq')
@@ -1676,10 +1670,6 @@
 
 				if($record_id != '' && $others_permission_id != '' && $module != 'Notes' && $module != 'Products' && $module != 'Faq' && $rec_owner_id != 0)
 				{
-					//echo "inside other permission success";
-                                	//echo '<BR>';
-					//Checking for Default Sharing Permission
-					//$rec_owner_id = getUserId($record_id);
 					if($rec_owner_id != $current_user->id)
 					{
 						if($others_permission_id == 0)

Modified: vtigercrm/trunk/include/utils/utils.php
==============================================================================
--- vtigercrm/trunk/include/utils/utils.php (original)
+++ vtigercrm/trunk/include/utils/utils.php Tue Mar 28 00:58:32 2006
@@ -127,7 +127,6 @@
 				if($private == 'private')
 				{
 					$log->debug("Sharing is Private. Only the current user should be listed");
-					//$query = "SELECT id, user_name from users WHERE id='$current_user->id' and status='$status'";
 					$query = "select id as id,user_name as user_name from users where id=".$current_user->id." and status='Active' union select user2role.userid as id,users.user_name as user_name from user2role inner join users on users.id=user2role.userid inner join role on role.roleid=user2role.roleid where role.parentrole like '".$current_user_parent_role_seq."::%' and status='Active' union select shareduserid as id,users.user_name as user_name from tmp_read_user_sharing_per inner join users on users.id=tmp_read_user_sharing_per.shareduserid where status='Active' and tmp_read_user_sharing_per.userid=".$current_user->id." and tmp_read_user_sharing_per.tabid=".getTabid($module);	
 						
 				}
@@ -143,7 +142,6 @@
 
 		$query .= " order by user_name ASC";
 
-		//$log->debug("get_user_array query: $query");
 		$result = $db->query($query, true, "Error filling in user array: ");
 
 		if ($add_blank==true){
@@ -282,7 +280,6 @@
 	if($currentModule == $module && isset($mod_strings) && $mod_strings != null)
 	{
 		// We should have already loaded the array.  return the current one.
-		//$log->fatal("module strings already loaded for language: ".$language." and module: ".$module);
 		return $mod_strings;
 	}
 
@@ -835,52 +832,6 @@
 	$result =$adb->query($query);
 	$actionname=$adb->query_result($result,0,"actionname");
 	return $actionname;
-	/*
-	$log->info("getActionName   ".$actionid);
-
-	$actionname = '';
-	if($actionid == 0)
-	{
-		$actionname= 'Save';
-	}
-	else if($actionid == 1)
-	{
-		$actionname= 'EditView';
-	}
-	else if($actionid == 2)
-	{
-		$actionname= 'Delete';
-	}
-	else if($actionid == 3)
-	{
-		$actionname= 'index';
-	}
-	else if($actionid == 4)
-	{
-		$actionname= 'DetailView';
-	}		
-	else if($actionid == 5)
-	{
-		$actionname= 'Import';
-	}
-	else if($actionid == 6)
-	{
-		$actionname= 'Export';
-	}
-	else if($actionid == 7)
-	{
-		$actionname= 'BusinessCard';
-	}
-	else if($actionid == 8)
-	{
-		$actionname= 'Merge';
-	}
-	else if($actionid == 9)
-	{
-		$actionname= 'ConvertLead';
-	}
-	return $actionname;
-	*/
 }
 
 
@@ -1096,8 +1047,6 @@
         {
                 $dat_fmt = 'dd-mm-yyyy';
         }
-	//echo $dat_fmt;
-	//echo '<BR>';
 	$insert_date='';
 	if($dat_fmt == 'dd-mm-yyyy')
 	{
@@ -1112,7 +1061,6 @@
 		list($y,$m,$d) = split('-',$value);
 	}
 		
-	//echo $display_date;
 	$insert_date=$y.'-'.$m.'-'.$d;
 	return $insert_date;
 }
@@ -1874,19 +1822,10 @@
         }
         else if($period=="tmon")
         {
-		/*$st_date=date("Y-m-d",mktime(0,0,0,date("n"),date("1"),date("Y")));
-                $end_date=date("Y-m-d",mktime(0,0,0,date("n"),date("j")+1,date("Y")));
-                $period_type="month";
-                $width="840";
-                $start_month=date("d",mktime(0,0,0,date("n"),date("j"),date("Y")));
-                if($start_month==1)
-                {
-                        $st_date=date("Y-m-d",mktime(0,0,0,date("n")-1,date("1"),date("Y")));
-                        $end_date = date("Y-m-d",mktime(0, 0, 1, date("n"), 0,date("Y")));
-                }*/
 		$period_type="month";
 		$width="840";
-		$st_date = date("Y-m-d",mktime(0, 0, 0, date("m"), "01",   date("Y")));							     $end_date = date("Y-m-t");
+		$st_date = date("Y-m-d",mktime(0, 0, 0, date("m"), "01",   date("Y")));	
+		$end_date = date("Y-m-t");
 
         }
         else if($period=="lmon")





More information about the vtigercrm-commits mailing list