익명글 포함 검색 권한 체크를 documentAdminView에서 처리

This commit is contained in:
Kijin Sung 2017-06-21 17:35:48 +09:00
parent 79b9cc27ae
commit 9460f8ee7c
2 changed files with 10 additions and 6 deletions

View file

@ -40,9 +40,18 @@ class documentAdminView extends document
$args->page = Context::get('page'); // /< Page
$args->list_count = 30; // /< the number of posts to display on a single page
$args->page_count = 5; // /< the number of pages that appear in the page navigation
$args->search_target = Context::get('search_target'); // /< search (title, contents ...)
$args->search_keyword = Context::get('search_keyword'); // /< keyword to search
if ($args->search_target === 'member_srl')
{
$logged_info = Context::get('logged_info');
if ($logged_info->is_admin === 'Y' || intval($logged_info->member_srl) === intval($args->search_keyword))
{
$args->member_srl = array(intval($args->search_keyword), intval($args->search_keyword) * -1);
unset($args->search_target, $args->search_keyword);
}
}
$args->sort_index = 'list_order'; // /< sorting value

View file

@ -1405,11 +1405,6 @@ class documentModel extends document
elseif($search_keyword=='temp') $args->statusList = array($this->getConfigStatus('temp'));
break;
case 'member_srl' :
if($logged_info->member_srl == $searchOpt->search_keyword || $logged_info->is_admin == 'Y')
{
$args->member_srl = -1*$searchOpt->search_keyword . ',' . $searchOpt->search_keyword;
}
break;
case 'readed_count' :
case 'voted_count' :
case 'comment_count' :