[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15687] property: filter inactive items
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15687] property: filter inactive items |
Date: |
Fri, 16 Sep 2016 09:01:05 +0000 (UTC) |
Revision: 15687
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15687
Author: sigurdne
Date: 2016-09-16 09:01:05 +0000 (Fri, 16 Sep 2016)
Log Message:
-----------
property: filter inactive items
Modified Paths:
--------------
trunk/property/inc/class.soentity.inc.php
Modified: trunk/property/inc/class.soentity.inc.php
===================================================================
--- trunk/property/inc/class.soentity.inc.php 2016-09-16 08:51:07 UTC (rev
15686)
+++ trunk/property/inc/class.soentity.inc.php 2016-09-16 09:01:05 UTC (rev
15687)
@@ -818,19 +818,19 @@
$sql_custom_field = '';
- if ($check_for_control && !$control_registered)
+ /*
+ * Filter inactive
+ */
+ static $cache_attribute_status = array();
+
+ if(!isset($cache_attribute_status[$location_id]))
{
- /*
- * Filter inactive
- */
- static $cache_attribute_status = array();
+ $filters = array("column_name" => "status");
+ $cache_attribute_status[$location_id] =
$GLOBALS['phpgw']->custom_fields->find2($location_id, 0, '', 'ASC', '', true,
true,$filters);
+ }
-
if(!isset($cache_attribute_status[$location_id]))
- {
- $filters = array("column_name" =>
"status");
- $cache_attribute_status[$location_id] =
$GLOBALS['phpgw']->custom_fields->find2($location_id, 0, '', 'ASC', '', true,
true,$filters);
- }
-
+ if(!phpgw::get_var('status', 'int'))
+ {
if(!empty($cache_attribute_status[$location_id]))
{
foreach
($cache_attribute_status[$location_id] as $attibute_id => $attibute)
@@ -839,18 +839,13 @@
{
$_querymethod[] =
"CAST( json_representation->>'status' AS integer) < 90";
$__querymethod =
array(); // remove block
-// foreach
($attibute['choice'] as $choice)
-// {
-//
if($choice['id'] < 90)
-// {
-//
$_querymethod[] = "CAST( json_representation->>'status' AS integer) = "
.(int)$choice['id'];
-//
$__querymethod = array(); // remove block
-// }
-// }
}
}
}
+ }
+ if ($check_for_control && !$control_registered)
+ {
$sql .= "{$this->left_join} {$join_control}";
$sql_custom_field .= ',count(control_id) AS
has_control';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15687] property: filter inactive items,
sigurdne <=