PSR-4 compatible legacy code autoloading.

This commit is contained in:
Yuriy Pikhtarev 2017-05-22 22:52:41 +03:00
commit 80a035d191
No known key found for this signature in database
GPG key ID: 3A9B5A757B48ECC6
50 changed files with 5296 additions and 4522 deletions

View file

@ -56,8 +56,7 @@ if ($is_moderator) {
// Avatar
if ($submit) {
if (!empty($_FILES['avatar']['name']) && $bb_cfg['group_avatars']['up_allowed']) {
require INC_DIR . '/functions_upload.php';
$upload = new upload_common();
$upload = new TorrentPier\Legacy\Common\Upload();
if ($upload->init($bb_cfg['group_avatars'], $_FILES['avatar']) and $upload->store('avatar', array("user_id" => GROUP_AVATAR_MASK . $group_id, "avatar_ext_id" => $group_info['avatar_ext_id']))) {
$avatar_ext_id = (int)$upload->file_ext_id;