[Vtigercrm-commits] [vtiger-commits] r5545 - /vtigercrm/trunk/include/formbase.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Apr 27 23:28:22 EDT 2006


Author: saraj
Date: Thu Apr 27 21:28:18 2006
New Revision: 5545

Log:
logs entries inserted in all functions

Modified:
    vtigercrm/trunk/include/formbase.php

Modified: vtigercrm/trunk/include/formbase.php
==============================================================================
--- vtigercrm/trunk/include/formbase.php (original)
+++ vtigercrm/trunk/include/formbase.php Thu Apr 27 21:28:18 2006
@@ -22,14 +22,20 @@
  
  
 function checkRequired($prefix, $required){
+	global $log;
+	$log->debug("Entering checkRequired(".$prefix.",". $required.") method ...");
 	foreach($required as $key){
 		if(!isset($_POST[$prefix.$key]) ||empty($_POST[$prefix.$key])){
+			$log->debug("Exiting checkRequired method ...");
 			return false;	
 		}	
 	}
+	$log->debug("Exiting checkRequired method ...");
 	return true;
 }
 function populateFromPost($prefix, $focus){
+	global $log;
+	$log->debug("Entering populateFromPost(".$prefix.",". $focus.") method ...");
 	$focus->retrieve($_POST[$prefix.'record']);
 	 foreach($focus->column_fields as $field)
 		{
@@ -46,27 +52,33 @@
 				$focus->$field = $value;
 			}
 		}
+		$log->debug("Exiting populateFromPost method ...");
 		return $focus;
 
 }
 
 function getPostToForm(){
+	global $log;
+	$log->debug("Entering getPostToForm() method ...");
 	$fields = '';
 	foreach ($_POST as $key=>$value){
 		$fields.= "<input type='hidden' name='$key' value='$value'>";
 	}
+	$log->debug("Exiting getPostToForm method ...");
 	return $fields;
 	
 }
 
 function handleRedirect($return_id, $return_module){
+	global $log;
+	$log->debug("Entering handleRedirect(".$return_id.",". $return_module.") method ...");
 	if(isset($_POST['return_module']) && $_POST['return_module'] != "") $return_module = $_POST['return_module'];
 	else $return_module = $return_module;
 	if(isset($_POST['return_action']) && $_POST['return_action'] != "") $return_action = $_POST['return_action'];
 	else $return_action = "DetailView";
 	if(isset($_POST['return_id']) && $_POST['return_id'] != "") $return_id = $_POST['return_id'];
+	$log->debug("Exiting handleRedirect method ...");
 	header("Location: index.php?action=$return_action&module=$return_module&record=$return_id");
 }
 	
 
-?>





More information about the vtigercrm-commits mailing list