mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Change paths to absolute pathname
This commit is contained in:
parent
8de3cbfba5
commit
064175c67d
81 changed files with 297 additions and 303 deletions
|
@ -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'];
|
||||
|
|
|
@ -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"' : '';
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue