diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/all.php | 2 | ||||
-rw-r--r-- | actions/newnotice.php | 18 | ||||
-rw-r--r-- | actions/public.php | 2 | ||||
-rw-r--r-- | actions/showstream.php | 2 |
4 files changed, 17 insertions, 7 deletions
diff --git a/actions/all.php b/actions/all.php index 44e3fd239..a8b08565a 100644 --- a/actions/all.php +++ b/actions/all.php @@ -65,7 +65,7 @@ class AllAction extends StreamAction { $cur = common_current_user(); if ($cur && $cur->id == $user->id) { - common_notice_form(); + common_notice_form('all'); } $this->views_menu(); diff --git a/actions/newnotice.php b/actions/newnotice.php index b65edf4c3..a3ba4c9cc 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -69,15 +69,25 @@ class NewnoticeAction extends Action { } common_broadcast_notice($notice); - common_redirect(common_local_url('shownotice', - array('notice' => $id)), 303); + $returnto = $this->trimmed('returnto'); + if ($returnto) { + $url = common_local_url($returnto, + array('nickname' => $user->nickname)); + } else { + $url = common_local_url('shownotice', + array('notice' => $id)); + } + common_redirect($url, 303); } - function show_form($msg=NULL) { - common_show_header(_t('New notice')); + function show_top($msg=NULL) { if ($msg) { common_element('div', 'error', $msg); } + } + + function show_form($msg=NULL) { + common_show_header(_t('New notice'), NULL, $msg, array($this, 'show_top')); common_notice_form(); common_show_footer(); } diff --git a/actions/public.php b/actions/public.php index 5d06c3c29..23d9f0397 100644 --- a/actions/public.php +++ b/actions/public.php @@ -43,7 +43,7 @@ class PublicAction extends StreamAction { function show_top() { if (common_logged_in()) { - common_notice_form(); + common_notice_form('public'); } } diff --git a/actions/showstream.php b/actions/showstream.php index d9637c377..7ccdc894f 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -68,7 +68,7 @@ class ShowstreamAction extends StreamAction { $cur = common_current_user(); if ($cur && $cur->id == $user->id) { - common_notice_form(); + common_notice_form('showstream'); } $this->views_menu(); |