Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -765,14 +765,15 @@ class _Content extends Table
|
||||
if( \in_array( \IPS\Request::i()->modaction, array( 'hide', 'move', 'merge' ) ) )
|
||||
{
|
||||
$options = array();
|
||||
$ids = array_keys( \IPS\Request::i()->moderate );
|
||||
foreach ( $ids as $id )
|
||||
$ids = array();
|
||||
foreach ( \IPS\Request::i()->moderate as $id => $empty )
|
||||
{
|
||||
$item = $class::load( $id );
|
||||
|
||||
$action = 'can' . ucwords( \IPS\Request::i()->modaction );
|
||||
if( $item->$action() )
|
||||
{
|
||||
$ids[] = $id;
|
||||
$options[ $id ] = $item->mapped('title');
|
||||
$descriptions[ $id ] = \IPS\Member::loggedIn()->language()->addToStack( 'byline_merge', FALSE, array( 'htmlsprintf' => array( $item->author()->name, \IPS\DateTime::ts( $item->mapped('date') )->html() ) ) );
|
||||
}
|
||||
@@ -879,7 +880,11 @@ class _Content extends Table
|
||||
{
|
||||
if ( $id != $values['merge_master'] )
|
||||
{
|
||||
$otherItems[] = $class::load( $id );
|
||||
$otherItem = $class::load( $id );
|
||||
if( $otherItem->canMerge() )
|
||||
{
|
||||
$otherItems[] = $otherItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -949,16 +954,8 @@ class _Content extends Table
|
||||
/* Now update the containers in one go */
|
||||
foreach( $containers as $container )
|
||||
{
|
||||
if ( $container->_comments !== NULL )
|
||||
{
|
||||
$container->setLastComment();
|
||||
}
|
||||
|
||||
if ( $container->_reviews !== NULL )
|
||||
{
|
||||
$container->setLastReview();
|
||||
}
|
||||
|
||||
$container->setLastComment();
|
||||
$container->setLastReview();
|
||||
$container->resetCommentCounts();
|
||||
$container->save();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user