Version 5.0.13
This commit is contained in:
1 parent
b89858b2ff
commit
5efe744c5f
1407 files changed
+69690
-30177
No files matched your search
@@ -20,6 +20,7 @@ use IPS\Data\Store;
|
||||
use IPS\DateTime;
|
||||
use IPS\Db;
|
||||
use IPS\Dispatcher;
|
||||
use IPS\Extensions\AnnouncementsAbstract;
|
||||
use IPS\File;
|
||||
use IPS\Helpers\Form;
|
||||
use IPS\Helpers\Form\CheckboxSet;
|
||||
@@ -207,10 +208,13 @@ class Announcement extends Item
|
||||
/* App and container specific announcements */
|
||||
foreach ( $extensions as $key => $extension )
|
||||
{
|
||||
/* @var AnnouncementsAbstract $extension */
|
||||
$id = $extension::$idField;
|
||||
|
||||
if ( $announcement->ids AND isset( Request::i()->$id ) )
|
||||
{
|
||||
$idsToCheck = $extension->getAnnouncementIds( $announcement->ids );
|
||||
|
||||
/* Are we viewing a content item */
|
||||
if ( Dispatcher::i()->dispatcherController instanceof Controller )
|
||||
{
|
||||
@@ -220,7 +224,7 @@ class Announcement extends Item
|
||||
{
|
||||
try
|
||||
{
|
||||
if( $announcement->location == $key AND in_array( $class::load( Request::i()->$id )->mapped('container'), explode( ',', $announcement->ids ) ) )
|
||||
if( $announcement->location == $key AND in_array( $class::load( Request::i()->$id )->mapped('container'), $idsToCheck ) )
|
||||
{
|
||||
$return[] = $announcement;
|
||||
}
|
||||
@@ -234,7 +238,7 @@ class Announcement extends Item
|
||||
{
|
||||
try
|
||||
{
|
||||
if( $announcement->location == $key AND in_array( Request::i()->$id , explode( ',', $announcement->ids ) ) )
|
||||
if( $announcement->location == $key AND in_array( Request::i()->$id , $idsToCheck ) )
|
||||
{
|
||||
$return[] = $announcement;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user