From 70713a033af75ba89f73eabf037905409ff33417 Mon Sep 17 00:00:00 2001 From: zero Date: Sat, 28 Jul 2007 11:43:50 +0000 Subject: [PATCH] =?UTF-8?q?=EB=A7=88=EC=9D=B4=EA=B7=B8=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=85=98=EC=8B=9C=20=EC=B2=A8=EB=B6=80=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EC=9D=84=20localhost=EC=97=90=EC=84=9C=20copy=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/trunk@2066 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/importer/importer.admin.controller.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/importer/importer.admin.controller.php b/modules/importer/importer.admin.controller.php index ce9865a2a..053246b39 100644 --- a/modules/importer/importer.admin.controller.php +++ b/modules/importer/importer.admin.controller.php @@ -301,11 +301,18 @@ if(count($files)) { foreach($files as $key => $val) { $filename = $val->filename->body; - $url = $val->url->body; + $path = $val->path->body; $download_count = (int)$val->download_count->body; $tmp_filename = './files/cache/tmp_uploaded_file'; - if(FileHandler::getRemoteFile($url, $tmp_filename)) { + + if(preg_match('/[\xEA-\xED][\x80-\xFF]{2}/', $path)&&function_exists('iconv')) { + $tmp_path = iconv("UTF-8","EUC-KR",$path); + if(file_exists($tmp_path)) $path = $tmp_path; + } + + if(file_exists($path)) { + @copy($path, $tmp_filename); $file_info['tmp_name'] = $tmp_filename; $file_info['name'] = $filename; $this->oFileController->insertFile($file_info, $this->module_srl, $args->document_srl, $download_count, true);