mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 20:29:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@566 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d7238d8932
commit
e0b2e0006f
1 changed files with 9 additions and 10 deletions
|
|
@ -24,6 +24,13 @@
|
|||
return (int)$output->data->count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 다운로드 경로를 구함
|
||||
**/
|
||||
function getDownloadUrl($file_srl, $sid) {
|
||||
return "./?module=file&act=procDownload&file_srl=".$file_srl."&sid=".$sid;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 파일 정보를 구함
|
||||
**/
|
||||
|
|
@ -35,10 +42,7 @@
|
|||
if(!$output->toBool()) return $output;
|
||||
|
||||
$file = $output->data;
|
||||
$direct_download = $file->direct_download;
|
||||
|
||||
if($direct_download=='Y') $file->download_url = $uploaded_filename;
|
||||
else $file->download_url = "./?module=file&act=procDownload&file_srl=".$file->file_srl."&sid=".$file->sid;
|
||||
$file->download_url = $this->getDownloadUrl($file->file_srl, $file->sid);
|
||||
|
||||
return $file;
|
||||
}
|
||||
|
|
@ -60,12 +64,7 @@
|
|||
for($i=0;$i<count($file_list);$i++) {
|
||||
$direct_download = $file_list[$i]->direct_download;
|
||||
|
||||
if($direct_download=='Y') {
|
||||
$download_url = Context::getRequestUri().substr($file_list[$i]->uploaded_filename,2);
|
||||
$file_list[$i]->download_url = $download_url;
|
||||
} else {
|
||||
$file_list[$i]->download_url = "./?module=file&act=procDownload&file_srl=".$file_list[$i]->file_srl."&sid=".$file_list[$i]->sid;
|
||||
}
|
||||
$file_list[$i]->download_url = $this->getDownloadUrl($file_list[$i]->file_srl, $file_list[$i]->sid);
|
||||
|
||||
}
|
||||
return $file_list;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue