[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16233] adjust filter
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16233] adjust filter |
Date: |
Thu, 2 Feb 2017 05:51:30 -0500 (EST) |
Revision: 16233
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16233
Author: sigurdne
Date: 2017-02-02 05:51:30 -0500 (Thu, 02 Feb 2017)
Log Message:
-----------
adjust filter
Modified Paths:
--------------
trunk/property/inc/class.boworkorder.inc.php
trunk/property/inc/class.soworkorder.inc.php
Modified: trunk/property/inc/class.boworkorder.inc.php
===================================================================
--- trunk/property/inc/class.boworkorder.inc.php 2017-02-02 10:26:28 UTC
(rev 16232)
+++ trunk/property/inc/class.boworkorder.inc.php 2017-02-02 10:51:30 UTC
(rev 16233)
@@ -353,9 +353,9 @@
(
'field' => 'fm_workorder.id',
'type' => 'bigint',
- 'matchtype' => 'exact',
+ 'matchtype' => 'like',
'front' => "'",
- 'back' => "'"
+ 'back' => "%'",
);
$criteria[4] = array
(
Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php 2017-02-02 10:26:28 UTC
(rev 16232)
+++ trunk/property/inc/class.soworkorder.inc.php 2017-02-02 10:51:30 UTC
(rev 16233)
@@ -732,14 +732,24 @@
$_querymethod = array();
foreach ($criteria as
$field_info)
{
- if ($field_info['type']
== int)
+ if ($field_info['type']
== 'int')
{
$_query =
(int)$query;
}
else if
($field_info['type'] == 'bigint' && !ctype_digit($query))
{
+
$_query = 0;
}
+ else if
($field_info['type'] == 'bigint' && ctype_digit($query))
+ {
+ $_query =
$query;
+
if($field_info['matchtype'] == 'like')
+ {
+
$_querymethod[] = " cast({$field_info['field']} as text)
{$matchtypes[$field_info['matchtype']]}
{$field_info['front']}{$_query}{$field_info['back']}";
+
continue;
+ }
+ }
else
{
$_query =
$query;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16233] adjust filter,
sigurdne <=