mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Revert "refactor: Moved classes from Legacy
folder to src
root (#1828)"
This reverts commit 92ce77ec0e
.
This commit is contained in:
parent
680bd77920
commit
380c94ff07
73 changed files with 276 additions and 258 deletions
|
@ -85,7 +85,7 @@ switch ($mode) {
|
|||
}
|
||||
}
|
||||
|
||||
TorrentPier\Torrent::change_tor_status($attach_id, $new_status);
|
||||
\TorrentPier\Legacy\Torrent::change_tor_status($attach_id, $new_status);
|
||||
|
||||
// Log action
|
||||
$log_msg = sprintf($lang['TOR_STATUS_LOG_ACTION'], $bb_cfg['tor_icons'][$new_status] . ' <b> ' . $lang['TOR_STATUS_NAME'][$new_status] . '</b>', $bb_cfg['tor_icons'][$tor['tor_status']] . ' <b> ' . $lang['TOR_STATUS_NAME'][$tor['tor_status']] . '</b>');
|
||||
|
|
|
@ -23,7 +23,7 @@ if (!isset($this->request['type'])) {
|
|||
$attach_id = (int)$this->request['attach_id'];
|
||||
$type = (string)$this->request['type'];
|
||||
|
||||
if (!$torrent = TorrentPier\Torrent::get_torrent_info($attach_id)) {
|
||||
if (!$torrent = \TorrentPier\Legacy\Torrent::get_torrent_info($attach_id)) {
|
||||
$this->ajax_die($lang['INVALID_ATTACH_ID']);
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ switch ($type) {
|
|||
$tor_type_lang = "{$lang['UNSET_GOLD_TORRENT']} / {$lang['UNSET_SILVER_TORRENT']}";
|
||||
}
|
||||
|
||||
TorrentPier\Torrent::change_tor_type($attach_id, $tor_type);
|
||||
\TorrentPier\Legacy\Torrent::change_tor_type($attach_id, $tor_type);
|
||||
|
||||
// Log action
|
||||
$log_action->mod('mod_topic_change_tor_type', [
|
||||
|
@ -67,12 +67,12 @@ switch ($type) {
|
|||
break;
|
||||
|
||||
case 'reg':
|
||||
TorrentPier\Torrent::tracker_register($attach_id);
|
||||
\TorrentPier\Legacy\Torrent::tracker_register($attach_id);
|
||||
$url = (TOPIC_URL . $torrent['topic_id']);
|
||||
break;
|
||||
|
||||
case 'unreg':
|
||||
TorrentPier\Torrent::tracker_unregister($attach_id);
|
||||
\TorrentPier\Legacy\Torrent::tracker_unregister($attach_id);
|
||||
$url = (TOPIC_URL . $torrent['topic_id']);
|
||||
break;
|
||||
|
||||
|
@ -80,7 +80,7 @@ switch ($type) {
|
|||
if (empty($this->request['confirmed'])) {
|
||||
$this->prompt_for_confirm($lang['DEL_TORRENT']);
|
||||
}
|
||||
TorrentPier\Torrent::delete_torrent($attach_id);
|
||||
\TorrentPier\Legacy\Torrent::delete_torrent($attach_id);
|
||||
$url = make_url(TOPIC_URL . $torrent['topic_id']);
|
||||
break;
|
||||
|
||||
|
@ -88,7 +88,7 @@ switch ($type) {
|
|||
if (empty($this->request['confirmed'])) {
|
||||
$this->prompt_for_confirm($lang['DEL_MOVE_TORRENT']);
|
||||
}
|
||||
TorrentPier\Torrent::delete_torrent($attach_id);
|
||||
\TorrentPier\Legacy\Torrent::delete_torrent($attach_id);
|
||||
$url = make_url("modcp.php?" . POST_TOPIC_URL . "={$torrent['topic_id']}&mode=move&sid={$userdata['session_id']}");
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ if (!defined('IN_AJAX')) {
|
|||
|
||||
global $bb_cfg, $userdata, $lang;
|
||||
|
||||
if (!$group_id = (int)$this->request['group_id'] or !$group_info = TorrentPier\Group::get_group_data($group_id)) {
|
||||
if (!$group_id = (int)$this->request['group_id'] or !$group_info = \TorrentPier\Legacy\Group::get_group_data($group_id)) {
|
||||
$this->ajax_die($lang['NO_GROUP_ID_SPECIFIED']);
|
||||
}
|
||||
if (!$mode = (string)$this->request['mode']) {
|
||||
|
|
|
@ -66,16 +66,16 @@ switch ($mode) {
|
|||
$this->response['indexer_html'] = '<span class="seed bold">' . $lang['INDEXER'] . '</span>';
|
||||
break;
|
||||
case 'update_user_level':
|
||||
TorrentPier\Group::update_user_level('all');
|
||||
\TorrentPier\Legacy\Group::update_user_level('all');
|
||||
$this->response['update_user_level_html'] = '<span class="seed bold">' . $lang['USER_LEVELS_UPDATED'] . '</span>';
|
||||
break;
|
||||
case 'sync_topics':
|
||||
\TorrentPier\Admin\Common::sync('topic', 'all');
|
||||
\TorrentPier\Admin\Common::sync_all_forums();
|
||||
\TorrentPier\Legacy\Admin\Common::sync('topic', 'all');
|
||||
\TorrentPier\Legacy\Admin\Common::sync_all_forums();
|
||||
$this->response['sync_topics_html'] = '<span class="seed bold">' . $lang['TOPICS_DATA_SYNCHRONIZED'] . '</span>';
|
||||
break;
|
||||
case 'sync_user_posts':
|
||||
\TorrentPier\Admin\Common::sync('user_posts', 'all');
|
||||
\TorrentPier\Legacy\Admin\Common::sync('user_posts', 'all');
|
||||
$this->response['sync_user_posts_html'] = '<span class="seed bold">' . $lang['USER_POSTS_COUNT_SYNCHRONIZED'] . '</span>';
|
||||
break;
|
||||
case 'unlock_cron':
|
||||
|
|
|
@ -37,7 +37,7 @@ switch ($mode) {
|
|||
|
||||
if (!in_array($user_id, explode(',', EXCLUDED_USERS))) {
|
||||
\TorrentPier\Sessions::delete_user_sessions($user_id);
|
||||
\TorrentPier\Admin\Common::user_delete($user_id);
|
||||
\TorrentPier\Legacy\Admin\Common::user_delete($user_id);
|
||||
|
||||
$user_id = $userdata['user_id']; // Store self user_id for redirect after successful deleting
|
||||
$this->response['info'] = $lang['USER_DELETED'];
|
||||
|
@ -54,8 +54,8 @@ switch ($mode) {
|
|||
}
|
||||
|
||||
$user_topics = DB()->fetch_rowset("SELECT topic_id FROM " . BB_TOPICS . " WHERE topic_poster = $user_id", 'topic_id');
|
||||
$deleted_topics = \TorrentPier\Admin\Common::topic_delete($user_topics);
|
||||
$deleted_posts = \TorrentPier\Admin\Common::post_delete('user', $user_id);
|
||||
$deleted_topics = \TorrentPier\Legacy\Admin\Common::topic_delete($user_topics);
|
||||
$deleted_posts = \TorrentPier\Legacy\Admin\Common::post_delete('user', $user_id);
|
||||
$this->response['info'] = $lang['USER_DELETED_POSTS'];
|
||||
break;
|
||||
case 'delete_message':
|
||||
|
@ -66,7 +66,7 @@ switch ($mode) {
|
|||
$this->prompt_for_confirm($lang['DELETE_USER_POSTS_CONFIRM']);
|
||||
}
|
||||
|
||||
\TorrentPier\Admin\Common::post_delete('user', $user_id);
|
||||
\TorrentPier\Legacy\Admin\Common::post_delete('user', $user_id);
|
||||
$this->response['info'] = $lang['USER_DELETED_POSTS'];
|
||||
break;
|
||||
case 'user_activate':
|
||||
|
|
|
@ -41,7 +41,7 @@ switch ($mode) {
|
|||
$this->ajax_die($lang['TORRENT_FAILED']);
|
||||
}
|
||||
|
||||
TorrentPier\Torrent::change_tor_status($attach_id, $status);
|
||||
\TorrentPier\Legacy\Torrent::change_tor_status($attach_id, $status);
|
||||
|
||||
// Log action
|
||||
$log_msg = sprintf($lang['TOR_STATUS_LOG_ACTION'], $bb_cfg['tor_icons'][$status] . ' <b> ' . $lang['TOR_STATUS_NAME'][$status] . '</b>', $bb_cfg['tor_icons'][$tor['tor_status']] . ' <b> ' . $lang['TOR_STATUS_NAME'][$tor['tor_status']] . '</b>');
|
||||
|
|
|
@ -31,11 +31,11 @@ switch ($mode) {
|
|||
$this->prompt_for_confirm($lang['BT_GEN_PASSKEY_NEW']);
|
||||
}
|
||||
|
||||
if (!$passkey = TorrentPier\Torrent::generate_passkey($req_uid, IS_ADMIN)) {
|
||||
if (!$passkey = \TorrentPier\Legacy\Torrent::generate_passkey($req_uid, IS_ADMIN)) {
|
||||
$this->ajax_die('Could not insert passkey');
|
||||
}
|
||||
|
||||
TorrentPier\Torrent::tracker_rm_user($req_uid);
|
||||
\TorrentPier\Legacy\Torrent::tracker_rm_user($req_uid);
|
||||
$this->response['passkey'] = $passkey;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -53,7 +53,7 @@ switch ($this->request['type']) {
|
|||
if (empty($this->request['confirmed'])) {
|
||||
$this->prompt_for_confirm($lang['CONFIRM_DELETE']);
|
||||
}
|
||||
\TorrentPier\Admin\Common::post_delete($post_id);
|
||||
\TorrentPier\Legacy\Admin\Common::post_delete($post_id);
|
||||
|
||||
// Update atom feed
|
||||
update_atom('topic', (int)$this->request['topic_id']);
|
||||
|
@ -262,7 +262,7 @@ switch ($this->request['type']) {
|
|||
$post_id = DB()->sql_nextid();
|
||||
DB()->sql_query("INSERT INTO " . BB_POSTS_TEXT . " (post_id, post_text) VALUES ($post_id, '" . DB()->escape($message) . "')");
|
||||
|
||||
TorrentPier\Post::update_post_stats('reply', $post, $post['forum_id'], $topic_id, $post_id, $userdata['user_id']);
|
||||
\TorrentPier\Legacy\Post::update_post_stats('reply', $post, $post['forum_id'], $topic_id, $post_id, $userdata['user_id']);
|
||||
|
||||
$s_message = str_replace('\n', "\n", $message);
|
||||
$s_topic_title = str_replace('\n', "\n", $post['topic_title']);
|
||||
|
@ -274,7 +274,7 @@ switch ($this->request['type']) {
|
|||
|
||||
if ($bb_cfg['topic_notify_enabled']) {
|
||||
$notify = !empty($this->request['notify']);
|
||||
TorrentPier\Post::user_notification('reply', $post, $post['topic_title'], $post['forum_id'], $topic_id, $notify);
|
||||
\TorrentPier\Legacy\Post::user_notification('reply', $post, $post['topic_title'], $post['forum_id'], $topic_id, $notify);
|
||||
}
|
||||
|
||||
// Update atom feed
|
||||
|
|
|
@ -36,7 +36,7 @@ try {
|
|||
return;
|
||||
}
|
||||
|
||||
$torrent = new TorrentPier\TorrentFileList($tor);
|
||||
$torrent = new TorrentPier\Legacy\TorrentFileList($tor);
|
||||
|
||||
$tor_filelist = $torrent->get_filelist();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue