mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
isAccessible()로 통일
This commit is contained in:
parent
81986c40a9
commit
f8ac11bda6
10 changed files with 16 additions and 22 deletions
|
|
@ -228,12 +228,9 @@ class ModuleHandler extends Handler
|
||||||
{
|
{
|
||||||
$oDocumentModel = getModel('document');
|
$oDocumentModel = getModel('document');
|
||||||
$oDocument = $oDocumentModel->getDocument($this->document_srl);
|
$oDocument = $oDocumentModel->getDocument($this->document_srl);
|
||||||
if($oDocument->isSecret() || $oDocument->get('status') === $oDocumentModel->getConfigStatus('temp'))
|
if(!$oDocument->isAccessible())
|
||||||
{
|
{
|
||||||
if(!$oDocument->isGranted() && !$oDocument->isAccessible())
|
$this->httpStatusCode = '403';
|
||||||
{
|
|
||||||
$this->httpStatusCode = '403';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -328,13 +328,12 @@ class boardView extends board
|
||||||
));
|
));
|
||||||
|
|
||||||
// update the document view count (if the document is not secret)
|
// update the document view count (if the document is not secret)
|
||||||
if(!$oDocument->isSecret() || $oDocument->isGranted())
|
if($oDocument->isAccessible())
|
||||||
{
|
{
|
||||||
$oDocument->updateReadedCount();
|
$oDocument->updateReadedCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
// disappear the document if it is secret
|
// disappear the document if it is secret
|
||||||
if($oDocument->isSecret() && !$oDocument->isGranted())
|
else
|
||||||
{
|
{
|
||||||
$oDocument->add('content',lang('thisissecret'));
|
$oDocument->add('content',lang('thisissecret'));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<a href="{getUrl('act','dispBoardWrite','document_srl','')}" class="write">{$lang->cmd_write}</a>
|
<a href="{getUrl('act','dispBoardWrite','document_srl','')}" class="write">{$lang->cmd_write}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="co">
|
<div class="co">
|
||||||
<!--@if($oDocument->isSecret() && !$oDocument->isGranted())-->
|
<!--@if(!$oDocument->isAccessible())-->
|
||||||
<form action="./" method="get" class="ff" onsubmit="return procFilter(this, input_password)">
|
<form action="./" method="get" class="ff" onsubmit="return procFilter(this, input_password)">
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
<input type="hidden" name="mid" value="{$mid}" />
|
||||||
<input type="hidden" name="page" value="{$page}" />
|
<input type="hidden" name="page" value="{$page}" />
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<span>{$oDocument->getRegdate()}</span>
|
<span>{$oDocument->getRegdate()}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="co">
|
<div class="co">
|
||||||
<!--@if($oDocument->isSecret() && !$oDocument->isGranted())-->
|
<!--@if(!$oDocument->isAccessible())-->
|
||||||
<div class="secretContent">
|
<div class="secretContent">
|
||||||
<form action="./" method="get" onsubmit="return procFilter(this, input_password)">
|
<form action="./" method="get" onsubmit="return procFilter(this, input_password)">
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
<input type="hidden" name="mid" value="{$mid}" />
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- /READ HEADER -->
|
<!-- /READ HEADER -->
|
||||||
<!-- Extra Output -->
|
<!-- Extra Output -->
|
||||||
<div class="exOut" cond="$oDocument->isExtraVarsExists() && (!$oDocument->isSecret() || $oDocument->isGranted())">
|
<div class="exOut" cond="$oDocument->isExtraVarsExists() && $oDocument->isAccessible()">
|
||||||
<table border="1" cellspacing="0" summary="Extra Form Output">
|
<table border="1" cellspacing="0" summary="Extra Form Output">
|
||||||
<tr loop="$oDocument->getExtraVars() => $key,$val">
|
<tr loop="$oDocument->getExtraVars() => $key,$val">
|
||||||
<th scope="row">{$val->name}</th>
|
<th scope="row">{$val->name}</th>
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
<!-- /Extra Output -->
|
<!-- /Extra Output -->
|
||||||
<!-- READ BODY -->
|
<!-- READ BODY -->
|
||||||
<div class="read_body">
|
<div class="read_body">
|
||||||
<!--@if($oDocument->isSecret() && !$oDocument->isGranted())-->
|
<!--@if(!$oDocument->isAccessible())-->
|
||||||
<form action="./" method="get" onsubmit="return procFilter(this, input_password)">
|
<form action="./" method="get" onsubmit="return procFilter(this, input_password)">
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
<input type="hidden" name="mid" value="{$mid}" />
|
||||||
<input type="hidden" name="page" value="{$page}" />
|
<input type="hidden" name="page" value="{$page}" />
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- /READ HEADER -->
|
<!-- /READ HEADER -->
|
||||||
<!-- Extra Output -->
|
<!-- Extra Output -->
|
||||||
<div class="exOut" cond="$oDocument->isExtraVarsExists() && (!$oDocument->isSecret() || $oDocument->isGranted())">
|
<div class="exOut" cond="$oDocument->isExtraVarsExists() && $oDocument->isAccessible()">
|
||||||
<table border="1" cellspacing="0" summary="Extra Form Output">
|
<table border="1" cellspacing="0" summary="Extra Form Output">
|
||||||
<tr loop="$oDocument->getExtraVars() => $key,$val">
|
<tr loop="$oDocument->getExtraVars() => $key,$val">
|
||||||
<th scope="row">{$val->name}</th>
|
<th scope="row">{$val->name}</th>
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
<!-- /Extra Output -->
|
<!-- /Extra Output -->
|
||||||
<!-- READ BODY -->
|
<!-- READ BODY -->
|
||||||
<div class="read_body">
|
<div class="read_body">
|
||||||
<!--@if($oDocument->isSecret() && !$oDocument->isGranted())-->
|
<!--@if(!$oDocument->isAccessible())-->
|
||||||
<form action="./" method="get" onsubmit="return procFilter(this, input_password)" class="secretForm">
|
<form action="./" method="get" onsubmit="return procFilter(this, input_password)" class="secretForm">
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
<input type="hidden" name="mid" value="{$mid}" />
|
||||||
<input type="hidden" name="page" value="{$page}" />
|
<input type="hidden" name="page" value="{$page}" />
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,7 @@ class commentModel extends comment
|
||||||
* @param bool $published
|
* @param bool $published
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function getCommentAllCount($module_srl, $published = null)
|
function getCommentAllCount($module_srl, $published = false)
|
||||||
{
|
{
|
||||||
$args = new stdClass();
|
$args = new stdClass();
|
||||||
$args->module_srl = $module_srl;
|
$args->module_srl = $module_srl;
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,12 @@
|
||||||
<h1 class="h1">{$oDocument->getTitleText()}</h1>
|
<h1 class="h1">{$oDocument->getTitleText()}</h1>
|
||||||
<a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}">{$oDocument->get('nick_name')}</a>
|
<a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}">{$oDocument->get('nick_name')}</a>
|
||||||
{$oDocument->getRegdate()}
|
{$oDocument->getRegdate()}
|
||||||
<!--@if($oDocument->isExtraVarsExists() && (!$oDocument->isSecret() || $oDocument->isGranted()) )-->
|
<!--@if($oDocument->isExtraVarsExists() && $oDocument->isAccessible())-->
|
||||||
<!--@foreach($oDocument->getExtraVars() as $key => $val)-->
|
<!--@foreach($oDocument->getExtraVars() as $key => $val)-->
|
||||||
{$val->name}: {$val->getValueHtml()}
|
{$val->name}: {$val->getValueHtml()}
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
{$oDocument->getContent(false, false)}
|
{$oDocument->getContent(false, false)}
|
||||||
<script>
|
<script>
|
||||||
//<![CDATA[
|
jQuery(window).load(function() { window.print(); } );
|
||||||
jQuery(window).load(function() { window.print(); } );
|
|
||||||
//]]>
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class fileModel extends file
|
||||||
if(!$oDocument->isExists())
|
if(!$oDocument->isExists())
|
||||||
{
|
{
|
||||||
$oComment = $oCommentModel->getComment($upload_target_srl);
|
$oComment = $oCommentModel->getComment($upload_target_srl);
|
||||||
if($oComment->isExists() && $oComment->isSecret() && !$oComment->isGranted())
|
if($oComment->isExists() && !$oComment->isAccessible())
|
||||||
{
|
{
|
||||||
return $this->setError('msg_not_permitted');
|
return $this->setError('msg_not_permitted');
|
||||||
}
|
}
|
||||||
|
|
@ -52,7 +52,7 @@ class fileModel extends file
|
||||||
}
|
}
|
||||||
|
|
||||||
// document 권한 확인
|
// document 권한 확인
|
||||||
if($oDocument->isExists() && $oDocument->isSecret() && !$oDocument->isGranted())
|
if($oDocument->isExists() && !$oDocument->isAccessible())
|
||||||
{
|
{
|
||||||
return $this->setError('msg_not_permitted');
|
return $this->setError('msg_not_permitted');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ class memberController extends member
|
||||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||||
|
|
||||||
// Check document
|
// Check document
|
||||||
if($oDocument->isSecret() && !$oDocument->isGranted())
|
if(!$oDocument->isAccessible())
|
||||||
{
|
{
|
||||||
return $this->setError('msg_is_secret');
|
return $this->setError('msg_is_secret');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue