Completed
Push — master ( 320572...00fa07 )
by Mark
01:20
created
action.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -234,11 +234,11 @@
 block discarded – undo
234 234
      * @param boolean $showMedia
235 235
      */
236 236
     private function printHTML($searchresults, $showMedia = true) {
237
-        $pages = (array) ($searchresults ['pages']);
238
-        $media = (array) $searchresults ['media'];
239
-        $lat = (float) $searchresults ['lat'];
240
-        $lon = (float) $searchresults ['lon'];
241
-        $geohash = (string) $searchresults ['geohash'];
237
+        $pages = ( array ) ($searchresults ['pages']);
238
+        $media = ( array ) $searchresults ['media'];
239
+        $lat = ( float ) $searchresults ['lat'];
240
+        $lon = ( float ) $searchresults ['lon'];
241
+        $geohash = ( string ) $searchresults ['geohash'];
242 242
 
243 243
         if (isset ($searchresults ['error'])) {
244 244
             print '<div class="level1"><p>' . hsc($results ['error']) . '</p></div>';
Please login to merge, or discard this patch.
helper/search.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
                     ]);
151 151
                     $media [] = array(
152 152
                             'id' => $id,
153
-                            'distance' => (int) ($line->greatCircleLength()),
153
+                            'distance' => ( int ) ($line->greatCircleLength()),
154 154
                             'lat' => $point->y(),
155 155
                             'lon' => $point->x()
156 156
                     // optionally add other meta such as tag, description...
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                     ]);
167 167
                     $pages [] = array(
168 168
                             'id' => $id,
169
-                            'distance' => (int) ($line->greatCircleLength()),
169
+                            'distance' => ( int ) ($line->greatCircleLength()),
170 170
                             'description' => p_get_metadata($id, 'description')['abstract'],
171 171
                             'lat' => $geotags ['lat'],
172 172
                             'lon' => $geotags ['lon']
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
         }
178 178
 
179 179
         // sort all the pages/media using distance
180
-        usort($pages, function ($a, $b) {
180
+        usort($pages, function($a, $b) {
181 181
             return strnatcmp($a ['distance'], $b ['distance']);
182 182
         } );
183
-        usort($media, function ($a, $b) {
183
+        usort($media, function($a, $b) {
184 184
             return strnatcmp($a ['distance'], $b ['distance']);
185 185
         } );
186 186
 
Please login to merge, or discard this patch.