From 99b9d56ba8b7d0748687e335ac2eb18ce65710fa Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Tue, 24 Apr 2007 11:13:54 +0000 Subject: [PATCH] Hmm, does this thing work? Let's get rid of #9680 and #9843 while we are at it. git-svn-id: file:///svn/phpbb/trunk@7392 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_convert.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index f38dd6fec3..91dfd2de77 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -526,7 +526,8 @@ function _import_check($config_var, $source, $use_target) 'relative_path' => (empty($convert->convertor['source_path_absolute'])) ? true : false, ); - $target = '../' . $config[$config_var] . '/' . basename(($use_target === false) ? $source : $use_target); + // copy file will prepend $phpBB_root_path + $target = $config[$config_var] . '/' . basename(($use_target === false) ? $source : $use_target); if (!empty($convert->convertor[$config_var]) && strpos($source, $convert->convertor[$config_var]) !== 0) { @@ -2149,7 +2150,6 @@ function convert_bbcode($message, $convert_size = true, $extended_bbcodes = fals function copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $source_relative_path = true) { global $convert, $phpbb_root_path, $config, $user, $db; - if (substr($trg, -1) == '/') { $trg .= basename($src); @@ -2161,7 +2161,6 @@ function copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $sour { return true; } - if (!@file_exists($src_path)) { return; @@ -2188,7 +2187,7 @@ function copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $sour if (!@copy($src_path, $phpbb_root_path . $trg_path)) { - $convert->p_master->error(sprintf($user->lang['COULD_NOT_COPY'], $src_path, $phpbb_root_path . $trg), __LINE__, __FILE__, !$die_on_failure); + $convert->p_master->error(sprintf($user->lang['COULD_NOT_COPY'], $src_path, $phpbb_root_path . $trg_path), __LINE__, __FILE__, !$die_on_failure); return; }