mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
NOISSUE point 모듈에서 modulePartConfig 변수를 잘못 사용하는 문제 수정.
This commit is contained in:
parent
ddba034036
commit
b75386bc42
3 changed files with 29 additions and 29 deletions
|
|
@ -231,7 +231,7 @@ class pointAdminController extends point
|
|||
{
|
||||
foreach($output->data as $key => $val)
|
||||
{
|
||||
if($module_config[$val->module_srl]['insert_document']) $insert_point = $module_config[$val->module_srl]['insert_document'];
|
||||
if($module_config->{$val->module_srl}['insert_document']) $insert_point = $module_config->{$val->module_srl}['insert_document'];
|
||||
else $insert_point = $config->insert_document;
|
||||
|
||||
if(!$val->member_srl) continue;
|
||||
|
|
@ -249,7 +249,7 @@ class pointAdminController extends point
|
|||
{
|
||||
foreach($output->data as $key => $val)
|
||||
{
|
||||
if($module_config[$val->module_srl]['insert_comment']) $insert_point = $module_config[$val->module_srl]['insert_comment'];
|
||||
if($module_config->{$val->module_srl}['insert_comment']) $insert_point = $module_config->{$val->module_srl}['insert_comment'];
|
||||
else $insert_point = $config->insert_comment;
|
||||
|
||||
if(!$val->member_srl) continue;
|
||||
|
|
@ -266,7 +266,7 @@ class pointAdminController extends point
|
|||
{
|
||||
foreach($output->data as $key => $val)
|
||||
{
|
||||
if($module_config[$val->module_srl]['upload_file']) $insert_point = $module_config[$val->module_srl]['upload_file'];
|
||||
if($module_config->{$val->module_srl}['upload_file']) $insert_point = $module_config->{$val->module_srl}['upload_file'];
|
||||
else $insert_point = $config->upload_file;
|
||||
|
||||
if(!$val->member_srl) continue;
|
||||
|
|
|
|||
|
|
@ -81,11 +81,11 @@ class pointController extends point
|
|||
$oPointModel = getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
$point = $module_config['insert_document'];
|
||||
$point = $module_config->insert_document;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_document;
|
||||
$cur_point += $point;
|
||||
// Add points for attaching a file
|
||||
$point = $module_config['upload_file'];
|
||||
$point = $module_config->upload_file;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->upload_file;
|
||||
if($obj->uploaded_count) $cur_point += $point * $obj->uploaded_count;
|
||||
// Increase the point
|
||||
|
|
@ -117,11 +117,11 @@ class pointController extends point
|
|||
$oPointModel = getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($oDocument->get('member_srl'), true);
|
||||
|
||||
$point = $module_config['insert_document'];
|
||||
$point = $module_config->insert_document;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_document;
|
||||
$cur_point += $point;
|
||||
// Add points for attaching a file
|
||||
$point = $module_config['upload_file'];
|
||||
$point = $module_config->upload_file;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->upload_file;
|
||||
if($obj->uploaded_count) $cur_point += $point * $obj->uploaded_count;
|
||||
// Increase the point
|
||||
|
|
@ -147,7 +147,7 @@ class pointController extends point
|
|||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point',$oDocument->get('module_srl'));
|
||||
// The process related to clearing the post comments
|
||||
$comment_point = $module_config['insert_comment'];
|
||||
$comment_point = $module_config->insert_comment;
|
||||
if(strlen($comment_point) == 0 && !is_int($comment_point)) $comment_point = $config->insert_comment;
|
||||
// If there are comment points, attempt to deduct
|
||||
if($comment_point>0) return new Object();
|
||||
|
|
@ -170,7 +170,7 @@ class pointController extends point
|
|||
// Remove all the points for each member
|
||||
$oPointModel = getModel('point');
|
||||
// Get the points
|
||||
$point = $module_config['download_file'];
|
||||
$point = $module_config->download_file;
|
||||
foreach($member_srls as $member_srl => $cnt)
|
||||
{
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
|
@ -201,13 +201,13 @@ class pointController extends point
|
|||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
|
||||
|
||||
$point = $module_config['insert_document'];
|
||||
$point = $module_config->insert_document;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_document;
|
||||
// if the point is set to decrease when writing a document, make sure it does not increase the points when deleting an article
|
||||
if($point < 0) return new Object();
|
||||
$cur_point -= $point;
|
||||
// Add points related to deleting an attachment
|
||||
$point = $module_config['upload_file'];
|
||||
$point = $module_config->upload_file;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->upload_file;
|
||||
if($obj->uploaded_count) $cur_point -= $point * $obj->uploaded_count;
|
||||
// Increase the point
|
||||
|
|
@ -237,7 +237,7 @@ class pointController extends point
|
|||
$oPointModel = getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
$point = $module_config['insert_comment'];
|
||||
$point = $module_config->insert_comment;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_comment;
|
||||
// Increase the point
|
||||
$cur_point += $point;
|
||||
|
|
@ -269,7 +269,7 @@ class pointController extends point
|
|||
// Get the points of the member
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
$point = $module_config['insert_comment'];
|
||||
$point = $module_config->insert_comment;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->insert_comment;
|
||||
// if the point is set to decrease when writing a comment, make sure it does not increase the points when deleting a comment
|
||||
if($point < 0) return new Object();
|
||||
|
|
@ -308,7 +308,7 @@ class pointController extends point
|
|||
$oPointModel = getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
|
||||
$point = $module_config['upload_file'];
|
||||
$point = $module_config->upload_file;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->upload_file;
|
||||
// Increase the point
|
||||
$cur_point -= $point;
|
||||
|
|
@ -335,14 +335,14 @@ class pointController extends point
|
|||
// If it is set not to allow downloading for non-logged in users, do not permit
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
if($config->disable_download == 'Y' && strlen($module_config['download_file']) == 0 && !is_int($module_config['download_file'])) return new Object(-1,'msg_not_permitted_download');
|
||||
if($config->disable_download == 'Y' && strlen($module_config->download_file) == 0 && !is_int($module_config->download_file)) return new Object(-1,'msg_not_permitted_download');
|
||||
else return new Object();
|
||||
}
|
||||
// Get the points of the member
|
||||
$oPointModel = getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
// Get the points
|
||||
$point = $module_config['download_file'];
|
||||
$point = $module_config->download_file;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->download_file;
|
||||
// If points are less than 0, and if downloading a file is not allowed in this case, give an errors
|
||||
if($cur_point + $point < 0 && $config->disable_download == 'Y') return new Object(-1,'msg_cannot_download');
|
||||
|
|
@ -371,7 +371,7 @@ class pointController extends point
|
|||
$oPointModel = getModel('point');
|
||||
$cur_point = $oPointModel->getPoint($member_srl, true);
|
||||
// Get the points
|
||||
$point = $module_config['download_file'];
|
||||
$point = $module_config->download_file;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->download_file;
|
||||
// Increase the point
|
||||
$cur_point += $point;
|
||||
|
|
@ -399,7 +399,7 @@ class pointController extends point
|
|||
$config = $oModuleModel->getModuleConfig('point');
|
||||
$module_config = $oModuleModel->getModulePartConfig('point', $obj->get('module_srl'));
|
||||
// Get hits points
|
||||
$point = $module_config['read_document'];
|
||||
$point = $module_config->read_document;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->read_document;
|
||||
// Pass if there are no requested points
|
||||
if(!$point) return new Object();
|
||||
|
|
@ -455,12 +455,12 @@ class pointController extends point
|
|||
|
||||
if( $obj->point > 0 )
|
||||
{
|
||||
$point = $module_config['voted'];
|
||||
$point = $module_config->voted;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->voted;
|
||||
}
|
||||
else
|
||||
{
|
||||
$point = $module_config['blamed'];
|
||||
$point = $module_config->blamed;
|
||||
if(strlen($point) == 0 && !is_int($point)) $point = $config->blamed;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,18 +41,18 @@ class pointView extends point
|
|||
$module_config = $oModuleModel->getModulePartConfig('point', $current_module_srl);
|
||||
if(!$module_config)
|
||||
{
|
||||
$module_config['insert_document'] = $config->insert_document;
|
||||
$module_config['insert_comment'] = $config->insert_comment;
|
||||
$module_config['upload_file'] = $config->upload_file;
|
||||
$module_config['download_file'] = $config->download_file;
|
||||
$module_config['read_document'] = $config->read_document;
|
||||
$module_config['voted'] = $config->voted;
|
||||
$module_config['blamed'] = $config->blamed;
|
||||
$module_config->insert_document = $config->insert_document;
|
||||
$module_config->insert_comment = $config->insert_comment;
|
||||
$module_config->upload_file = $config->upload_file;
|
||||
$module_config->download_file = $config->download_file;
|
||||
$module_config->read_document = $config->read_document;
|
||||
$module_config->voted = $config->voted;
|
||||
$module_config->blamed = $config->blamed;
|
||||
}
|
||||
}
|
||||
|
||||
$module_config['module_srl'] = $current_module_srl;
|
||||
$module_config['point_name'] = $config->point_name;
|
||||
$module_config->module_srl = $current_module_srl;
|
||||
$module_config->point_name = $config->point_name;
|
||||
Context::set('module_config', $module_config);
|
||||
// Set the template file
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue