summaryrefslogtreecommitdiff
path: root/actions/apistatusesupdate.php
diff options
context:
space:
mode:
authorroot <root@ip-10-250-162-129.ec2.internal>2010-01-09 23:25:08 +0000
committerroot <root@ip-10-250-162-129.ec2.internal>2010-01-09 23:25:08 +0000
commitd59df6b27013fb534d6444d8e4790f2edcd9459a (patch)
treebd5bcc8e4ecd0e9391efdcac8ff906fd8b506a60 /actions/apistatusesupdate.php
parentd6db8e58170e6e78a0fd67d50f7fea5d95b5d9c8 (diff)
parentf396701b6466749c09ce16b1e7f2f96c10b05cdd (diff)
Merge branch '0.9.x' of git://gitorious.org/statusnet/mainline into 0.9.x
Diffstat (limited to 'actions/apistatusesupdate.php')
-rw-r--r--actions/apistatusesupdate.php20
1 files changed, 9 insertions, 11 deletions
diff --git a/actions/apistatusesupdate.php b/actions/apistatusesupdate.php
index dabbea92f..f594bbf39 100644
--- a/actions/apistatusesupdate.php
+++ b/actions/apistatusesupdate.php
@@ -203,12 +203,6 @@ class ApiStatusesUpdateAction extends ApiAuthAction
}
}
- $location = null;
-
- if (!empty($this->lat) && !empty($this->lon)) {
- $location = Location::fromLatLon($this->lat, $this->lon);
- }
-
$upload = null;
try {
@@ -235,11 +229,15 @@ class ApiStatusesUpdateAction extends ApiAuthAction
$options = array('reply_to' => $reply_to);
- if (!empty($location)) {
- $options['lat'] = $location->lat;
- $options['lon'] = $location->lon;
- $options['location_id'] = $location->location_id;
- $options['location_ns'] = $location->location_ns;
+ if ($this->user->shareLocation()) {
+
+ $locOptions = Notice::locationOptions($this->lat,
+ $this->lon,
+ null,
+ null,
+ $this->user->getProfile());
+
+ $options = array_merge($options, $locOptions);
}
$this->notice =