[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14687] more on booking
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [14687] more on booking |
Date: |
Mon, 01 Feb 2016 12:25:57 +0000 |
Revision: 14687
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14687
Author: sigurdne
Date: 2016-02-01 12:25:53 +0000 (Mon, 01 Feb 2016)
Log Message:
-----------
more on booking
Modified Paths:
--------------
branches/dev-syncromind/bookingfrontend/inc/class.bosearch.inc.php
Modified: branches/dev-syncromind/bookingfrontend/inc/class.bosearch.inc.php
===================================================================
--- branches/dev-syncromind/bookingfrontend/inc/class.bosearch.inc.php
2016-02-01 11:50:32 UTC (rev 14686)
+++ branches/dev-syncromind/bookingfrontend/inc/class.bosearch.inc.php
2016-02-01 12:25:53 UTC (rev 14687)
@@ -147,14 +147,26 @@
'sort' => $_res_result['sort'],
'dir' => $_res_result['dir']
);
+ $_resource_buildings = array();
foreach($_res_result['results'] as &$res)
{
+ if (isset($res['buildings']) &&
is_array($res['buildings']))
+ {
+ foreach($res['buildings'] as
$_building_id)
+ {
+
$_resource_buildings[$_building_id] = true;
+ }
+ }
+ else if(isset($res['building_id']) &&
$res['building_id'])
+ {
+
$_resource_buildings[$res['building_id']] = true;
+ }
+
if(isset($_check_duplicate[$res['id']]))
{
continue;
}
-
$_resource_buildings[$res['building_id']] = true;
$res['name'] =
$res['building_name'] . ' / ' . $res['name'];
$res['type'] =
"resource";
$res['link'] =
$GLOBALS['phpgw']->link('/bookingfrontend/', array('menuaction' =>
'bookingfrontend.uiresource.show',
@@ -173,7 +185,7 @@
if(isset($bui_result['total_records']) &&
$bui_result['total_records'] > 0)
{
$_bui_result = array(
- 'total_records' =>
count($_resource_buildings),
+ 'total_records' => 0,
'start' => $bui_result['start'],
'sort' => $bui_result['sort'],
'dir' => $bui_result['dir']
@@ -183,6 +195,7 @@
if(isset($_resource_buildings[$bui['id']] ))
{
$_bui_result['results'][] = $bui;
+
$_bui_result['total_records'] ++;
}
}
$bui_result = $_bui_result;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14687] more on booking,
Sigurd Nes <=