mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Merge branch 'develop' into next
This commit is contained in:
commit
34eb311ac0
4 changed files with 30 additions and 12 deletions
|
|
@ -816,16 +816,23 @@ class boardView extends board
|
||||||
if(!$oDocument->isExists())
|
if(!$oDocument->isExists())
|
||||||
{
|
{
|
||||||
$point_config = $oModuleModel->getModulePartConfig('point',$this->module_srl);
|
$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');
|
$logged_info = Context::get('logged_info');
|
||||||
$oPointModel = getModel('point');
|
|
||||||
$pointForInsert = $point_config["insert_document"];
|
|
||||||
if($pointForInsert < 0)
|
if($pointForInsert < 0)
|
||||||
{
|
{
|
||||||
if(!Context::get('is_logged'))
|
if(!Context::get('is_logged'))
|
||||||
{
|
{
|
||||||
return $this->dispBoardMessage('msg_not_permitted');
|
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');
|
return $this->dispBoardMessage('msg_not_enough_point');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1363,6 +1363,10 @@ class moduleModel extends module
|
||||||
/**
|
/**
|
||||||
* @brief Return module configurations
|
* @brief Return module configurations
|
||||||
* Global configuration is used to manage board, member and others
|
* Global configuration is used to manage board, member and others
|
||||||
|
*
|
||||||
|
* @param string $module
|
||||||
|
* @param int $site_srl @deprecated
|
||||||
|
* @return object
|
||||||
*/
|
*/
|
||||||
public static function getModuleConfig($module, $site_srl = 0)
|
public static function getModuleConfig($module, $site_srl = 0)
|
||||||
{
|
{
|
||||||
|
|
@ -1401,6 +1405,10 @@ class moduleModel extends module
|
||||||
/**
|
/**
|
||||||
* @brief Return the module configuration of mid
|
* @brief Return the module configuration of mid
|
||||||
* Manage mid configurations which depend on module
|
* Manage mid configurations which depend on module
|
||||||
|
*
|
||||||
|
* @param string module
|
||||||
|
* @param int $module_srl
|
||||||
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public static function getModulePartConfig($module, $module_srl)
|
public static function getModulePartConfig($module, $module_srl)
|
||||||
{
|
{
|
||||||
|
|
@ -1421,14 +1429,7 @@ class moduleModel extends module
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (is_array($output->data->config))
|
$config = -1; // Use -1 as a temporary value because null cannot be cached
|
||||||
{
|
|
||||||
$config = array();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$config = new stdClass;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecate use of ArrayObject because of https://bugs.php.net/bug.php?id=77298
|
// Deprecate use of ArrayObject because of https://bugs.php.net/bug.php?id=77298
|
||||||
|
|
@ -1446,7 +1447,8 @@ class moduleModel extends module
|
||||||
$GLOBALS['__ModulePartConfig__'][$module][$module_srl] = $config;
|
$GLOBALS['__ModulePartConfig__'][$module][$module_srl] = $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $GLOBALS['__ModulePartConfig__'][$module][$module_srl];
|
$config = $GLOBALS['__ModulePartConfig__'][$module][$module_srl];
|
||||||
|
return $config === -1 ? null : $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -630,6 +630,10 @@ class pointController extends point
|
||||||
public function triggerCopyModule($obj)
|
public function triggerCopyModule($obj)
|
||||||
{
|
{
|
||||||
$pointConfig = ModuleModel::getModulePartConfig('point', $obj->originModuleSrl);
|
$pointConfig = ModuleModel::getModulePartConfig('point', $obj->originModuleSrl);
|
||||||
|
if (is_object($pointConfig))
|
||||||
|
{
|
||||||
|
$pointConfig = get_object_vars($pointConfig);
|
||||||
|
}
|
||||||
|
|
||||||
$oModuleController = getController('module');
|
$oModuleController = getController('module');
|
||||||
if(is_array($obj->moduleSrlList))
|
if(is_array($obj->moduleSrlList))
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ class pointView extends point
|
||||||
$module_config = ModuleModel::getModulePartConfig('point', $current_module_srl);
|
$module_config = ModuleModel::getModulePartConfig('point', $current_module_srl);
|
||||||
if(!$module_config)
|
if(!$module_config)
|
||||||
{
|
{
|
||||||
|
$module_config = array();
|
||||||
$module_config['insert_document'] = $config->insert_document;
|
$module_config['insert_document'] = $config->insert_document;
|
||||||
$module_config['insert_comment'] = $config->insert_comment;
|
$module_config['insert_comment'] = $config->insert_comment;
|
||||||
$module_config['upload_file'] = $config->upload_file;
|
$module_config['upload_file'] = $config->upload_file;
|
||||||
|
|
@ -50,6 +51,10 @@ class pointView extends point
|
||||||
$module_config['voted_comment'] = $config->voted_comment;
|
$module_config['voted_comment'] = $config->voted_comment;
|
||||||
$module_config['blamed_comment'] = $config->blamed_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;
|
$module_config['module_srl'] = $current_module_srl;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue