From d816af9aa9ac1e41f0aa4f580ab36bdf043cc3b5 Mon Sep 17 00:00:00 2001 From: Chimo Date: Mon, 9 Feb 2015 18:06:26 -0500 Subject: [PATCH 1/2] Prepopulate newnotice from URL arg --- actions/newnotice.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/actions/newnotice.php b/actions/newnotice.php index d1e47fec5c..0432064a42 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -73,6 +73,10 @@ class NewnoticeAction extends FormAction $this->formOpts[$opt] = $this->trimmed($opt); } } + + if ($this->trimmed('content')) { + $this->formOpts['content'] = $this->trimmed('content'); + } } /** From 7cea3f9f1185fad49ac9f83c02549a47e213b253 Mon Sep 17 00:00:00 2001 From: Chimo Date: Tue, 10 Feb 2015 10:53:24 -0500 Subject: [PATCH 2/2] Add 'statusnet_textarea' backward-compatibility --- actions/newnotice.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/actions/newnotice.php b/actions/newnotice.php index 0432064a42..692ba765c8 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -74,9 +74,9 @@ class NewnoticeAction extends FormAction } } - if ($this->trimmed('content')) { - $this->formOpts['content'] = $this->trimmed('content'); - } + // Backwards compatibility for "share this" widget things. + // If no 'content', use 'status_textarea' + $this->formOpts['content'] = $this->trimmed('content') ?: $this->trimmed('status_textarea'); } /**