Completed
Push — 2.0 ( 4f7a94...ecedba )
by Jason
11s
created
code/pages/Locator.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
                 Requirements::css('locator/css/map.css');
237 237
                 Requirements::javascript('framework/thirdparty/jquery/jquery.js');
238
-                Requirements::javascript('https://maps.google.com/maps/api/js?key=' . $key);
238
+                Requirements::javascript('https://maps.google.com/maps/api/js?key='.$key);
239 239
                 Requirements::javascript('locator/thirdparty/jquery-store-locator-plugin/assets/js/libs/handlebars.min.js');
240 240
                 Requirements::javascript('locator/thirdparty/jquery-store-locator-plugin/assets/js/plugins/storeLocator/jquery.storelocator.js');
241 241
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
                 // map config based on user input in Settings tab
250 250
                 $limit = Config::inst()->get('Locator_Controller', 'limit');
251 251
                 if ($limit < 1) $limit = -1;
252
-                $load = 'fullMapStart: true, storeLimit: ' . $limit . ', maxDistance: true,';
252
+                $load = 'fullMapStart: true, storeLimit: '.$limit.', maxDistance: true,';
253 253
 
254 254
                 $listTemplatePath = Config::inst()->get('Locator_Controller', 'list_template_path');
255 255
                 $infowindowTemplatePath = Config::inst()->get('Locator_Controller', 'info_window_template_path');
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
                 unset($vars['url']);
262 262
                 $url = '';
263 263
                 if (count($vars)) {
264
-                    $url .= '?' . http_build_query($vars);
264
+                    $url .= '?'.http_build_query($vars);
265 265
                 }
266 266
                 $link = Controller::join_links($this->Link(), 'xml.xml', $url);
267 267
 
@@ -273,18 +273,18 @@  discard block
 block discarded – undo
273 273
                 Requirements::customScript("
274 274
                 $(function(){
275 275
                     $('#map-container').storeLocator({
276
-                        " . $load . "
277
-                        dataLocation: '" . $link . "',
278
-                        listTemplatePath: '" . $listTemplatePath . "',
279
-                        infowindowTemplatePath: '" . $infowindowTemplatePath . "',
276
+                        " . $load."
277
+                        dataLocation: '" . $link."',
278
+                        listTemplatePath: '" . $listTemplatePath."',
279
+                        infowindowTemplatePath: '" . $infowindowTemplatePath."',
280 280
                         originMarker: true,
281
-                        " . $featured . ",
281
+                        " . $featured.",
282 282
                         slideMap: false,
283 283
                         distanceAlert: -1,
284
-                        " . $kilometer . ",
285
-                        " . $defaultCoords . "
286
-                        mapID: '" . $map_id . "',
287
-                        locationList: '" . $list_class . "',
284
+                        " . $kilometer.",
285
+                        " . $defaultCoords."
286
+                        mapID: '" . $map_id."',
287
+                        locationList: '" . $list_class."',
288 288
                         mapSettings: {
289 289
 							zoom: 12,
290 290
 							mapTypeId: google.maps.MapTypeId.ROADMAP,
@@ -389,8 +389,8 @@  discard block
 block discarded – undo
389 389
         }
390 390
 
391 391
         if (Config::inst()->get('LocatorForm', 'show_radius')) {
392
-            if ($radius = (int)$request->getVar('Radius')) {
393
-                $locations = $locations->filterByCallback(function ($location) use (&$radius) {
392
+            if ($radius = (int) $request->getVar('Radius')) {
393
+                $locations = $locations->filterByCallback(function($location) use (&$radius) {
394 394
                     return $location->distance <= $radius;
395 395
                 });
396 396
             }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -248,7 +248,9 @@
 block discarded – undo
248 248
 
249 249
                 // map config based on user input in Settings tab
250 250
                 $limit = Config::inst()->get('Locator_Controller', 'limit');
251
-                if ($limit < 1) $limit = -1;
251
+                if ($limit < 1) {
252
+                    $limit = -1;
253
+                }
252 254
                 $load = 'fullMapStart: true, storeLimit: ' . $limit . ', maxDistance: true,';
253 255
 
254 256
                 $listTemplatePath = Config::inst()->get('Locator_Controller', 'list_template_path');
Please login to merge, or discard this patch.