mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 02:27:34 -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
|
@ -21,7 +21,7 @@ attachment_quota_settings('group', $mode, isset($_POST['group_update']));
|
|||
|
||||
if (!empty($_POST['edit']) || !empty($_POST['new'])) {
|
||||
if (!empty($_POST['edit'])) {
|
||||
if (!$row = TorrentPier\Group::get_group_data($group_id)) {
|
||||
if (!$row = \TorrentPier\Legacy\Group::get_group_data($group_id)) {
|
||||
bb_die($lang['GROUP_NOT_EXIST']);
|
||||
}
|
||||
$group_info = [
|
||||
|
@ -72,11 +72,11 @@ if (!empty($_POST['edit']) || !empty($_POST['new'])) {
|
|||
]);
|
||||
} elseif (!empty($_POST['group_update'])) {
|
||||
if (!empty($_POST['group_delete'])) {
|
||||
if (!$group_info = TorrentPier\Group::get_group_data($group_id)) {
|
||||
if (!$group_info = \TorrentPier\Legacy\Group::get_group_data($group_id)) {
|
||||
bb_die($lang['GROUP_NOT_EXIST']);
|
||||
}
|
||||
// Delete Group
|
||||
TorrentPier\Group::delete_group($group_id);
|
||||
\TorrentPier\Legacy\Group::delete_group($group_id);
|
||||
|
||||
$message = $lang['DELETED_GROUP'] . '<br /><br />';
|
||||
$message .= sprintf($lang['CLICK_RETURN_GROUPSADMIN'], '<a href="admin_groups.php">', '</a>') . '<br /><br />';
|
||||
|
@ -111,18 +111,18 @@ if (!empty($_POST['edit']) || !empty($_POST['new'])) {
|
|||
];
|
||||
|
||||
if ($mode == 'editgroup') {
|
||||
if (!$group_info = TorrentPier\Group::get_group_data($group_id)) {
|
||||
if (!$group_info = \TorrentPier\Legacy\Group::get_group_data($group_id)) {
|
||||
bb_die($lang['GROUP_NOT_EXIST']);
|
||||
}
|
||||
|
||||
if ($group_info['group_moderator'] != $group_moderator) {
|
||||
// Create user_group for new group's moderator
|
||||
TorrentPier\Group::add_user_into_group($group_id, $group_moderator);
|
||||
\TorrentPier\Legacy\Group::add_user_into_group($group_id, $group_moderator);
|
||||
$sql_ary['mod_time'] = TIMENOW;
|
||||
|
||||
// Delete old moderator's user_group
|
||||
if (isset($_POST['delete_old_moderator'])) {
|
||||
TorrentPier\Group::delete_user_group($group_id, $group_info['group_moderator']);
|
||||
\TorrentPier\Legacy\Group::delete_user_group($group_id, $group_info['group_moderator']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ if (!empty($_POST['edit']) || !empty($_POST['new'])) {
|
|||
$new_group_id = DB()->sql_nextid();
|
||||
|
||||
// Create user_group for group's moderator
|
||||
TorrentPier\Group::add_user_into_group($new_group_id, $group_moderator);
|
||||
\TorrentPier\Legacy\Group::add_user_into_group($new_group_id, $group_moderator);
|
||||
|
||||
$message = $lang['ADDED_NEW_GROUP'] . '<br /><br />';
|
||||
$message .= sprintf($lang['CLICK_RETURN_GROUPSADMIN'], '<a href="admin_groups.php">', '</a>') . '<br /><br />';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue