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

@ -23,7 +23,7 @@ $is_moderator = false;
$submit = !empty($_POST['submit']);
if ($group_id) {
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_id'] || !$group_info['group_moderator'] || !$group_info['moderator_name']) {
@ -36,7 +36,7 @@ if ($is_moderator) {
// Avatar
if ($submit) {
if (!empty($_FILES['avatar']['name']) && $bb_cfg['group_avatars']['up_allowed']) {
$upload = new \TorrentPier\Common\Upload();
$upload = new TorrentPier\Legacy\Common\Upload();
if ($upload->init($bb_cfg['group_avatars'], $_FILES['avatar']) and $upload->store('avatar', ['user_id' => GROUP_AVATAR_MASK . $group_id, 'avatar_ext_id' => $group_info['avatar_ext_id']])) {
$avatar_ext_id = (int)$upload->file_ext_id;