From: Evan Prodromou Date: Wed, 11 Jun 2008 18:13:34 +0000 (-0400) Subject: only show notice form if user is logged in, looking at own page X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f4ed6059980afdaede47e33307c6432e83aea484;p=quix0rs-gnu-social.git only show notice form if user is logged in, looking at own page darcs-hash:20080611181334-84dde-e9045179a94f8c78af9d660c57a37ce6f5fc9776.gz --- diff --git a/actions/all.php b/actions/all.php index 83401d422d..06d88477d5 100644 --- a/actions/all.php +++ b/actions/all.php @@ -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); diff --git a/actions/showstream.php b/actions/showstream.php index 2130251ce1..6fed6df128 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -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(); diff --git a/lib/util.php b/lib/util.php index c6f32eeb7f..aa0b8f02c1 100644 --- a/lib/util.php +++ b/lib/util.php @@ -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')); }