Replaced bb_exit() with native (#731)

This commit is contained in:
Roman Kelesidis 2023-05-29 12:13:20 +07:00 committed by GitHub
commit eb94659c61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 15 deletions

View file

@ -128,4 +128,4 @@ echo '</body></html>';
DB()->query('DROP TEMPORARY TABLE ' . TMP_TRACKER_TABLE); DB()->query('DROP TEMPORARY TABLE ' . TMP_TRACKER_TABLE);
bb_exit(); exit();

View file

@ -1692,7 +1692,7 @@ function caching_output($enabled, $mode, $cache_var_name, $ttl = 300)
if ($mode == 'send') { if ($mode == 'send') {
if ($cached_contents = CACHE('bb_cache')->get($cache_var_name)) { if ($cached_contents = CACHE('bb_cache')->get($cache_var_name)) {
bb_exit($cached_contents); exit($cached_contents);
} }
} elseif ($mode == 'store') { } elseif ($mode == 'store') {
if ($output = ob_get_contents()) { if ($output = ob_get_contents()) {

View file

@ -333,17 +333,6 @@ function send_no_cache_headers()
header('Pragma: no-cache'); header('Pragma: no-cache');
} }
/**
* @param string $output
*/
function bb_exit($output = '')
{
if ($output) {
echo $output;
}
exit;
}
/** /**
* Convert special characters to HTML entities * Convert special characters to HTML entities
* *

View file

@ -89,4 +89,4 @@ if (defined('REQUESTED_PAGE') && !defined('DISABLE_CACHING_OUTPUT')) {
} }
} }
bb_exit(); exit();

View file

@ -552,7 +552,7 @@ class Torrent
header("Content-Type: application/x-bittorrent; name=\"$dl_fname\""); header("Content-Type: application/x-bittorrent; name=\"$dl_fname\"");
header("Content-Disposition: attachment; filename=\"$dl_fname\""); header("Content-Disposition: attachment; filename=\"$dl_fname\"");
bb_exit($output); exit($output);
} }
/** /**