mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 16:49:58 +09:00
조회포인트 적용 관련된 부분의 퍼포먼스 향상을 위한 코드 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6334 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5f4e8752bf
commit
82e85d1d1b
1 changed files with 11 additions and 8 deletions
|
|
@ -439,6 +439,17 @@
|
||||||
// 원글을 적은 이와 동일하면 조회수 올리지 않고 pass
|
// 원글을 적은 이와 동일하면 조회수 올리지 않고 pass
|
||||||
if($target_member_srl == $member_srl) return new Object();
|
if($target_member_srl == $member_srl) return new Object();
|
||||||
|
|
||||||
|
// 모듈별 point 정보 가져옴
|
||||||
|
$config = $oModuleModel->getModuleConfig('point');
|
||||||
|
$module_config = $oModuleModel->getModulePartConfig('point', $obj->get('module_srl'));
|
||||||
|
|
||||||
|
// 조회 포인트를 구해옴
|
||||||
|
$point = $module_config['read_document'];
|
||||||
|
if(!isset($point)) $point = $config->read_document;
|
||||||
|
|
||||||
|
// 조회 포인트가 없으면 pass
|
||||||
|
if(!$point) return new Object();
|
||||||
|
|
||||||
// 회원일 경우 읽은 적이 있으면 그냥 pass 하고 그렇지 않으면 현재 포인트 구함
|
// 회원일 경우 읽은 적이 있으면 그냥 pass 하고 그렇지 않으면 현재 포인트 구함
|
||||||
if($member_srl) {
|
if($member_srl) {
|
||||||
$args->member_srl = $member_srl;
|
$args->member_srl = $member_srl;
|
||||||
|
|
@ -453,14 +464,6 @@
|
||||||
// 포인트 모듈 기본 설정 가져옴
|
// 포인트 모듈 기본 설정 가져옴
|
||||||
$config = $oModuleModel->getModuleConfig('point');
|
$config = $oModuleModel->getModuleConfig('point');
|
||||||
|
|
||||||
// 모듈별 point 정보 가져옴
|
|
||||||
$config = $oModuleModel->getModuleConfig('point');
|
|
||||||
$module_config = $oModuleModel->getModulePartConfig('point', $obj->get('module_srl'));
|
|
||||||
|
|
||||||
// 조회 포인트를 구해옴
|
|
||||||
$point = $module_config['read_document'];
|
|
||||||
if(!isset($point)) $point = $config->read_document;
|
|
||||||
|
|
||||||
// 조회 포인트가 -(마이너스)일때 현재 포인트와 비교
|
// 조회 포인트가 -(마이너스)일때 현재 포인트와 비교
|
||||||
if($config->disable_read_document == 'Y' && $point < 0 && abs($point)>$cur_point) {
|
if($config->disable_read_document == 'Y' && $point < 0 && abs($point)>$cur_point) {
|
||||||
$obj->add('content', sprintf(Context::getLang('msg_disallow_by_point'), abs($point), $cur_point));
|
$obj->add('content', sprintf(Context::getLang('msg_disallow_by_point'), abs($point), $cur_point));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue