Compare commits

..

No commits in common. "fa0034403c5b7c3b98daf883537096c09c3b20ad" and "4348b49bf68dbbc5283e99510c1d5aa546d1d0f7" have entirely different histories.

4 changed files with 20 additions and 31 deletions

View File

@ -124,12 +124,15 @@ class BoardController extends FrontController
parent::index_setCondition(); parent::index_setCondition();
} }
//Download관련 //Download관련
public function download_process($field, $entity) public function download_process($field, $entity): array
{ {
//Category 확인 $entity = parent::download_process($field, $entity);
$this->setCategory($this->request->getVar('category'));
//권한체크 //권한체크
$this->isRole('download'); $this->isRole('download');
return parent::download_process($field, $entity); list($filename, $uploaded_filename) = explode(DEFAULTS['DELIMITER_FILE'], $entity->$field);
if (!is_file(PATHS['UPLOAD'] . "/" . $uploaded_filename)) {
throw new \Exception("파일이 확인되지 않습니다.\n" . PATHS['UPLOAD'] . "/" . $uploaded_filename);
}
return array($filename, $uploaded_filename);
} }
} }

View File

@ -129,30 +129,16 @@ function getFieldIndex_Row_BoardHelper($field, $entity, array $viewDatas): strin
for ($i = 1; $i < $entity->getHierarchy_Depth(); $i++) { for ($i = 1; $i < $entity->getHierarchy_Depth(); $i++) {
$depth .= "&nbsp;&nbsp;&nbsp;&nbsp;"; $depth .= "&nbsp;&nbsp;&nbsp;&nbsp;";
} }
$reply = "";
if (isRole_CommonHelper(
$viewDatas['currentRoles'],
$viewDatas['currentCategory'],
'isreply'
)) {
$reply = anchor( $reply = anchor(
current_url() . '/reply/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['category'], current_url() . '/reply/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['currentCategory']->getPrimaryKey(),
ICONS['REPLY'], ICONS['REPLY'],
["target" => "_self"] ["target" => "_self"]
); );
}
$view = $value;
if (isRole_CommonHelper(
$viewDatas['currentRoles'],
$viewDatas['currentCategory'],
'isread'
)) {
$view = anchor( $view = anchor(
current_url() . '/view/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['category'], current_url() . '/view/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['currentCategory']->getPrimaryKey(),
$value, $value,
["target" => "_self"] ["target" => "_self"]
); );
}
return sprintf("%s%s %s", $depth, $reply, $view); return sprintf("%s%s %s", $depth, $reply, $view);
break; break;
case 'board_file': case 'board_file':
@ -161,7 +147,7 @@ function getFieldIndex_Row_BoardHelper($field, $entity, array $viewDatas): strin
base_url() . base_url() .
$viewDatas['control'] . $viewDatas['control'] .
"/board/download/{$field}/{$entity->getPrimaryKey()}" . "/board/download/{$field}/{$entity->getPrimaryKey()}" .
'?category=' . $viewDatas['category'], '?category=' . $viewDatas['currentCategory']->getPrimaryKey(),
$field $field
); );
break; break;

View File

@ -1,4 +1,4 @@
<?= $this->extend('layouts/main') ?> <?= $this->extend('layouts/front_simple') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/css/common/login.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/common/login.css" media="screen" rel="stylesheet" type="text/css" />

View File

@ -1,4 +1,4 @@
<?= $this->extend('layouts/main') ?> <?= $this->extend('layouts/front_simple') ?>
<?= $this->section('content') ?> <?= $this->section('content') ?>
<link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/front/content.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/css/common/login_v1.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/css/common/login_v1.css" media="screen" rel="stylesheet" type="text/css" />