[Vtigercrm-commits] [vtiger-commits] r5372 - in /vtigercrm/trunk/modules: Accounts/ Activities/ Campaigns/ Contacts/ Faq/ HelpDesk/ Invoice/ Notes/ Potentials/ PriceBooks/ Products/ PurchaseOrder/ Quotes/ SalesOrder/ Vendors/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Apr 26 06:31:47 EDT 2006


Author: saraj
Date: Wed Apr 26 04:31:23 2006
New Revision: 5372

Log:
Search criteria and customview are retained after sorting in listview for all modules. Fixes #160and #180, and refs #160

Modified:
    vtigercrm/trunk/modules/Accounts/ListView.php
    vtigercrm/trunk/modules/Activities/ListView.php
    vtigercrm/trunk/modules/Campaigns/ListView.php
    vtigercrm/trunk/modules/Contacts/ListView.php
    vtigercrm/trunk/modules/Faq/ListView.php
    vtigercrm/trunk/modules/HelpDesk/ListView.php
    vtigercrm/trunk/modules/Invoice/ListView.php
    vtigercrm/trunk/modules/Notes/ListView.php
    vtigercrm/trunk/modules/Potentials/ListView.php
    vtigercrm/trunk/modules/PriceBooks/ListView.php
    vtigercrm/trunk/modules/Products/ListView.php
    vtigercrm/trunk/modules/PurchaseOrder/ListView.php
    vtigercrm/trunk/modules/Quotes/ListView.php
    vtigercrm/trunk/modules/SalesOrder/ListView.php
    vtigercrm/trunk/modules/Vendors/ListView.php

Modified: vtigercrm/trunk/modules/Accounts/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Accounts/ListView.php (original)
+++ vtigercrm/trunk/modules/Accounts/ListView.php Wed Apr 26 04:31:23 2006
@@ -63,10 +63,11 @@
 $smarty->assign("CHANGE_OWNER",getUserslist());
 if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
 {
-	$where = getWhereCondition($currentModule);
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
 	// we have a query
-	$url_string .="&query=true";
+	$url_string .="&query=true".$ustring;
 	$log->info("Here is the where clause for the list view: $where");
+				
 }
 if($viewid != 0)
 {

Modified: vtigercrm/trunk/modules/Activities/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Activities/ListView.php (original)
+++ vtigercrm/trunk/modules/Activities/ListView.php Wed Apr 26 04:31:23 2006
@@ -64,12 +64,11 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
 {
-	$where=getWhereCondition($currentModule);
+
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
 	// we have a query
-	$url_string .="&query=true";
-	
+	$url_string .="&query=true".$ustring;
 	$log->info("Here is the where clause for the list view: $where");
-
 }
 
 

Modified: vtigercrm/trunk/modules/Campaigns/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Campaigns/ListView.php (original)
+++ vtigercrm/trunk/modules/Campaigns/ListView.php Wed Apr 26 04:31:23 2006
@@ -49,16 +49,10 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
 {
-	$where=getWhereCondition($currentModule);
-	
-	$url_string .="&query=true";
-
-/*	if (isset($_REQUEST['campaignid'])) $campaignid = $_REQUEST['campaignid'];
-	if (isset($_REQUEST['campaignname'])) $campaignname = $_REQUEST['campaignname'];
-	if (isset($_REQUEST['campaigntype'])) $campaigntype = $_REQUEST['campaigntype'];
-	if (isset($_REQUEST['campaignstatus'])) $campaignstatus = $_REQUEST['campaignstatus'];
-	if (isset($_REQUEST['current_user_only'])) $current_user_only = $_REQUEST['current_user_only'];
-*/
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
+	// we have a query
+	$url_string .="&query=true".$ustring;
+	$log->info("Here is the where clause for the list view: $where");
 }
 
 //<<<<cutomview>>>>>>>

Modified: vtigercrm/trunk/modules/Contacts/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Contacts/ListView.php (original)
+++ vtigercrm/trunk/modules/Contacts/ListView.php Wed Apr 26 04:31:23 2006
@@ -54,11 +54,13 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
 {
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
 	// we have a query
-	$url_string .="&query=true";
-	$where=getWhereCondition($currentModule);
+	$url_string .="&query=true".$ustring;
+	$log->info("Here is the where clause for the list view: $where");
+				
 //Added for Custom Field Search
-$sql="select * from field where tablename='contactscf' order by fieldlabel";
+/*$sql="select * from field where tablename='contactscf' order by fieldlabel";
 $result=$adb->query($sql);
 for($i=0;$i<$adb->num_rows($result);$i++)
 {
@@ -81,8 +83,7 @@
 }
 //upto this added for Custom Field
 
-	$log->info("Here is the where clause for the list view: $where");
-
+*/
 }
 
 //<<<<cutomview>>>>>>>

Modified: vtigercrm/trunk/modules/Faq/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Faq/ListView.php (original)
+++ vtigercrm/trunk/modules/Faq/ListView.php Wed Apr 26 04:31:23 2006
@@ -71,7 +71,10 @@
 $list_query = getListQuery("Faq");
 if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
 {
-	$where=Search($currentModule);
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
+	// we have a query
+	$url_string .="&query=true".$ustring;
+	$log->info("Here is the where clause for the list view: $where");
 }
 if(isset($where) && $where != '')
 {

Modified: vtigercrm/trunk/modules/HelpDesk/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/HelpDesk/ListView.php (original)
+++ vtigercrm/trunk/modules/HelpDesk/ListView.php Wed Apr 26 04:31:23 2006
@@ -53,18 +53,11 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
 {
-	$where=Search($currentModule);
-	$url_string .="&query=true";
-
-	if (isset($_REQUEST['ticket_title'])) $name = $_REQUEST['ticket_title'];
-	if (isset($_REQUEST['ticket_id'])) $ticket_id_val = $_REQUEST['ticket_id'];
-	if (isset($_REQUEST['contact_name'])) $contact_name = $_REQUEST['contact_name'];
-	if (isset($_REQUEST['priority'])) $priority = $_REQUEST['priority'];
-	if (isset($_REQUEST['status'])) $status = $_REQUEST['status'];
-	if (isset($_REQUEST['category'])) $category = $_REQUEST['category'];
-	if (isset($_REQUEST['date'])) $date = $_REQUEST['date'];
-	if (isset($_REQUEST['current_user_only'])) $current_user_only = $_REQUEST['current_user_only'];
-
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
+	// we have a query
+	$url_string .="&query=true".$ustring;
+	$log->info("Here is the where clause for the list view: $where");
+				
 }
 
 //<<<<cutomview>>>>>>>

Modified: vtigercrm/trunk/modules/Invoice/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Invoice/ListView.php (original)
+++ vtigercrm/trunk/modules/Invoice/ListView.php Wed Apr 26 04:31:23 2006
@@ -54,11 +54,11 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
 {
-	$where=Search($currentModule);	
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
 	// we have a query
-	$url_string .="&query=true";
-
+	$url_string .="&query=true".$ustring;
 	$log->info("Here is the where clause for the list view: $where");
+				
 }
 
 //<<<<cutomview>>>>>>>

Modified: vtigercrm/trunk/modules/Notes/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Notes/ListView.php (original)
+++ vtigercrm/trunk/modules/Notes/ListView.php Wed Apr 26 04:31:23 2006
@@ -77,10 +77,9 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
 {
-	$where=Search($currentModule);
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
 	// we have a query
-	$url_string .="&query=true";
-	
+	$url_string .="&query=true".$ustring;
 	$log->info("Here is the where clause for the list view: $where");
 
 }

Modified: vtigercrm/trunk/modules/Potentials/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Potentials/ListView.php (original)
+++ vtigercrm/trunk/modules/Potentials/ListView.php Wed Apr 26 04:31:23 2006
@@ -56,15 +56,13 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
 {
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
 	// we have a query
-	$url_string .="&query=true";
-
-	//Call for search function - Jaguar
-	$where=Search($currentModule);
-
-
+	$url_string .="&query=true".$ustring;
+	$log->info("Here is the where clause for the list view: $where");
+				
 	//Added for Custom Field Search
-	$sql="select * from field where tablename='potentialscf' order by fieldlabel";
+/*	$sql="select * from field where tablename='potentialscf' order by fieldlabel";
 	$result=$adb->query($sql);
 	for($i=0;$i<$adb->num_rows($result);$i++)
 	{
@@ -86,8 +84,7 @@
 		}
 	}
 
-	$log->info("Here is the where clause for the list view: $where");
-
+*/
 }
 
 //<<<<cutomview>>>>>>>

Modified: vtigercrm/trunk/modules/PriceBooks/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/PriceBooks/ListView.php (original)
+++ vtigercrm/trunk/modules/PriceBooks/ListView.php Wed Apr 26 04:31:23 2006
@@ -52,14 +52,11 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] != '' && $_REQUEST['query'] == 'true')
 {
-	$where=Search($currentModule);
-	
-	$url_string .="&query=true";
-	if (isset($_REQUEST['bookname'])) $bookname = $_REQUEST['bookname'];
-        if (isset($_REQUEST['active'])) $active = $_REQUEST['active'];
-
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
+	// we have a query
+	$url_string .="&query=true".$ustring;
 	$log->info("Here is the where clause for the list view: $where");
-
+				
 }
 
 //<<<<cutomview>>>>>>>

Modified: vtigercrm/trunk/modules/Products/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Products/ListView.php (original)
+++ vtigercrm/trunk/modules/Products/ListView.php Wed Apr 26 04:31:23 2006
@@ -58,22 +58,10 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] != '' && $_REQUEST['query'] == 'true')
 {
-	$where=Search($currentModule);
-	
-	$url_string .="&query=true";
-	
-	if (isset($_REQUEST['productname'])) $productname = $_REQUEST['productname'];
-        if (isset($_REQUEST['productcode'])) $productcode = $_REQUEST['productcode'];
-        if (isset($_REQUEST['commissionrate'])) $commissionrate = $_REQUEST['commissionrate'];
-	if (isset($_REQUEST['qtyperunit'])) $qtyperunit = $_REQUEST['qtyperunit'];
-        if (isset($_REQUEST['unitprice'])) $unitprice = $_REQUEST['unitprice'];
-        if (isset($_REQUEST['manufacturer'])) $manufacturer = $_REQUEST['manufacturer'];
-        if (isset($_REQUEST['productcategory'])) $productcategory = $_REQUEST['productcategory'];
-	if (isset($_REQUEST['start_date'])) $start_date = $_REQUEST['start_date'];
-        if (isset($_REQUEST['expiry_date'])) $expiry_date = $_REQUEST['expiry_date'];
-        if (isset($_REQUEST['purchase_date'])) $purchase_date = $_REQUEST['purchase_date'];
-
-	$log->info("Here is the where clause for the list view: $where");
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
+        // we have a query
+        $url_string .="&query=true".$ustring;
+        $log->info("Here is the where clause for the list view: $where");
 }
 
 //<<<<cutomview>>>>>>>

Modified: vtigercrm/trunk/modules/PurchaseOrder/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/PurchaseOrder/ListView.php (original)
+++ vtigercrm/trunk/modules/PurchaseOrder/ListView.php Wed Apr 26 04:31:23 2006
@@ -54,11 +54,9 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
 {
-	$where=Search($currentModule);
-
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
 	// we have a query
-	$url_string .="&query=true";
-
+	$url_string .="&query=true".$ustring;
 	$log->info("Here is the where clause for the list view: $where");
 }
 

Modified: vtigercrm/trunk/modules/Quotes/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Quotes/ListView.php (original)
+++ vtigercrm/trunk/modules/Quotes/ListView.php Wed Apr 26 04:31:23 2006
@@ -54,16 +54,9 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true')
 {
-	$where=Search($currentModule);
-
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
 	// we have a query
-	$url_string .="&query=true";
-	
-	if (isset($_REQUEST['subject'])) $subject = $_REQUEST['subject'];
-	if (isset($_REQUEST['potentialname'])) $potentialname = $_REQUEST['potentialname'];
-	if (isset($_REQUEST['quotestage'])) $quotestage = $_REQUEST['quotestage'];
-	if (isset($_REQUEST['accountname'])) $accountname = $_REQUEST['accountname'];
-	
+	$url_string .="&query=true".$ustring;
 	$log->info("Here is the where clause for the list view: $where");
 
 }

Modified: vtigercrm/trunk/modules/SalesOrder/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/ListView.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/ListView.php Wed Apr 26 04:31:23 2006
@@ -52,10 +52,13 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] != '' && $_REQUEST['query'] == 'true')
 {
-	$where=Search($currentModule);
+
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
+	// we have a query
+	$url_string .="&query=true".$ustring;
+	$log->info("Here is the where clause for the list view: $where");
 	
-	$url_string .="&query=true";
-	if (isset($_REQUEST['subject'])) $subject = $_REQUEST['subject'];
+/*	if (isset($_REQUEST['subject'])) $subject = $_REQUEST['subject'];
         if (isset($_REQUEST['accountname'])) $accountname = $_REQUEST['accountname'];
         if (isset($_REQUEST['quotename'])) $quotename = $_REQUEST['quotename'];
 
@@ -90,7 +93,7 @@
 		$where .= " and ";
 		$where .= $clause;
 	}
-
+*/
 	$log->info("Here is the where clause for the list view: $where");
  
 

Modified: vtigercrm/trunk/modules/Vendors/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Vendors/ListView.php (original)
+++ vtigercrm/trunk/modules/Vendors/ListView.php Wed Apr 26 04:31:23 2006
@@ -51,14 +51,9 @@
 
 if(isset($_REQUEST['query']) && $_REQUEST['query'] != '' && $_REQUEST['query'] == 'true')
 {
-	$where=Search($currentModule);
-	
-	$url_string .="&query=true";
-
-	if (isset($_REQUEST['vendorname'])) $vendorname = $_REQUEST['vendorname'];
-        if (isset($_REQUEST['email'])) $email = $_REQUEST['email'];
-        if (isset($_REQUEST['category'])) $category = $_REQUEST['category'];
-	
+	list($where, $ustring) = split("#@@#",getWhereCondition($currentModule));
+	// we have a query
+	$url_string .="&query=true".$ustring;
 	$log->info("Here is the where clause for the list view: $where");
 
 }





More information about the vtigercrm-commits mailing list