Completed
Pull Request — master (#110)
by Jason
03:22
created
code/extensions/DistanceDataExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
     /**
6 6
      * @param SQLQuery $query
7 7
      */
8
-    public function augmentSQL(SQLQuery &$query)
8
+    public function augmentSQL(SQLQuery & $query)
9 9
     {
10 10
         if (Controller::curr()->getRequest()->getVar('Address')) { // on frontend
11 11
             $coords = GoogleGeocoding::address_to_point(Controller::curr()->getRequest()->getVar('Address'));
Please login to merge, or discard this patch.
code/pages/Locator.php 1 patch
Spacing   +15 added lines, -17 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         if ($locations) {
208 208
             Requirements::javascript('https://code.jquery.com/jquery-3.0.0.min.js');
209 209
             Requirements::javascript('locator/thirdparty/locator-plugin/libs/handlebars/handlebars-v4.0.5.js');
210
-            Requirements::javascript('https://maps.googleapis.com/maps/api/js?key=' . $key);
210
+            Requirements::javascript('https://maps.googleapis.com/maps/api/js?key='.$key);
211 211
             Requirements::javascript('locator/thirdparty/locator-plugin/src/js/jquery.storelocator.js');
212 212
         }
213 213
         Requirements::css('locator/css/map.css');
@@ -229,13 +229,11 @@  discard block
 block discarded – undo
229 229
             'autoGeocode: true, fullMapStart: false,' :
230 230
             'autoGeocode: false, fullMapStart: true, storeLimit: 1000, maxDistance: true,';*/
231 231
         $base = Director::baseFolder();
232
-        $themePath = $base . '/' . $themeDir;
233
-        $listTemplatePath = (file_exists($themePath . '/templates/location-list-description.html')) ?
234
-            $themeDir . '/templates/location-list-description.html' :
235
-            'locator/templates/location-list-description.html';
236
-        $infowindowTemplatePath = (file_exists($themePath . '/templates/infowindow-description.html')) ?
237
-            $themeDir . '/templates/infowindow-description.html' :
238
-            'locator/templates/infowindow-description.html';
232
+        $themePath = $base.'/'.$themeDir;
233
+        $listTemplatePath = (file_exists($themePath.'/templates/location-list-description.html')) ?
234
+            $themeDir.'/templates/location-list-description.html' : 'locator/templates/location-list-description.html';
235
+        $infowindowTemplatePath = (file_exists($themePath.'/templates/infowindow-description.html')) ?
236
+            $themeDir.'/templates/infowindow-description.html' : 'locator/templates/infowindow-description.html';
239 237
         // in page or modal
240 238
         $modal = ($this->data()->ModalWindow) ? 'modalWindow: true' : 'modalWindow: false';
241 239
         $kilometer = ($this->data()->Unit == 'km') ? 'lengthUnit: "km"' : 'lengthUnit: "m"';
@@ -245,22 +243,22 @@  discard block
 block discarded – undo
245 243
         unset($vars['action_index']);
246 244
         $url = '';
247 245
         if (count($vars)) {
248
-            $url .= '?' . http_build_query($vars);
246
+            $url .= '?'.http_build_query($vars);
249 247
         }
250
-        $link = $this->AbsoluteLink() . 'xml.xml' . $url;
248
+        $link = $this->AbsoluteLink().'xml.xml'.$url;
251 249
 
252 250
         // init map
253 251
         if ($locations) {
254 252
             Requirements::customScript("
255 253
                 $(function() {
256 254
 					$('#bh-sl-map-container').storeLocator({
257
-					    " . $load . "
258
-                        dataLocation: '" . $link . "',
259
-                        listTemplatePath: '" . $listTemplatePath . "',
260
-                        infowindowTemplatePath: '" . $infowindowTemplatePath . "',
255
+					    " . $load."
256
+                        dataLocation: '" . $link."',
257
+                        listTemplatePath: '" . $listTemplatePath."',
258
+                        infowindowTemplatePath: '" . $infowindowTemplatePath."',
261 259
                         originMarker: true,
262
-                        " . $modal . ',
263
-                        ' . $featured . ",
260
+                        " . $modal.',
261
+                        ' . $featured.",
264 262
                         slideMap: false,
265 263
                         zoomLevel: 0,
266 264
                         noForm: true,
@@ -268,7 +266,7 @@  discard block
 block discarded – undo
268 266
                         inputID: 'Form_LocationSearch_Address',
269 267
                         categoryID: 'Form_LocationSearch_category',
270 268
                         distanceAlert: -1,
271
-                        " . $kilometer . "
269
+                        " . $kilometer."
272 270
                     });
273 271
                 });
274 272
             ");
Please login to merge, or discard this patch.