From 13e9e41d2fe4f3ecef66b760c16ee2377e31b7b5 Mon Sep 17 00:00:00 2001
From: Shashi Gowda <connect2shashi@gmail.com>
Date: Tue, 22 Mar 2011 08:30:16 +0530
Subject: [PATCH] Blend in with some new code. New menus, etc.

---
 actions/editpeopletag.php          |  2 +-
 actions/peopletagsbyuser.php       |  5 ---
 actions/peopletagsforuser.php      |  6 ----
 actions/peopletagsubscriptions.php |  6 ----
 actions/showprofiletag.php         |  2 +-
 classes/Notice.php                 | 53 +++++++++++++++---------------
 6 files changed, 29 insertions(+), 45 deletions(-)

diff --git a/actions/editpeopletag.php b/actions/editpeopletag.php
index b00ccc8abb..2bb03470d9 100644
--- a/actions/editpeopletag.php
+++ b/actions/editpeopletag.php
@@ -181,7 +181,7 @@ class EditpeopletagAction extends OwnerDesignAction
         $this->showPage();
     }
 
-    function showLocalNav()
+    function showObjectNav()
     {
         $nav = new PeopletagGroupNav($this, $this->peopletag);
         $nav->show();
diff --git a/actions/peopletagsbyuser.php b/actions/peopletagsbyuser.php
index 3158b715bc..e0e0ccc57d 100644
--- a/actions/peopletagsbyuser.php
+++ b/actions/peopletagsbyuser.php
@@ -181,11 +181,6 @@ class PeopletagsbyuserAction extends OwnerDesignAction
         $this->elementEnd('dd');
         $this->elementEnd('dl');
     }
-    function showLocalNav()
-    {
-        $nav = new PersonalGroupNav($this);
-        $nav->show();
-    }
 
     function showAnonymousMessage()
     {
diff --git a/actions/peopletagsforuser.php b/actions/peopletagsforuser.php
index b6875b300b..73fb225612 100644
--- a/actions/peopletagsforuser.php
+++ b/actions/peopletagsforuser.php
@@ -95,12 +95,6 @@ class PeopletagsforuserAction extends OwnerDesignAction
         $this->showPage();
     }
 
-    function showLocalNav()
-    {
-        $nav = new PersonalGroupNav($this);
-        $nav->show();
-    }
-
     function showAnonymousMessage()
     {
         $notice =
diff --git a/actions/peopletagsubscriptions.php b/actions/peopletagsubscriptions.php
index b45651d1a2..90f232e774 100644
--- a/actions/peopletagsubscriptions.php
+++ b/actions/peopletagsubscriptions.php
@@ -95,12 +95,6 @@ class PeopletagsubscriptionsAction extends OwnerDesignAction
         $this->showPage();
     }
 
-    function showLocalNav()
-    {
-        $nav = new PersonalGroupNav($this);
-        $nav->show();
-    }
-
     function showAnonymousMessage()
     {
         $notice =
diff --git a/actions/showprofiletag.php b/actions/showprofiletag.php
index a4cace6e96..d9f9e9c12e 100644
--- a/actions/showprofiletag.php
+++ b/actions/showprofiletag.php
@@ -179,7 +179,7 @@ class ShowprofiletagAction extends Action
         );
     }
 
-    function showLocalNav()
+    function showObjectNav()
     {
         $nav = new PeopletagGroupNav($this);
         $nav->show();
diff --git a/classes/Notice.php b/classes/Notice.php
index 79b034e76f..bd47b8b8c3 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -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]);
+                    }
                 }
             }
 
-- 
2.39.5