summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSiebrand Mazeland <s.mazeland@xs4all.nl>2009-11-19 21:24:49 +0100
committerSiebrand Mazeland <s.mazeland@xs4all.nl>2009-11-19 21:24:49 +0100
commit93f6981b71c5fe4445352ca83a01a964fca9f078 (patch)
treee6c2205d84906be758402df85394a7e361f27d11 /lib
parent69af084bcbd6a6ac3dcd842a3dff79169137b8db (diff)
parent62b66d12d697e62039fa04525c33328a7d31f31c (diff)
Merge branch '0.9.x' of git://gitorious.org/statusnet/mainline into 0.9.x
Diffstat (limited to 'lib')
-rw-r--r--lib/action.php1
-rw-r--r--lib/noticeform.php19
2 files changed, 19 insertions, 1 deletions
diff --git a/lib/action.php b/lib/action.php
index 9c7060bba..8ad391755 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -259,6 +259,7 @@ class Action extends HTMLOutputter // lawsuit
Event::handle('StartShowLaconicaScripts', array($this))) {
$this->script('js/xbImportNode.js');
$this->script('js/util.js');
+ $this->script('js/geometa.js');
// Frame-busting code to avoid clickjacking attacks.
$this->element('script', array('type' => 'text/javascript'),
'if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
diff --git a/lib/noticeform.php b/lib/noticeform.php
index 1be011c18..ec8624597 100644
--- a/lib/noticeform.php
+++ b/lib/noticeform.php
@@ -76,6 +76,15 @@ class NoticeForm extends Form
var $inreplyto = null;
/**
+ * Pre-filled location content of the form
+ */
+
+ var $lat;
+ var $lon;
+ var $location_id;
+ var $location_ns;
+
+ /**
* Constructor
*
* @param HTMLOutputter $out output channel
@@ -83,13 +92,17 @@ class NoticeForm extends Form
* @param string $content content to pre-fill
*/
- function __construct($out=null, $action=null, $content=null, $user=null, $inreplyto=null)
+ function __construct($out=null, $action=null, $content=null, $user=null, $inreplyto=null, $lat=null, $lon=null, $location_id=null, $location_ns=null)
{
parent::__construct($out);
$this->action = $action;
$this->content = $content;
$this->inreplyto = $inreplyto;
+ $this->lat = $lat;
+ $this->lon = $lon;
+ $this->location_id = $location_id;
+ $this->location_ns = $location_ns;
if ($user) {
$this->user = $user;
@@ -188,6 +201,10 @@ class NoticeForm extends Form
$this->out->hidden('notice_return-to', $this->action, 'returnto');
}
$this->out->hidden('notice_in-reply-to', $this->inreplyto, 'inreplyto');
+ $this->out->hidden('notice_data-lat', empty($this->lat) ? null : $this->lat, 'lat');
+ $this->out->hidden('notice_data-lon', empty($this->lon) ? null : $this->lon, 'lon');
+ $this->out->hidden('notice_data-location_id', empty($this->location_id) ? null : $this->location_id, 'location_id');
+ $this->out->hidden('notice_data-location_ns', empty($this->location_ns) ? null : $this->location_ns, 'location_ns');
Event::handle('StartShowNoticeFormData', array($this));
}