refactor: Moved classes from Legacy folder to src root (#1828)

* refactor: Moved classes from `Legacy` folder to `src` root

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updated

* Updater

* Update Caches.php

* Updater

* Updater

* Updater

* Updater

* Update Attach.php

* Update Post.php

* Update BBCode.php

* Update SqlDb.php

* Update Upload.php

* Update Upload.php

* Updated

* Updated

* Revert "Updated"

This reverts commit 9ecc26b048.

* Revert "Updated"

This reverts commit 22db50889c.

* Revert "Update Upload.php"

This reverts commit a6faf4191a.
This commit is contained in:
Roman Kelesidis 2025-03-02 01:18:26 +07:00 committed by GitHub
commit 92ce77ec0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
73 changed files with 260 additions and 278 deletions

View file

@ -109,7 +109,7 @@ unset($server_protocol, $server_port);
/**
* Database
*/
$DBS = new TorrentPier\Legacy\Dbs($bb_cfg);
$DBS = new TorrentPier\Dbs($bb_cfg);
function DB(string $db_alias = 'db')
{
@ -120,7 +120,7 @@ function DB(string $db_alias = 'db')
/**
* Cache
*/
$CACHES = new TorrentPier\Legacy\Caches($bb_cfg);
$CACHES = new TorrentPier\Caches($bb_cfg);
function CACHE(string $cache_name)
{
@ -133,20 +133,20 @@ function CACHE(string $cache_name)
*/
switch ($bb_cfg['datastore_type']) {
case 'apcu':
$datastore = new TorrentPier\Legacy\Datastore\APCu($bb_cfg['cache']['prefix']);
$datastore = new \TorrentPier\Datastore\APCu($bb_cfg['cache']['prefix']);
break;
case 'memcached':
$datastore = new TorrentPier\Legacy\Datastore\Memcached($bb_cfg['cache']['memcached'], $bb_cfg['cache']['prefix']);
$datastore = new \TorrentPier\Datastore\Memcached($bb_cfg['cache']['memcached'], $bb_cfg['cache']['prefix']);
break;
case 'sqlite':
$datastore = new TorrentPier\Legacy\Datastore\Sqlite($bb_cfg['cache']['db_dir'] . 'datastore', $bb_cfg['cache']['prefix']);
$datastore = new \TorrentPier\Datastore\Sqlite($bb_cfg['cache']['db_dir'] . 'datastore', $bb_cfg['cache']['prefix']);
break;
case 'redis':
$datastore = new TorrentPier\Legacy\Datastore\Redis($bb_cfg['cache']['redis'], $bb_cfg['cache']['prefix']);
$datastore = new \TorrentPier\Datastore\Redis($bb_cfg['cache']['redis'], $bb_cfg['cache']['prefix']);
break;
case 'filecache':
default:
$datastore = new TorrentPier\Legacy\Datastore\File($bb_cfg['cache']['db_dir'] . 'datastore/', $bb_cfg['cache']['prefix']);
$datastore = new \TorrentPier\Datastore\File($bb_cfg['cache']['db_dir'] . 'datastore/', $bb_cfg['cache']['prefix']);
}
// Functions