[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16251] property: search and auto status
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16251] property: search and auto status |
Date: |
Mon, 6 Feb 2017 03:52:45 -0500 (EST) |
Revision: 16251
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16251
Author: sigurdne
Date: 2017-02-06 03:52:45 -0500 (Mon, 06 Feb 2017)
Log Message:
-----------
property: search and auto status
Modified Paths:
--------------
trunk/property/inc/class.soworkorder.inc.php
trunk/property/inc/class.uiwo_hour.inc.php
Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php 2017-02-05 18:19:53 UTC
(rev 16250)
+++ trunk/property/inc/class.soworkorder.inc.php 2017-02-06 08:52:45 UTC
(rev 16251)
@@ -736,12 +736,12 @@
{
$_query =
(int)$query;
}
- else if
($field_info['type'] == 'bigint' && !ctype_digit($query))
+ else if
($field_info['type'] == 'bigint' && $field_info['matchtype'] != 'like')
{
$_query = 0;
}
- else if
($field_info['type'] == 'bigint' && ctype_digit($query))
+ else if
($field_info['type'] == 'bigint' && $field_info['matchtype'] == 'like')
{
$_query =
$query;
if($field_info['matchtype'] == 'like')
@@ -767,10 +767,16 @@
{
$_query = (int)$query;
}
- else if ($criteria[0]['type']
== 'bigint' && !ctype_digit($query))
+ else if ($criteria[0]['type']
== 'bigint' && $field_info['matchtype'] == 'like')
{
+ $_query = $query;
+ $_querymethod[] = "
cast({$field_info['field']} as text) {$matchtypes[$field_info['matchtype']]}
{$field_info['front']}{$_query}{$field_info['back']}";
$_query = 0;
}
+ else if ($criteria[0]['type']
== 'bigint' && $field_info['matchtype'] != 'like')
+ {
+ $_query = 0;
+ }
else
{
$_query = $query;
Modified: trunk/property/inc/class.uiwo_hour.inc.php
===================================================================
--- trunk/property/inc/class.uiwo_hour.inc.php 2017-02-05 18:19:53 UTC (rev
16250)
+++ trunk/property/inc/class.uiwo_hour.inc.php 2017-02-06 08:52:45 UTC (rev
16251)
@@ -1511,7 +1511,9 @@
if (!$_status)
{
- throw new Exception('status on
ordered not given in config');
+ // throw new Exception('status on
ordered not given in config');
+
phpgwapi_cache::message_set("Automatisk endring av status for bestilt er ikke
konfigurert", 'error');
+
}
if (!is_object($GLOBALS['phpgw']->send))
@@ -1561,20 +1563,22 @@
$historylog->add('MS',
$workorder_id, $to_sms_phone);
}
- try
+ if($_status)
{
-
execMethod('property.soworkorder.update_status', array('order_id' =>
$workorder_id,
- 'status' => $_status));
- }
- catch (Exception $e)
- {
- if ($e)
+ try
{
- throw $e;
+
execMethod('property.soworkorder.update_status', array('order_id' =>
$workorder_id,
+ 'status' =>
$_status));
}
+ catch (Exception $e)
+ {
+ if ($e)
+ {
+ throw $e;
+ }
+ }
}
-
//Sigurd: Consider remove
/*
if(
$this->boworkorder->order_sent_adress )
@@ -3486,7 +3490,7 @@
if (!$_status)
{
- throw new Exception('status on ordered not
given in config');
+ phpgwapi_cache::message_set("Automatisk endring
av status for bestilt er ikke konfigurert", 'error');
}
try
@@ -3505,17 +3509,20 @@
}
}
- try
+ if($_status)
{
-
execMethod('property.soworkorder.update_status', array('order_id' =>
$workorder_id,
- 'status' => $_status));
- }
- catch (Exception $e)
- {
- if ($e)
+ try
{
- throw $e;
+
execMethod('property.soworkorder.update_status', array('order_id' =>
$workorder_id,
+ 'status' => $_status));
}
+ catch (Exception $e)
+ {
+ if ($e)
+ {
+ throw $e;
+ }
+ }
}
$_attachment_log = $attachment_log ?
"::$attachment_log" : '';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16251] property: search and auto status,
sigurdne <=