Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
B
bat_api
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Drupal.org issue queue
Drupal.org issue queue
Security & Compliance
Security & Compliance
Dependency List
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
project
bat_api
Commits
64838705
Commit
64838705
authored
Oct 29, 2015
by
nicola85
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ROOMS-82
: Fix pricing events style
parent
11387619
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
bat_api.module
bat_api.module
+3
-6
No files found.
bat_api.module
View file @
64838705
...
...
@@ -498,8 +498,6 @@ function bat_api_services_availability_index($unit_ids, $start_date, $duration)
$return
=
new
stdClass
();
$return
->
sessid
=
session_id
();
$event_style
=
ROOMS_AVAILABILITY_ADMIN_STYLE
;
$start_date_object
=
new
DateTime
(
$start_date
);
$end_date_object
=
(
clone
(
$start_date_object
));
$end_date_object
->
add
(
new
DateInterval
(
'P'
.
$duration
));
...
...
@@ -521,6 +519,8 @@ function bat_api_services_availability_index($unit_ids, $start_date, $duration)
foreach
(
$ids
as
$id
)
{
$unit
=
rooms_unit_load
(
$id
);
$event_style
=
rooms_availability_get_style
(
ROOMS_AVAILABILITY_ADMIN_STYLE
,
$unit
);
$rc
=
new
UnitCalendar
(
$unit
->
unit_id
,
$unit
->
default_state
);
$events
=
$rc
->
getEvents
(
$start_date_object
,
$end_date_object
);
...
...
@@ -577,9 +577,6 @@ function bat_api_services_pricing_index($unit_ids, $start_date, $duration) {
$return
=
new
stdClass
();
$return
->
sessid
=
session_id
();
$event_style
=
ROOMS_AVAILABILITY_ADMIN_STYLE
;
$event_style
=
rooms_availability_get_style
(
$event_style
,
$unit
);
$start_date_object
=
new
DateTime
(
$start_date
);
$end_date_object
=
(
clone
(
$start_date_object
));
$end_date_object
->
add
(
new
DateInterval
(
'P'
.
$duration
));
...
...
@@ -595,7 +592,7 @@ function bat_api_services_pricing_index($unit_ids, $start_date, $duration) {
$events
=
$rc
->
getEvents
(
$start_date_object
,
$end_date_object
);
foreach
(
$events
as
$event
)
{
$events_json
[
$id
][]
=
$event
->
formatJson
(
$event_style
,
$unit
->
name
);
$events_json
[
$id
][]
=
$event
->
formatJson
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment