servermgrv2 init...

This commit is contained in:
최준흠 2023-07-31 17:37:59 +09:00
parent 0916bbcb43
commit 3e7c095e84
3 changed files with 8 additions and 8 deletions

View File

@ -18,11 +18,4 @@ abstract class BaseHierarchyBackend extends BaseBackend
{ {
return $this->_model->reply($entity, $fieldDatas); return $this->_model->reply($entity, $fieldDatas);
} }
//View관련
public function view($entity)
{
// view_cnt에 추가하기위함
$this->_model->increaseViewCount($entity->getPrimaryKey());
return parent::view($entity);
}
} }

View File

@ -37,4 +37,11 @@ class BoardBackend extends BaseHierarchyBackend
} }
return $options; return $options;
} }
//View관련
public function view($entity)
{
// view_cnt에 추가하기위함
$this->_model->increaseViewCount($entity->getPrimaryKey());
return parent::view($entity);
}
} }

View File

@ -515,7 +515,7 @@ abstract class BaseController extends Controller
final public function download(string $field, $uid) final public function download(string $field, $uid)
{ {
try { try {
$entity = $this->_backend->getEntity([$this->_backend->getPrimaryKey() => $uid]); $entity = $this->_backend->getEntity($uid);
if (!$entity->$field) { if (!$entity->$field) {
throw new \Exception("첨부파일이 확인되지 않습니다."); throw new \Exception("첨부파일이 확인되지 않습니다.");
} }