mirror of
https://github.com/friendica/friendica
synced 2025-04-26 21:10:16 +00:00
New post class in protocol and worker classes
This commit is contained in:
parent
3ab4e20fe6
commit
68502daed0
14 changed files with 97 additions and 111 deletions
|
@ -23,6 +23,7 @@ namespace Friendica\Worker;
|
|||
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Item;
|
||||
use Friendica\Model\Post;
|
||||
|
||||
/**
|
||||
* Removes orphaned data from deleted users
|
||||
|
@ -39,11 +40,11 @@ class RemoveUser {
|
|||
// Now we delete all user items
|
||||
$condition = ['uid' => $uid, 'deleted' => false];
|
||||
do {
|
||||
$items = Item::select(['id'], $condition, ['limit' => 100]);
|
||||
while ($item = Item::fetch($items)) {
|
||||
$items = Post::select(['id'], $condition, ['limit' => 100]);
|
||||
while ($item = Post::fetch($items)) {
|
||||
Item::markForDeletionById($item['id'], PRIORITY_NEGLIGIBLE);
|
||||
}
|
||||
DBA::close($items);
|
||||
} while (Item::exists($condition));
|
||||
} while (Post::exists($condition));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue