Replaced bb_realpath() with native (#740)

This commit is contained in:
Roman Kelesidis 2023-05-29 23:32:29 +07:00 committed by GitHub
commit c6b6a79da9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View file

@ -30,7 +30,7 @@ $smiley_paks = [];
$dir = opendir(BB_ROOT . $bb_cfg['smilies_path']);
while ($file = @readdir($dir)) {
if (!is_dir(bb_realpath(BB_ROOT . $bb_cfg['smilies_path'] . '/' . $file))) {
if (!is_dir(realpath(BB_ROOT . $bb_cfg['smilies_path'] . '/' . $file))) {
$img_size = getimagesize(BB_ROOT . $bb_cfg['smilies_path'] . '/' . $file);
if ($img_size[0] && $img_size[1]) {

View file

@ -1295,7 +1295,7 @@ function obtain_word_list(&$orig_word, &$replacement_word)
global $bb_cfg;
if (!$bb_cfg['use_word_censor']) {
return;
return false;
}
if (!$sql = CACHE('bb_cache')->get('censored')) {
@ -1381,11 +1381,6 @@ function bb_simple_die($txt)
die($txt);
}
function bb_realpath($path)
{
return realpath($path);
}
function login_redirect($url = '')
{
redirect(LOGIN_URL . '?redirect=' . (($url) ?: ($_SERVER['REQUEST_URI'] ?? '/')));