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"), common_show_header($profile->nickname . _t(" and friends"),
array($this, 'show_header'), $user); array($this, 'show_header'), $user);
$cur = common_current_user();
if ($cur && $cur->id == $profile->id) {
common_notice_form();
}
$this->views_menu(); $this->views_menu();
$this->show_notices($profile); $this->show_notices($profile);

View File

@ -54,6 +54,12 @@ class ShowstreamAction extends StreamAction {
common_show_header($profile->nickname, array($this, 'show_header'), $user); 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(); $this->views_menu();
$this->show_profile($profile); $this->show_profile($profile);

View File

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