mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix #1298 array/object confusion in point module
This commit is contained in:
parent
55f7898dc9
commit
5cd1cc53a5
3 changed files with 19 additions and 3 deletions
|
|
@ -816,16 +816,23 @@ class boardView extends board
|
|||
if(!$oDocument->isExists())
|
||||
{
|
||||
$point_config = $oModuleModel->getModulePartConfig('point',$this->module_srl);
|
||||
if ($point_config)
|
||||
{
|
||||
$pointForInsert = is_object($point_config) ? $point_config->insert_document : $point_config["insert_document"];
|
||||
}
|
||||
else
|
||||
{
|
||||
$pointForInsert = 0;
|
||||
}
|
||||
$logged_info = Context::get('logged_info');
|
||||
$oPointModel = getModel('point');
|
||||
$pointForInsert = $point_config["insert_document"];
|
||||
|
||||
if($pointForInsert < 0)
|
||||
{
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
return $this->dispBoardMessage('msg_not_permitted');
|
||||
}
|
||||
else if(($oPointModel->getPoint($logged_info->member_srl) + $pointForInsert) < 0)
|
||||
else if((getModel('point')->getPoint($logged_info->member_srl) + $pointForInsert) < 0)
|
||||
{
|
||||
return $this->dispBoardMessage('msg_not_enough_point');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -632,6 +632,10 @@ class pointController extends point
|
|||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$pointConfig = $oModuleModel->getModulePartConfig('point', $obj->originModuleSrl);
|
||||
if (is_object($pointConfig))
|
||||
{
|
||||
$pointConfig = get_object_vars($pointConfig);
|
||||
}
|
||||
|
||||
$oModuleController = getController('module');
|
||||
if(is_array($obj->moduleSrlList))
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ class pointView extends point
|
|||
$module_config = $oModuleModel->getModulePartConfig('point', $current_module_srl);
|
||||
if(!$module_config)
|
||||
{
|
||||
$module_config = array();
|
||||
$module_config['insert_document'] = $config->insert_document;
|
||||
$module_config['insert_comment'] = $config->insert_comment;
|
||||
$module_config['upload_file'] = $config->upload_file;
|
||||
|
|
@ -51,6 +52,10 @@ class pointView extends point
|
|||
$module_config['voted_comment'] = $config->voted_comment;
|
||||
$module_config['blamed_comment'] = $config->blamed_comment;
|
||||
}
|
||||
elseif(is_object($module_config))
|
||||
{
|
||||
$module_config = get_object_vars($module_config);
|
||||
}
|
||||
}
|
||||
|
||||
$module_config['module_srl'] = $current_module_srl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue