Revert "refactor: Moved classes from Legacy folder to src root (#1828)"

This reverts commit 92ce77ec0e.
This commit is contained in:
Roman Kelesidis 2025-03-02 10:07:04 +03:00
commit 380c94ff07
73 changed files with 276 additions and 258 deletions

View file

@ -12,9 +12,9 @@ if (!defined('BB_ROOT')) {
}
// Synchronization
\TorrentPier\Admin\Common::sync('topic', 'all');
\TorrentPier\Admin\Common::sync('user_posts', 'all');
\TorrentPier\Admin\Common::sync_all_forums();
\TorrentPier\Legacy\Admin\Common::sync('topic', 'all');
\TorrentPier\Legacy\Admin\Common::sync('user_posts', 'all');
\TorrentPier\Legacy\Admin\Common::sync_all_forums();
// Cleaning bb_poll_users
if ($poll_max_days = (int)$bb_cfg['poll_max_days']) {

View file

@ -15,6 +15,6 @@ if ($bb_cfg['prune_enable']) {
$sql = "SELECT forum_id, prune_days FROM " . BB_FORUMS . " WHERE prune_days != 0";
foreach (DB()->fetch_rowset($sql) as $row) {
\TorrentPier\Admin\Common::topic_delete('prune', $row['forum_id'], (TIMENOW - 86400 * $row['prune_days']));
\TorrentPier\Legacy\Admin\Common::topic_delete('prune', $row['forum_id'], (TIMENOW - 86400 * $row['prune_days']));
}
}

View file

@ -45,7 +45,7 @@ while (true) {
}
if ($prune_users = $not_activated_users + $not_active_users) {
\TorrentPier\Admin\Common::user_delete($prune_users);
\TorrentPier\Legacy\Admin\Common::user_delete($prune_users);
}
if (count($prune_users) < $users_per_cycle) {

View file

@ -18,18 +18,18 @@ $forums_data = DB()->fetch_rowset("SELECT forum_id, allow_reg_tracker, forum_nam
if (is_file($bb_cfg['atom']['path'] . '/f/0.atom')) {
if (filemtime($bb_cfg['atom']['path'] . '/f/0.atom') <= $timecheck) {
\TorrentPier\Atom::update_forum_feed(0, $forums_data);
\TorrentPier\Legacy\Atom::update_forum_feed(0, $forums_data);
}
} else {
\TorrentPier\Atom::update_forum_feed(0, $forums_data);
\TorrentPier\Legacy\Atom::update_forum_feed(0, $forums_data);
}
foreach ($forums_data as $forum_data) {
if (is_file($bb_cfg['atom']['path'] . '/f/' . $forum_data['forum_id'] . '.atom')) {
if (filemtime($bb_cfg['atom']['path'] . '/f/' . $forum_data['forum_id'] . '.atom') <= $timecheck) {
\TorrentPier\Atom::update_forum_feed($forum_data['forum_id'], $forum_data);
\TorrentPier\Legacy\Atom::update_forum_feed($forum_data['forum_id'], $forum_data);
}
} else {
\TorrentPier\Atom::update_forum_feed($forum_data['forum_id'], $forum_data);
\TorrentPier\Legacy\Atom::update_forum_feed($forum_data['forum_id'], $forum_data);
}
}