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

This commit is contained in:
Shashi Gowda 2011-03-22 08:30:16 +05:30
parent bf121a695a
commit 13e9e41d2f
6 changed files with 30 additions and 46 deletions

View File

@ -181,7 +181,7 @@ class EditpeopletagAction extends OwnerDesignAction
$this->showPage();
}
function showLocalNav()
function showObjectNav()
{
$nav = new PeopletagGroupNav($this, $this->peopletag);
$nav->show();

View File

@ -181,11 +181,6 @@ class PeopletagsbyuserAction extends OwnerDesignAction
$this->elementEnd('dd');
$this->elementEnd('dl');
}
function showLocalNav()
{
$nav = new PersonalGroupNav($this);
$nav->show();
}
function showAnonymousMessage()
{

View File

@ -95,12 +95,6 @@ class PeopletagsforuserAction extends OwnerDesignAction
$this->showPage();
}
function showLocalNav()
{
$nav = new PersonalGroupNav($this);
$nav->show();
}
function showAnonymousMessage()
{
$notice =

View File

@ -95,12 +95,6 @@ class PeopletagsubscriptionsAction extends OwnerDesignAction
$this->showPage();
}
function showLocalNav()
{
$nav = new PersonalGroupNav($this);
$nav->show();
}
function showAnonymousMessage()
{
$notice =

View File

@ -179,7 +179,7 @@ class ShowprofiletagAction extends Action
);
}
function showLocalNav()
function showObjectNav()
{
$nav = new PeopletagGroupNav($this);
$nav->show();

View File

@ -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;
}
// 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 ($recipients as $recipient) {
if (!array_key_exists($recipient, $ni)) {
$ni[$recipient] = NOTICE_INBOX_SOURCE_REPLY;
}
}
foreach ($ni as $id => $source) {
$user = User::staticGet('id', $id);
if (empty($user) || $user->hasBlocked($profile) ||
($originalProfile && $user->hasBlocked($originalProfile))) {
unset($ni[$id]);
// 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]);
}
}
}