Allow point reversion policies to be customized for each module

This commit is contained in:
Kijin Sung 2025-09-04 21:47:28 +09:00
parent 5f8586ec8f
commit 7a6400f39d
4 changed files with 43 additions and 13 deletions

View file

@ -271,7 +271,7 @@ class PointModel extends Point
*
* @param int $module_srl
* @param string $config_key
* @return int
* @return int|bool
*/
public static function getModulePointConfig($module_srl, $config_key)
{
@ -306,10 +306,10 @@ class PointModel extends Point
else
{
$default_config = self::getConfig();
$point = $default_config->{$config_key};
$point = $default_config->{$config_key} ?? 0;
}
return intval($point);
return is_bool($point) ? $point : intval($point);
}
}
/* End of file point.model.php */