Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-01-26-14-28-00
[civicrm-core.git] / CRM / Event / Page / EventInfo.php
index 42a761cbed31daa145e121df29cfd32df271e18f..548d3855c5f54a85171ec94f31027bba3c350605 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -53,8 +53,9 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page {
     $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();
     }
@@ -167,7 +168,7 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page {
         $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);
@@ -194,7 +195,7 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page {
       $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'];
@@ -219,8 +220,8 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page {
         '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);
@@ -376,4 +377,5 @@ class CRM_Event_Page_EventInfo extends CRM_Core_Page {
     }
     return parent::getTemplateFileName();
   }
+
 }