mirror of
https://github.com/Mibew/mibew.git
synced 2024-11-15 08:34:11 +03:00
parent
bc16b7c25f
commit
f4ad0a2351
@ -430,15 +430,17 @@ class Thread
|
||||
);
|
||||
|
||||
// Perform the cleaning
|
||||
$revision = self::nextRevision();
|
||||
foreach ($rows as $row) {
|
||||
$thread = Thread::createFromDbInfo($row);
|
||||
$thread->lastRevision = $revision;
|
||||
$thread->modified = $now;
|
||||
$thread->closed = $now;
|
||||
$thread->state = self::STATE_CLOSED;
|
||||
$thread->save();
|
||||
unset($thread);
|
||||
if (count($rows) > 0) {
|
||||
$revision = self::nextRevision();
|
||||
foreach ($rows as $row) {
|
||||
$thread = Thread::createFromDbInfo($row);
|
||||
$thread->lastRevision = $revision;
|
||||
$thread->modified = $now;
|
||||
$thread->closed = $now;
|
||||
$thread->state = self::STATE_CLOSED;
|
||||
$thread->save(false);
|
||||
unset($thread);
|
||||
}
|
||||
}
|
||||
|
||||
// Release the lock
|
||||
|
Loading…
Reference in New Issue
Block a user