mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 07:09:56 +09:00
제로보드 데이터 이전 모듈 첨부파일 이상없도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/trunk@2278 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4ace824cb0
commit
f06f2c4ae0
2 changed files with 18 additions and 13 deletions
|
|
@ -300,6 +300,7 @@
|
||||||
|
|
||||||
function _importDocument($matches) {
|
function _importDocument($matches) {
|
||||||
$sequence = $matches[1];
|
$sequence = $matches[1];
|
||||||
|
$matches[0] = str_replace(array('',''),'',$matches[0]);
|
||||||
$xml_doc = $this->oXml->parse($matches[0]);
|
$xml_doc = $this->oXml->parse($matches[0]);
|
||||||
|
|
||||||
// 문서 번호와 내용 미리 구해 놓기
|
// 문서 번호와 내용 미리 구해 놓기
|
||||||
|
|
@ -317,20 +318,24 @@
|
||||||
|
|
||||||
$tmp_filename = './files/cache/tmp_uploaded_file';
|
$tmp_filename = './files/cache/tmp_uploaded_file';
|
||||||
|
|
||||||
if(preg_match('/[\xEA-\xED][\x80-\xFF]{2}/', $path)&&function_exists('iconv')) {
|
$path = $this->target_path.$path;
|
||||||
$tmp_path = iconv("UTF-8","EUC-KR",$path);
|
|
||||||
if(file_exists($tmp_path)) $path = $tmp_path;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(file_exists($path)) {
|
if(!eregi("^http",$path)) {
|
||||||
if(!eregi("^http",$this->target_path)) @copy($this->target_path.$path, $tmp_filename);
|
if(preg_match('/[\xEA-\xED][\x80-\xFF]{2}/', $path)&&function_exists('iconv')) {
|
||||||
else FileHandler::getRemoteFile($this->target_path.$path, $tmp_filename);
|
$tmp_path = iconv("UTF-8","EUC-KR",$path);
|
||||||
$file_info['tmp_name'] = $tmp_filename;
|
if(file_exists($tmp_path)) $path = $tmp_path;
|
||||||
$file_info['name'] = $filename;
|
}
|
||||||
$this->oFileController->insertFile($file_info, $this->module_srl, $args->document_srl, $download_count, true);
|
if(file_exists($path)) @copy($path, $tmp_filename);
|
||||||
|
|
||||||
// 컨텐츠의 내용 수정 (이미지 첨부파일 관련)
|
} else FileHandler::getRemoteFile($path, $tmp_filename);
|
||||||
$args->content = str_replace($filename, sprintf('./files/attach/images/%s/%s/%s', $this->module_srl, $args->document_srl, $filename), $args->content);
|
|
||||||
|
if(file_exists($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);
|
||||||
|
|
||||||
|
// 컨텐츠의 내용 수정 (이미지 첨부파일 관련)
|
||||||
|
if(eregi("\.(jpg|gif|jpeg|png)$", $filename)) $args->content = str_replace($filename, sprintf('./files/attach/images/%s/%s/%s', $this->module_srl, $args->document_srl, $filename), $args->content);
|
||||||
}
|
}
|
||||||
@unlink($tmp_filename);
|
@unlink($tmp_filename);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ function completeImport(ret_obj) {
|
||||||
|
|
||||||
if(is_finished=='Y') {
|
if(is_finished=='Y') {
|
||||||
alert(ret_obj["message"]);
|
alert(ret_obj["message"]);
|
||||||
//location.href = location.href;
|
location.href = location.href;
|
||||||
} else {
|
} else {
|
||||||
var fo_obj = xGetElementById('fo_step2');
|
var fo_obj = xGetElementById('fo_step2');
|
||||||
fo_obj.position.value = position;
|
fo_obj.position.value = position;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue