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

* refactor: Moved classes from `Legacy` folder to `src` root

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updater

* Update Caches.php

* Updater

* Updater

* Updater

* Updater

* Update Attach.php

* Update Post.php

* Update BBCode.php

* Update SqlDb.php

* Update Upload.php

* Update Upload.php

* Updated

* Updated

* Revert "Updated"

This reverts commit 9ecc26b048.

* Revert "Updated"

This reverts commit 22db50889c.

* Revert "Update Upload.php"

This reverts commit a6faf4191a.
This commit is contained in:
Roman Kelesidis 2025-03-02 01:18:26 +07:00 committed by GitHub
commit 92ce77ec0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
73 changed files with 260 additions and 278 deletions

View file

@ -12,9 +12,9 @@ if (!defined('BB_ROOT')) {
}
// Synchronization
\TorrentPier\Legacy\Admin\Common::sync('topic', 'all');
\TorrentPier\Legacy\Admin\Common::sync('user_posts', 'all');
\TorrentPier\Legacy\Admin\Common::sync_all_forums();
\TorrentPier\Admin\Common::sync('topic', 'all');
\TorrentPier\Admin\Common::sync('user_posts', 'all');
\TorrentPier\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\Legacy\Admin\Common::topic_delete('prune', $row['forum_id'], (TIMENOW - 86400 * $row['prune_days']));
\TorrentPier\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\Legacy\Admin\Common::user_delete($prune_users);
\TorrentPier\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\Legacy\Atom::update_forum_feed(0, $forums_data);
\TorrentPier\Atom::update_forum_feed(0, $forums_data);
}
} else {
\TorrentPier\Legacy\Atom::update_forum_feed(0, $forums_data);
\TorrentPier\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\Legacy\Atom::update_forum_feed($forum_data['forum_id'], $forum_data);
\TorrentPier\Atom::update_forum_feed($forum_data['forum_id'], $forum_data);
}
} else {
\TorrentPier\Legacy\Atom::update_forum_feed($forum_data['forum_id'], $forum_data);
\TorrentPier\Atom::update_forum_feed($forum_data['forum_id'], $forum_data);
}
}