Fix resource booking conflict indication

This commit is contained in:
nathangray 2016-09-12 11:42:27 -06:00
parent 606f8ec667
commit 16b131c883

View File

@ -534,11 +534,12 @@ class resources_bo
*/ */
public static function calendar_search($search, $options) public static function calendar_search($search, $options)
{ {
// Resources $bo = new resources_bo();
$list = Link::query('resources', $search, $options);
// Resources - call direct to avoid cache
$list = $bo->link_query($search, $options);
// Categories // Categories
$bo = new resources_bo();
$cats = $bo->acl->get_cats(Acl::READ); $cats = $bo->acl->get_cats(Acl::READ);
foreach($cats as $cat_id => $cat) foreach($cats as $cat_id => $cat)
{ {
@ -562,7 +563,7 @@ class resources_bo
else if ($resources && $options['exec']) else if ($resources && $options['exec'])
{ {
array_map( array_map(
function($id,$name) use (&$list) { $list[''.$id] = $name;}, function($id,$name) use (&$list) { if(!$list[''.$id]) $list[''.$id] = $name;},
array_keys($resources), $resources array_keys($resources), $resources
); );
} }