]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Better position formatting
authorEvan Prodromou <evan@status.net>
Sat, 31 Dec 2011 18:26:07 +0000 (10:26 -0800)
committerEvan Prodromou <evan@status.net>
Sat, 31 Dec 2011 18:26:07 +0000 (10:26 -0800)
lib/activity.php

index 99c76c9126f4ba40c4494e024e16ec12b913f83f..9f0186c6507f2f4debed11860f69e043bce444e9 100644 (file)
@@ -393,15 +393,9 @@ class Activity
                         'deprecated'  => true,
                     );
 
-                    $lat = $loc->lat + 0.0;
-                    $lon = $loc->lon + 0.0;
-
-                    $position = (($lat > 0.0) ? ("+".$lat) : $lat) . "." .
-                        (($lon > 0.0) ? ("+".$lon) : $lon) . "/";
-
                     $activity['location'] = array(
                         'objectType' => 'place',
-                        'position' => $position
+                        'position' => sprintf("%+02.5F.%+03.5F/", $loc->lat, $loc->lon);
                     );
 
                     $name = $loc->getName();