[Vtigercrm-commits] [vtiger-commits] r6079 - /vtigercrm/trunk/modules/Accounts/ListView.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue May 16 13:32:08 EDT 2006


Author: saraj
Date: Tue May 16 11:32:05 2006
New Revision: 6079

Log:
session variable added

Modified:
    vtigercrm/trunk/modules/Accounts/ListView.php

Modified: vtigercrm/trunk/modules/Accounts/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Accounts/ListView.php (original)
+++ vtigercrm/trunk/modules/Accounts/ListView.php Tue May 16 11:32:05 2006
@@ -45,6 +45,15 @@
 $smarty = new vtigerCRM_Smarty;
 $other_text = Array();
 
+if(!$_SESSION['lvs'][$currentModule])
+{
+	unset($_SESSION['lvs']);
+	$modObj = new ListViewSession();
+	$modObj->sorder = $sorder;
+	$modObj->sortby = $order_by;
+	$_SESSION['lvs'][$currentModule] = get_object_vars($modObj);
+}
+
 if($_REQUEST['errormsg'] != '')
 {
         $errormsg = $_REQUEST['errormsg'];
@@ -162,19 +171,14 @@
 //Retreiving the no of rows
 $noofrows = $adb->num_rows($list_result);
 
-//Retreiving the start value from request
-if(isset($_REQUEST['start']) && $_REQUEST['start'] != '')
-{
-        $start = $_REQUEST['start'];
-
-	//added to remain the navigation when sort
-	$url_string = "&start=".$_REQUEST['start'];
-}
-else
-{
-
-        $start = 1;
-}
+//Storing Listview session object
+if($_SESSION['lvs'][$currentModule])
+{
+	setSessionVar($_SESSION['lvs'][$currentModule],$noofrows,$list_max_entries_per_page);
+}
+
+$start = $_SESSION['lvs'][$currentModule]['start'];
+
 
 //Retreive the Navigation array
 $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page);





More information about the vtigercrm-commits mailing list