summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-22 22:12:15 -0800
committerEvan Prodromou <evan@status.net>2009-12-22 22:12:15 -0800
commit185e229f7974c3bee2070ee7a2e4b8aaf01ee35e (patch)
tree547a74763fd17d7cfc6309c9e07d52b26c15f251 /actions
parenta2cb0a033fa6777d824dc40e759294287bd83939 (diff)
parent725b2d0475ba3d0dcfafd48a191b4ddee09cae68 (diff)
Merge branch 'master' into 0.9.x
Diffstat (limited to 'actions')
-rw-r--r--actions/newnotice.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php
index c6c70e326..c014f1781 100644
--- a/actions/newnotice.php
+++ b/actions/newnotice.php
@@ -169,6 +169,14 @@ class NewnoticeAction extends Action
$location_id = $this->trimmed('location_id');
$location_ns = $this->trimmed('location_ns');
+ if (!empty($lat) && !empty($lon) && empty($location_id)) {
+ $location = Location::fromLatLon($lat, $lon);
+ if (!empty($location)) {
+ $location_id = $location->location_id;
+ $location_ns = $location->location_ns;
+ }
+ }
+
$upload = null;
$upload = MediaFile::fromUpload('attach');