mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 22:02:13 +09:00
Remove unnecessary use of BaseObject
- 트리거 등 반환값이 필요하지 않은 곳에서 new BaseObject()를 반환하는 것 삭제 - 모듈 설치, 업데이트 후 무의미한 new BaseObject()를 반환하는 것 삭제 - 사용자에게 에러 메시지를 돌려주는 용도로 new BaseObject(-1, '에러메시지')를 사용하는 경우는 대부분 $this->setError()로 변경함. 언어 변환과 sprintf() 처리까지 한 번에 이루어지므로 이쪽이 더 편리함.
This commit is contained in:
parent
03d74a984f
commit
84e5542d77
103 changed files with 692 additions and 862 deletions
|
|
@ -19,7 +19,7 @@ class tagController extends tag
|
|||
*/
|
||||
function triggerArrangeTag(&$obj)
|
||||
{
|
||||
if(!$obj->tags) return new BaseObject();
|
||||
if(!$obj->tags) return;
|
||||
// tags by variable
|
||||
$arranged_tag_list = array();
|
||||
$tag_list = explode(',', $obj->tags);
|
||||
|
|
@ -39,7 +39,6 @@ class tagController extends tag
|
|||
{
|
||||
$obj->tags = implode(',', $arranged_tag_list);
|
||||
}
|
||||
return new BaseObject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -51,7 +50,7 @@ class tagController extends tag
|
|||
$module_srl = $obj->module_srl;
|
||||
$document_srl = $obj->document_srl;
|
||||
$tags = $obj->tags;
|
||||
if(!$document_srl) return new BaseObject();
|
||||
if(!$document_srl) return;
|
||||
// Remove all tags that article
|
||||
$output = $this->triggerDeleteTag($obj);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -68,8 +67,6 @@ class tagController extends tag
|
|||
$output = executeQuery('tag.insertTag', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
}
|
||||
|
||||
return new BaseObject();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -79,7 +76,7 @@ class tagController extends tag
|
|||
function triggerDeleteTag(&$obj)
|
||||
{
|
||||
$document_srl = $obj->document_srl;
|
||||
if(!$document_srl) return new BaseObject();
|
||||
if(!$document_srl) return;
|
||||
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
|
|
@ -92,7 +89,7 @@ class tagController extends tag
|
|||
function triggerDeleteModuleTags(&$obj)
|
||||
{
|
||||
$module_srl = $obj->module_srl;
|
||||
if(!$module_srl) return new BaseObject();
|
||||
if(!$module_srl) return;
|
||||
|
||||
$oTagController = getAdminController('tag');
|
||||
return $oTagController->deleteModuleTags($module_srl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue