[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13572] more on socommon
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13572] more on socommon |
Date: |
Tue, 07 Jul 2015 14:04:13 +0000 |
Revision: 13572
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13572
Author: sigurdne
Date: 2015-07-07 14:04:11 +0000 (Tue, 07 Jul 2015)
Log Message:
-----------
more on socommon
Modified Paths:
--------------
trunk/rental/inc/class.socommon.inc.php
trunk/rental/inc/class.socontract.inc.php
Modified: trunk/rental/inc/class.socommon.inc.php
===================================================================
--- trunk/rental/inc/class.socommon.inc.php 2015-07-07 13:34:31 UTC (rev
13571)
+++ trunk/rental/inc/class.socommon.inc.php 2015-07-07 14:04:11 UTC (rev
13572)
@@ -5,6 +5,7 @@
protected $like;
protected $join;
protected $left_join;
+ protected $sort_field;
public function __construct()
{
@@ -12,6 +13,7 @@
$this->like = & $this->db->like;
$this->join = & $this->db->join;
$this->left_join = & $this->db->left_join;
+ $this->sort_field = null;
}
/**
@@ -226,7 +228,7 @@
$sql_filter = "SELECT DISTINCT
{$id_field_name_info['table']}.{$id_field_name_info['field']} AS
{$id_field_name_info['translated']}";
if($sort_field && $sort_field !=
$id_field_name_info['translated'])
{
- $sql_filter .= ",{$sort_field}";
+ $sql_filter .= $this->sort_field ?
",{$this->sort_field}" :",{$sort_field}";
}
$sql_filter .= " FROM {$sql_parts_filter[1]}";
Modified: trunk/rental/inc/class.socontract.inc.php
===================================================================
--- trunk/rental/inc/class.socontract.inc.php 2015-07-07 13:34:31 UTC (rev
13571)
+++ trunk/rental/inc/class.socontract.inc.php 2015-07-07 14:04:11 UTC (rev
13572)
@@ -87,8 +87,8 @@
else if($sort_field == 'term_label'){
$sort_field = 'contract.term_id';
}
+ $this->sort_field = str_ireplace(" {$dir}", '', $sort_field);
-
//Contracts for billing should always be sorted on biling start
if(isset($filters['contracts_for_billing']))
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13572] more on socommon,
Sigurd Nes <=