only show notice form if user is logged in, looking at own page

darcs-hash:20080611181334-84dde-e9045179a94f8c78af9d660c57a37ce6f5fc9776.gz
This commit is contained in:
Evan Prodromou 2008-06-11 14:13:34 -04:00
parent d1215c4a85
commit f4ed605998
3 changed files with 12 additions and 3 deletions

View File

@ -47,6 +47,12 @@ class AllAction extends StreamAction {
common_show_header($profile->nickname . _t(" and friends"),
array($this, 'show_header'), $user);
$cur = common_current_user();
if ($cur && $cur->id == $profile->id) {
common_notice_form();
}
$this->views_menu();
$this->show_notices($profile);

View File

@ -53,6 +53,12 @@ class ShowstreamAction extends StreamAction {
$user->nickname)));
common_show_header($profile->nickname, array($this, 'show_header'), $user);
$cur = common_current_user();
if ($cur && $cur->id == $profile->id) {
common_notice_form();
}
$this->views_menu();

View File

@ -170,9 +170,6 @@ function common_show_header($pagetitle, $callable=NULL, $data=NULL, $notice=NULL
'alt' => $config['site']['name'],
'id' => 'logo'));
common_element_end('a');
if (common_logged_in()) {
common_notice_form();
}
common_element_end('div');
common_element_start('div', array('id' => 'content'));
}