[Vtigercrm-commits] [vtiger-commits] r5370 - in /vtigercrm/trunk: include/utils/SearchUtils.php modules/Leads/ListView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Apr 26 05:57:21 EDT 2006
Author: saraj
Date: Wed Apr 26 03:57:11 2006
New Revision: 5370
Log:
Search criteria and customview are retained after sorting in listview. Fixes #160and #180, and refs #160
Modified:
vtigercrm/trunk/include/utils/SearchUtils.php
vtigercrm/trunk/modules/Leads/ListView.php
Modified: vtigercrm/trunk/include/utils/SearchUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/SearchUtils.php (original)
+++ vtigercrm/trunk/include/utils/SearchUtils.php Wed Apr 26 03:57:11 2006
@@ -182,7 +182,7 @@
function Search($module)
{
-
+ $url_string='';
if(isset($_REQUEST['search_field']) && $_REQUEST['search_field'] !="")
{
$search_column=$_REQUEST['search_field'];
@@ -207,8 +207,8 @@
else //Global Search
{
}
-
- return $where;
+ $url_string = "&search_field=".$search_column."&search_text=".$search_string."&searchtype=BasicSearch";
+ return $where."#@@#".$url_string;
}
}
@@ -410,14 +410,14 @@
if($_REQUEST['searchtype']=='advance')
{
$adv_string='';
+ $url_string='';
if(isset($_REQUEST['search_cnt']))
$tot_no_criteria = $_REQUEST['search_cnt'];
if($_REQUEST['matchtype'] == 'all')
$matchtype = "and";
else
$matchtype = "or";
-
- for($i=0; $i<=$tot_no_criteria; $i++)
+ for($i=0; $i<$tot_no_criteria; $i++)
{
if($i == $tot_no_criteria-1)
$matchtype= "";
@@ -429,6 +429,7 @@
$tab_col = str_replace('\'','',stripslashes($_REQUEST[$table_colname]));
$srch_cond = str_replace('\'','',stripslashes($_REQUEST[$search_condition]));
$srch_val = $_REQUEST[$search_value];
+ $url_string .="&Fields".$i."=".$tab_col."&Condition".$i."=".$srch_cond."&Srch_value".$i."=".$srch_val;
if($tab_col == "crmentity.smownerid")
{
$adv_string .= " (".getSearch_criteria($srch_cond,$srch_val,'users.user_name')." or";
@@ -439,7 +440,7 @@
$adv_string .= " ".getSearch_criteria($srch_cond,$srch_val,$tab_col)." ".$matchtype;
}
}
- $where=$adv_string;
+ $where=$adv_string."#@@#".$url_string."&searchtype=advance&search_cnt=".$tot_no_criteria."&matchtype=".$_REQUEST['matchtype'];
}
else
{
Modified: vtigercrm/trunk/modules/Leads/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/ListView.php (original)
+++ vtigercrm/trunk/modules/Leads/ListView.php Wed Apr 26 03:57:11 2006
@@ -67,9 +67,9 @@
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");
}
More information about the vtigercrm-commits
mailing list