Version 5.0.0 beta 4
This commit is contained in:
1 parent
e86153356a
commit
2f24f9de48
276 files changed
+8614
-6044
No files matched your search
@@ -18,6 +18,7 @@ use Exception;
|
||||
use IPS\Application;
|
||||
use IPS\convert\App;
|
||||
use IPS\Db;
|
||||
use IPS\Extensions\QueueAbstract;
|
||||
use IPS\forums\Topic\ArchivedPost;
|
||||
use IPS\Member;
|
||||
use IPS\Patterns\ActiveRecordIterator;
|
||||
@@ -35,7 +36,7 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
/**
|
||||
* Background Task
|
||||
*/
|
||||
class DeleteEmptyTopics
|
||||
class DeleteEmptyTopics extends QueueAbstract
|
||||
{
|
||||
/**
|
||||
* Parse data before queuing
|
||||
@@ -69,7 +70,7 @@ class DeleteEmptyTopics
|
||||
*
|
||||
* @param mixed $data Data as it was passed to \IPS\Task::queue()
|
||||
* @param int $offset Offset
|
||||
* @return int|null New offset or NULL if complete
|
||||
* @return int New offset or NULL if complete
|
||||
* @throws OutOfRangeException Indicates offset doesn't exist and thus task is complete
|
||||
*/
|
||||
public function run( mixed &$data, int $offset ): int
|
||||
@@ -109,7 +110,7 @@ class DeleteEmptyTopics
|
||||
}
|
||||
|
||||
/* If the topic isn't archived, we can delete it */
|
||||
if ( $topic->isArchived() == FALSE )
|
||||
if ( !$topic->isArchived() )
|
||||
{
|
||||
$topic->delete();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user