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

@ -1075,7 +1075,7 @@ function setup_style()
}
}
$template = new TorrentPier\Legacy\Template(TEMPLATES_DIR . '/' . $tpl_dir_name);
$template = new TorrentPier\Template(TEMPLATES_DIR . '/' . $tpl_dir_name);
$css_dir = 'styles/' . basename(TEMPLATES_DIR) . '/' . $tpl_dir_name . '/css/';
$template->assign_vars([
@ -1342,7 +1342,7 @@ function bb_die($msg_text, $status_code = null)
// If the header hasn't been output then do it
if (!defined('PAGE_HEADER_SENT')) {
if (empty($template)) {
$template = new TorrentPier\Legacy\Template(BB_ROOT . "templates/{$bb_cfg['tpl_name']}");
$template = new TorrentPier\Template(BB_ROOT . "templates/{$bb_cfg['tpl_name']}");
}
if (empty($theme)) {
$theme = setup_style();
@ -2004,12 +2004,12 @@ function update_atom($type, $id)
{
switch ($type) {
case 'user':
\TorrentPier\Legacy\Atom::update_user_feed($id, get_username($id));
\TorrentPier\Atom::update_user_feed($id, get_username($id));
break;
case 'topic':
$topic_poster = (int)DB()->fetch_row("SELECT topic_poster FROM " . BB_TOPICS . " WHERE topic_id = $id LIMIT 1", 'topic_poster');
\TorrentPier\Legacy\Atom::update_user_feed($topic_poster, get_username($topic_poster));
\TorrentPier\Atom::update_user_feed($topic_poster, get_username($topic_poster));
break;
}
}