diff options
author | Zach Copley <zach@status.net> | 2009-11-19 12:47:11 -0800 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2009-11-19 12:47:11 -0800 |
commit | a151ab7b996be99e5f01a4793dbad453a5ac5bd6 (patch) | |
tree | b999a1ce638cffeddca0756ba8c8bef1e3b1bb2d /actions | |
parent | ad56ebbb97c2ea544afb1f5b00235eb3395ade5a (diff) | |
parent | 93f6981b71c5fe4445352ca83a01a964fca9f078 (diff) |
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x
* '0.9.x' of gitorious.org:statusnet/mainline:
Localisation updates for !StatusNet from !translatewiki.net
Use the browser's geolocation API to set the location on the notice form
Add geometa library, and include it.
Add location form elements to the noticeform, and save their values on submission
Use the $user object nickname, as login name doesnt have to == nickname anymore with plugins such as ldap/etc
Revert "Re added NICKNAME_FMT constant to router.php."
Diffstat (limited to 'actions')
-rw-r--r-- | actions/login.php | 2 | ||||
-rw-r--r-- | actions/newnotice.php | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/actions/login.php b/actions/login.php index 63955e3f5..cee29fd09 100644 --- a/actions/login.php +++ b/actions/login.php @@ -164,7 +164,7 @@ class LoginAction extends Action } else { $url = common_local_url('all', array('nickname' => - $nickname)); + $user->nickname)); } common_redirect($url, 303); diff --git a/actions/newnotice.php b/actions/newnotice.php index fbd7ab6bc..dd6da0b01 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -164,6 +164,11 @@ class NewnoticeAction extends Action $replyto = 'false'; } + $lat = $this->trimmed('lat'); + $lon = $this->trimmed('lon'); + $location_id = $this->trimmed('location_id'); + $location_ns = $this->trimmed('location_ns'); + $upload = null; $upload = MediaFile::fromUpload('attach'); @@ -183,7 +188,9 @@ class NewnoticeAction extends Action } $notice = Notice::saveNew($user->id, $content_shortened, 'web', 1, - ($replyto == 'false') ? null : $replyto); + ($replyto == 'false') ? null : $replyto, + null, null, + $lat, $lon, $location_id, $location_ns); if (isset($upload)) { $upload->attachToNotice($notice); |