forked from GNUsocial/gnu-social
Blend in with some new code. New menus, etc.
This commit is contained in:
parent
bf121a695a
commit
13e9e41d2f
@ -181,7 +181,7 @@ class EditpeopletagAction extends OwnerDesignAction
|
|||||||
$this->showPage();
|
$this->showPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
function showLocalNav()
|
function showObjectNav()
|
||||||
{
|
{
|
||||||
$nav = new PeopletagGroupNav($this, $this->peopletag);
|
$nav = new PeopletagGroupNav($this, $this->peopletag);
|
||||||
$nav->show();
|
$nav->show();
|
||||||
|
@ -181,11 +181,6 @@ class PeopletagsbyuserAction extends OwnerDesignAction
|
|||||||
$this->elementEnd('dd');
|
$this->elementEnd('dd');
|
||||||
$this->elementEnd('dl');
|
$this->elementEnd('dl');
|
||||||
}
|
}
|
||||||
function showLocalNav()
|
|
||||||
{
|
|
||||||
$nav = new PersonalGroupNav($this);
|
|
||||||
$nav->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
function showAnonymousMessage()
|
function showAnonymousMessage()
|
||||||
{
|
{
|
||||||
|
@ -95,12 +95,6 @@ class PeopletagsforuserAction extends OwnerDesignAction
|
|||||||
$this->showPage();
|
$this->showPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
function showLocalNav()
|
|
||||||
{
|
|
||||||
$nav = new PersonalGroupNav($this);
|
|
||||||
$nav->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
function showAnonymousMessage()
|
function showAnonymousMessage()
|
||||||
{
|
{
|
||||||
$notice =
|
$notice =
|
||||||
|
@ -95,12 +95,6 @@ class PeopletagsubscriptionsAction extends OwnerDesignAction
|
|||||||
$this->showPage();
|
$this->showPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
function showLocalNav()
|
|
||||||
{
|
|
||||||
$nav = new PersonalGroupNav($this);
|
|
||||||
$nav->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
function showAnonymousMessage()
|
function showAnonymousMessage()
|
||||||
{
|
{
|
||||||
$notice =
|
$notice =
|
||||||
|
@ -179,7 +179,7 @@ class ShowprofiletagAction extends Action
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showLocalNav()
|
function showObjectNav()
|
||||||
{
|
{
|
||||||
$nav = new PeopletagGroupNav($this);
|
$nav = new PeopletagGroupNav($this);
|
||||||
$nav->show();
|
$nav->show();
|
||||||
|
@ -871,38 +871,39 @@ class Notice extends Memcached_DataObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($ptags as $ptag) {
|
foreach ($ptags as $ptag) {
|
||||||
$users = $ptag->getUserSubscribers();
|
$users = $ptag->getUserSubscribers();
|
||||||
foreach ($users as $id) {
|
foreach ($users as $id) {
|
||||||
if (!array_key_exists($id, $ni)) {
|
if (!array_key_exists($id, $ni)) {
|
||||||
$user = User::staticGet('id', $id);
|
$user = User::staticGet('id', $id);
|
||||||
if (!$user->hasBlocked($profile)) {
|
if (!$user->hasBlocked($profile)) {
|
||||||
$ni[$id] = NOTICE_INBOX_SOURCE_PROFILE_TAG;
|
$ni[$id] = NOTICE_INBOX_SOURCE_PROFILE_TAG;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($recipients as $recipient) {
|
foreach ($recipients as $recipient) {
|
||||||
if (!array_key_exists($recipient, $ni)) {
|
if (!array_key_exists($recipient, $ni)) {
|
||||||
$ni[$recipient] = NOTICE_INBOX_SOURCE_REPLY;
|
$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 ($ni as $id => $source) {
|
// Exclude any deleted, non-local, or blocking recipients.
|
||||||
$user = User::staticGet('id', $id);
|
$profile = $this->getProfile();
|
||||||
if (empty($user) || $user->hasBlocked($profile) ||
|
$originalProfile = null;
|
||||||
($originalProfile && $user->hasBlocked($originalProfile))) {
|
if ($this->repeat_of) {
|
||||||
unset($ni[$id]);
|
// 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]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user