[Vtigercrm-commits] [vtiger-commits] r4438 - /vtigercrm/branches/4.2_postgresql_integration/modules/Activities/ListView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Mar 27 01:59:15 EST 2006
Author: allanbush
Date: Sun Mar 26 23:59:11 2006
New Revision: 4438
Log:
Added order by expression to the begining of the disinstct on expression to prevent postgres query error when sorting columns. Closes #71.
Modified:
vtigercrm/branches/4.2_postgresql_integration/modules/Activities/ListView.php
Modified: vtigercrm/branches/4.2_postgresql_integration/modules/Activities/ListView.php
==============================================================================
--- vtigercrm/branches/4.2_postgresql_integration/modules/Activities/ListView.php (original)
+++ vtigercrm/branches/4.2_postgresql_integration/modules/Activities/ListView.php Sun Mar 26 23:59:11 2006
@@ -236,7 +236,13 @@
//Retreive the list from Database
//<<<<<<<<<customview>>>>>>>>>
-$distincton = $adb->isPostgres() ? 'crmid' : '';
+$distincton = '';
+if($adb->isPostgres()) {
+ if(isset($order_by) && $order_by != '') {
+ $distincton = $order_by . ', ';
+ }
+ $distincton .= 'crmid';
+}
if($viewid != "0")
{
$listquery = getListQuery("Activities", '', $distincton);
More information about the vtigercrm-commits
mailing list