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

@ -26,7 +26,6 @@
define('IN_FORUM', true);
define('BB_ROOT', './');
require(BB_ROOT . 'common.php');
require(INC_DIR . 'functions_upload.php');
while (@ob_end_flush()) ;
ob_implicit_flush();
@ -74,7 +73,7 @@ if ($confirm) {
'tmp_name' => BB_ROOT . $bb_cfg['avatar_path'] . '/' . basename($row['user_avatar']),
'error' => 0,
);
$upload = new upload_common();
$upload = new TorrentPier\Legacy\Common\Upload();
if ($upload->init($bb_cfg['avatars'], $FILE, false) and $upload->store('avatar', $row)) {
DB()->query("UPDATE " . BB_USERS . " SET avatar_ext_id = {$upload->file_ext_id} WHERE user_id = {$row['user_id']} LIMIT 1");