Commit 13e9e41d authored by Shashi Gowda's avatar Shashi Gowda

Blend in with some new code. New menus, etc.

parent bf121a69
......@@ -181,7 +181,7 @@ class EditpeopletagAction extends OwnerDesignAction
$this->showPage();
}
function showLocalNav()
function showObjectNav()
{
$nav = new PeopletagGroupNav($this, $this->peopletag);
$nav->show();
......
......@@ -181,11 +181,6 @@ class PeopletagsbyuserAction extends OwnerDesignAction
$this->elementEnd('dd');
$this->elementEnd('dl');
}
function showLocalNav()
{
$nav = new PersonalGroupNav($this);
$nav->show();
}
function showAnonymousMessage()
{
......
......@@ -95,12 +95,6 @@ class PeopletagsforuserAction extends OwnerDesignAction
$this->showPage();
}
function showLocalNav()
{
$nav = new PersonalGroupNav($this);
$nav->show();
}
function showAnonymousMessage()
{
$notice =
......
......@@ -95,12 +95,6 @@ class PeopletagsubscriptionsAction extends OwnerDesignAction
$this->showPage();
}
function showLocalNav()
{
$nav = new PersonalGroupNav($this);
$nav->show();
}
function showAnonymousMessage()
{
$notice =
......
......@@ -179,7 +179,7 @@ class ShowprofiletagAction extends Action
);
}
function showLocalNav()
function showObjectNav()
{
$nav = new PeopletagGroupNav($this);
$nav->show();
......
......@@ -871,38 +871,39 @@ class Notice extends Memcached_DataObject
}
}
foreach ($ptags as $ptag) {
$users = $ptag->getUserSubscribers();
foreach ($users as $id) {
if (!array_key_exists($id, $ni)) {
$user = User::staticGet('id', $id);
if (!$user->hasBlocked($profile)) {
$ni[$id] = NOTICE_INBOX_SOURCE_PROFILE_TAG;
foreach ($ptags as $ptag) {
$users = $ptag->getUserSubscribers();
foreach ($users as $id) {
if (!array_key_exists($id, $ni)) {
$user = User::staticGet('id', $id);
if (!$user->hasBlocked($profile)) {
$ni[$id] = NOTICE_INBOX_SOURCE_PROFILE_TAG;
}
}
}
}
}
foreach ($recipients as $recipient) {
if (!array_key_exists($recipient, $ni)) {
$ni[$recipient] = NOTICE_INBOX_SOURCE_REPLY;
}
foreach ($recipients as $recipient) {
if (!array_key_exists($recipient, $ni)) {
$ni[$recipient] = NOTICE_INBOX_SOURCE_REPLY;
}
// Exclude any deleted, non-local, or blocking recipients.
$profile = $this->getProfile();
$originalProfile = null;
if ($this->repeat_of) {
// Check blocks against the original notice's poster as well.
$original = Notice::staticGet('id', $this->repeat_of);
if ($original) {
$originalProfile = $original->getProfile();
// Exclude any deleted, non-local, or blocking recipients.
$profile = $this->getProfile();
$originalProfile = null;
if ($this->repeat_of) {
// Check blocks against the original notice's poster as well.
$original = Notice::staticGet('id', $this->repeat_of);
if ($original) {
$originalProfile = $original->getProfile();
}
}
}
foreach ($ni as $id => $source) {
$user = User::staticGet('id', $id);
if (empty($user) || $user->hasBlocked($profile) ||
($originalProfile && $user->hasBlocked($originalProfile))) {
unset($ni[$id]);
foreach ($ni as $id => $source) {
$user = User::staticGet('id', $id);
if (empty($user) || $user->hasBlocked($profile) ||
($originalProfile && $user->hasBlocked($originalProfile))) {
unset($ni[$id]);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment