vhost init...2
This commit is contained in:
parent
2fa017e8f6
commit
465ecac007
@ -124,15 +124,12 @@ class BoardController extends FrontController
|
|||||||
parent::index_setCondition();
|
parent::index_setCondition();
|
||||||
}
|
}
|
||||||
//Download관련
|
//Download관련
|
||||||
public function download_process($field, $entity): array
|
public function download_process($field, $entity)
|
||||||
{
|
{
|
||||||
$entity = parent::download_process($field, $entity);
|
//Category 확인
|
||||||
|
$this->setCategory($this->request->getVar('category'));
|
||||||
//권한체크
|
//권한체크
|
||||||
$this->isRole('download');
|
$this->isRole('download');
|
||||||
list($filename, $uploaded_filename) = explode(DEFAULTS['DELIMITER_FILE'], $entity->$field);
|
return parent::download_process($field, $entity);
|
||||||
if (!is_file(PATHS['UPLOAD'] . "/" . $uploaded_filename)) {
|
|
||||||
throw new \Exception("파일이 확인되지 않습니다.\n" . PATHS['UPLOAD'] . "/" . $uploaded_filename);
|
|
||||||
}
|
|
||||||
return array($filename, $uploaded_filename);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -129,16 +129,30 @@ 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 .= " ";
|
$depth .= " ";
|
||||||
}
|
}
|
||||||
$reply = anchor(
|
$reply = "";
|
||||||
current_url() . '/reply/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['currentCategory']->getPrimaryKey(),
|
if (isRole_CommonHelper(
|
||||||
ICONS['REPLY'],
|
$viewDatas['currentRoles'],
|
||||||
["target" => "_self"]
|
$viewDatas['currentCategory'],
|
||||||
);
|
'isreply'
|
||||||
$view = anchor(
|
)) {
|
||||||
current_url() . '/view/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['currentCategory']->getPrimaryKey(),
|
$reply = anchor(
|
||||||
$value,
|
current_url() . '/reply/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['category'],
|
||||||
["target" => "_self"]
|
ICONS['REPLY'],
|
||||||
);
|
["target" => "_self"]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$view = $value;
|
||||||
|
if (isRole_CommonHelper(
|
||||||
|
$viewDatas['currentRoles'],
|
||||||
|
$viewDatas['currentCategory'],
|
||||||
|
'isread'
|
||||||
|
)) {
|
||||||
|
$view = anchor(
|
||||||
|
current_url() . '/view/' . $entity->getPrimaryKey() . '?category=' . $viewDatas['category'],
|
||||||
|
$value,
|
||||||
|
["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':
|
||||||
@ -147,7 +161,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['currentCategory']->getPrimaryKey(),
|
'?category=' . $viewDatas['category'],
|
||||||
$field
|
$field
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?= $this->extend('layouts/front_simple') ?>
|
<?= $this->extend('layouts/main') ?>
|
||||||
<?= $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" />
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
<?= $this->extend('layouts/front_simple') ?>
|
<?= $this->extend('layouts/main') ?>
|
||||||
<?= $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" />
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user