| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
$config = CRM_Core_Config::singleton();
// ensure that the user has permission to see this page
if (!CRM_Core_Permission::event(CRM_Core_Permission::VIEW,
- $this->_id, 'view event info'
- )) {
+ $this->_id, 'view event info'
+ )
+ ) {
CRM_Utils_System::setUFMessage(ts('You do not have permission to view this event'));
return CRM_Utils_System::permissionDenied();
}
$this->assign('isPriceSet', 1);
$this->assign('isQuickConfig', $setDetails[$priceSetId]['is_quick_config']);
}
- }
+ }
$params = array('entity_id' => $this->_id, 'entity_table' => 'civicrm_event');
$values['location'] = CRM_Core_BAO_Location::getValues($params, TRUE);
$this->assign('mapKey', $config->mapAPIKey);
$sumLat = $sumLng = 0;
$maxLat = $maxLng = -400;
- $minLat = $minLng = + 400;
+ $minLat = $minLng = 400;
foreach ($locations as $location) {
$sumLat += $location['lat'];
$sumLng += $location['lng'];
'lng' => (float ) $sumLng / count($locations),
);
$span = array(
- 'lat' => (float )($maxLat - $minLat),
- 'lng' => (float )($maxLng - $minLng),
+ 'lat' => (float ) ($maxLat - $minLat),
+ 'lng' => (float ) ($maxLng - $minLng),
);
$this->assign_by_ref('center', $center);
$this->assign_by_ref('span', $span);
}
return parent::getTemplateFileName();
}
+
}