Added separate context class for forum stuff and split up handling of each object type.
This commit is contained in:
parent
0971240ab1
commit
a94b905116
24 changed files with 1853 additions and 1714 deletions
tools
|
@ -75,7 +75,7 @@ msz_sched_task_sql('Synchronise forum_id.', true,
|
|||
'UPDATE msz_forum_posts AS p INNER JOIN msz_forum_topics AS t ON t.topic_id = p.topic_id SET p.forum_id = t.forum_id');
|
||||
|
||||
msz_sched_task_func('Recount forum topics and posts.', true, function() use ($msz) {
|
||||
$msz->getForum()->syncForumCounters();
|
||||
$msz->getForumContext()->getCategories()->syncForumCounters();
|
||||
});
|
||||
|
||||
msz_sched_task_sql('Clean up expired 2fa tokens.', false,
|
||||
|
@ -146,7 +146,7 @@ msz_sched_task_func('Recalculate permissions (maybe)...', false, function() use
|
|||
return;
|
||||
|
||||
$msz->getConfig()->removeValues('perms.needsRecalc');
|
||||
$msz->getPerms()->precalculatePermissions($msz->getForum());
|
||||
$msz->getPerms()->precalculatePermissions($msz->getForumContext()->getCategories());
|
||||
});
|
||||
|
||||
echo 'Running ' . count($schedTasks) . ' tasks...' . PHP_EOL;
|
||||
|
|
|
@ -5,4 +5,4 @@ namespace Misuzu;
|
|||
require_once __DIR__ . '/../misuzu.php';
|
||||
|
||||
$msz->getConfig()->removeValues('perms.needsRecalc');
|
||||
$msz->getPerms()->precalculatePermissions($msz->getForum());
|
||||
$msz->getPerms()->precalculatePermissions($msz->getForumContext()->getCategories());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue