mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
커버이미지 선택 취소 기능
CK에디터 파일업로드의 커버이미지 선택을 취소할 수 있도록 하는 기능
This commit is contained in:
parent
8940045035
commit
6d182b6d11
1 changed files with 29 additions and 13 deletions
|
|
@ -1125,24 +1125,40 @@ class fileController extends file
|
|||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$args->cover_image = 'N';
|
||||
$output = executeQuery('file.updateClearCoverImage', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
if($file_info->cover_image != 'Y') {
|
||||
|
||||
$args->cover_image = 'N';
|
||||
$output = executeQuery('file.updateClearCoverImage', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
$args->cover_image = 'Y';
|
||||
$output = executeQuery('file.updateCoverImage', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
$args->cover_image = 'N';
|
||||
$output = executeQuery('file.updateClearCoverImage', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
$args->cover_image = 'Y';
|
||||
$output = executeQuery('file.updateCoverImage', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
$oDB->commit();
|
||||
|
||||
$this->add('is_cover',$args->cover_image);
|
||||
|
||||
// 썸네일 삭제
|
||||
$thumbnail_path = sprintf('files/thumbnails/%s', getNumberingPath($upload_target_srl, 3));
|
||||
Filehandler::removeFilesInDir($thumbnail_path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue