remove PHP 5.4+ array syntax breaking our PHP 5.3 support

This commit is contained in:
Nathan Gray 2016-03-04 15:57:13 +00:00
parent 7b42308df2
commit 23a25e23d8

View File

@ -124,8 +124,8 @@ class calendar_owner_etemplate_widget extends etemplate_widget_taglist
$query = $_REQUEST['query']; $query = $_REQUEST['query'];
// Arbitrarily limited to 50 / resource // Arbitrarily limited to 50 / resource
$options = ['start' => 0, 'num_rows' => 50]; $options = array('start' => 0, 'num_rows' => 50);
$results = []; $results = array();
$resources = array_merge(array('' => $bo->resources['']),$bo->resources); $resources = array_merge(array('' => $bo->resources['']),$bo->resources);
foreach($resources as $type => $data) foreach($resources as $type => $data)
@ -156,12 +156,12 @@ class calendar_owner_etemplate_widget extends etemplate_widget_taglist
if($id && $title) if($id && $title)
{ {
// Magicsuggest uses id, not value. // Magicsuggest uses id, not value.
$value = [ $value = array(
'id' => $type.$id, 'id' => $type.$id,
'value'=> $type.$id, 'value'=> $type.$id,
'label' => $title, 'label' => $title,
'app' => lang($data['app']) 'app' => lang($data['app'])
]; );
if(is_array($value['label'])) if(is_array($value['label']))
{ {
$value = array_merge($value, $value['label']); $value = array_merge($value, $value['label']);