Change paths to absolute pathname

This commit is contained in:
Vasily Komrakov 2017-02-05 22:28:55 +03:00
commit 064175c67d
No known key found for this signature in database
GPG key ID: 558236680C20A69A
81 changed files with 297 additions and 303 deletions

View file

@ -27,11 +27,11 @@ if (!defined('IN_FORUM')) {
die("Hacking attempt");
}
require(ATTACH_DIR . 'includes/functions_includes.php');
require(ATTACH_DIR . 'includes/functions_attach.php');
require(ATTACH_DIR . 'includes/functions_delete.php');
require(ATTACH_DIR . 'includes/functions_thumbs.php');
require(ATTACH_DIR . 'includes/functions_filetypes.php');
require ATTACH_DIR . '/includes/functions_includes.php';
require ATTACH_DIR . '/includes/functions_attach.php';
require ATTACH_DIR . '/includes/functions_delete.php';
require ATTACH_DIR . '/includes/functions_thumbs.php';
require ATTACH_DIR . '/includes/functions_filetypes.php';
if (defined('ATTACH_INSTALL')) {
return;
@ -44,18 +44,17 @@ function attach_mod_get_lang($language_file)
{
global $attach_config, $bb_cfg;
$language = $bb_cfg['default_lang'];
if (!file_exists(LANG_ROOT_DIR . "$language/$language_file.php")) {
$language = $attach_config['board_lang'];
if (!file_exists(LANG_ROOT_DIR . "$language/$language_file.php")) {
bb_die('Attachment mod language file does not exist: language/' . $language . '/' . $language_file . '.php');
} else {
return $language;
}
$file = LANG_ROOT_DIR . '/' . $bb_cfg['default_lang'] . '/' . $language_file . '.php';
if (file_exists($file)) {
return $bb_cfg['default_lang'];
} else {
return $language;
$file = LANG_ROOT_DIR . '/' . $attach_config['board_lang'] . '/' . $language_file . '.php';
if (file_exists($file)) {
return $attach_config['board_lang'];
}
}
bb_die('Attachment mod language file does not exist: language/' . $attach_config['board_lang'] . '/' . $language_file . '.php');
}
/**
@ -91,7 +90,7 @@ if (!$attach_config = CACHE('bb_cache')->get('attach_config')) {
CACHE('bb_cache')->set('attach_config', $attach_config, 86400);
}
include(ATTACH_DIR . 'displaying.php');
include(ATTACH_DIR . 'posting_attachments.php');
include ATTACH_DIR . '/displaying.php';
include ATTACH_DIR . '/posting_attachments.php';
$upload_dir = $attach_config['upload_dir'];

View file

@ -302,7 +302,7 @@ function display_attachments($post_id)
// bt
if ($link && ($attachments['_' . $post_id][$i]['extension'] === TORRENT_EXT)) {
include(ATTACH_DIR . 'displaying_torrent.php');
include ATTACH_DIR . '/displaying_torrent.php';
} elseif ($link) {
$target_blank = ((@intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == IMAGE_CAT)) ? 'target="_blank"' : '';

View file

@ -32,8 +32,6 @@
*/
function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0, $user_id = 0)
{
global $bb_cfg;
// Generate Array, if it's not an array
if ($post_id_array === 0 && $attach_id_array === 0 && $page === 0) {
return;

View file

@ -52,9 +52,9 @@ function attachment_quota_settings($admin_mode, $submit = false, $mode)
$upload_dir = BB_ROOT . $attach_config['upload_dir'];
}
include(ATTACH_DIR . 'includes/functions_selects.php');
include ATTACH_DIR . '/includes/functions_selects.php';
if (!function_exists("process_quota_settings")) {
include(ATTACH_DIR . 'includes/functions_admin.php');
include ATTACH_DIR . '/includes/functions_admin.php';
}
$user_id = 0;

View file

@ -482,7 +482,7 @@ class attach_parent
//bt
if ($this->attachment_extension_list[$actual_element] === TORRENT_EXT && $attachments[$actual_element]['tracker_status']) {
include(INC_DIR . 'functions_torrent.php');
include INC_DIR . '/functions_torrent.php';
tracker_unregister($attachment_id);
}
//bt end