X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fnewnotice.php;h=a4ed87bb62e695b86cc02e026259dce025d01102;hb=7ef6c9da437b504f949dc3d7d8c05f8abe36baae;hp=fbd7ab6bce9c25da6514ed75ba476c44646edda0;hpb=384a50a7800abde62e040ea57872dc06c0519047;p=quix0rs-gnu-social.git diff --git a/actions/newnotice.php b/actions/newnotice.php index fbd7ab6bce..a4ed87bb62 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -182,8 +182,20 @@ class NewnoticeAction extends Action } } - $notice = Notice::saveNew($user->id, $content_shortened, 'web', 1, - ($replyto == 'false') ? null : $replyto); + $options = array('reply_to' => ($replyto == 'false') ? null : $replyto); + + if ($user->shareLocation() && $this->arg('notice_data-geo')) { + + $locOptions = Notice::locationOptions($this->trimmed('lat'), + $this->trimmed('lon'), + $this->trimmed('location_id'), + $this->trimmed('location_ns'), + $user->getProfile()); + + $options = array_merge($options, $locOptions); + } + + $notice = Notice::saveNew($user->id, $content_shortened, 'web', $options); if (isset($upload)) { $upload->attachToNotice($notice);