mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 22:33:55 -07:00
Updated
This commit is contained in:
parent
e8076f421e
commit
2359724031
3 changed files with 5 additions and 3 deletions
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR);
|
define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR);
|
||||||
|
define('BB_PATH', BB_ROOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check CLI mode
|
// Check CLI mode
|
||||||
|
@ -18,7 +19,7 @@ if (php_sapi_name() !== 'cli') {
|
||||||
|
|
||||||
if (!function_exists('removeFile')) {
|
if (!function_exists('removeFile')) {
|
||||||
// Get all constants
|
// Get all constants
|
||||||
require_once BB_PATH . '/library/defines.php';
|
require_once BB_ROOT . 'library/defines.php';
|
||||||
|
|
||||||
// Include CLI functions
|
// Include CLI functions
|
||||||
require INC_DIR . '/functions_cli.php';
|
require INC_DIR . '/functions_cli.php';
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR);
|
define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR);
|
||||||
|
define('BB_PATH', BB_ROOT);
|
||||||
|
|
||||||
// Check CLI mode
|
// Check CLI mode
|
||||||
if (php_sapi_name() !== 'cli') {
|
if (php_sapi_name() !== 'cli') {
|
||||||
|
@ -15,7 +16,7 @@ if (php_sapi_name() !== 'cli') {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get all constants
|
// Get all constants
|
||||||
require_once BB_PATH . '/library/defines.php';
|
require_once BB_ROOT . 'library/defines.php';
|
||||||
|
|
||||||
// Include CLI functions
|
// Include CLI functions
|
||||||
require INC_DIR . '/functions_cli.php';
|
require INC_DIR . '/functions_cli.php';
|
||||||
|
|
|
@ -44,7 +44,7 @@ function removeDir(string $dir, bool $withoutOutput = false): void
|
||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
if ($file->isDir()) {
|
if ($file->isDir()) {
|
||||||
removeDir($file->getPathname());
|
removeDir($file->getPathname(), $withoutOutput);
|
||||||
} else {
|
} else {
|
||||||
removeFile($file->getPathname(), $withoutOutput);
|
removeFile($file->getPathname(), $withoutOutput);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue