mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-23 04:12:18 +09:00
Fix max_input_vars error when there are too many levels
- max_input_vars 설정과 무관하게 레벨 수를 늘릴 수 있도록 조정 (레벨 관련 POST 변수들을 하나로 합쳐서 전송) - 허용되는 최대 레벨 수를 1000에서 10000으로 늘림 (단, 권장하는 최대 수는 여전히 1000임)
This commit is contained in:
parent
c34a9a9005
commit
125dea44b6
5 changed files with 26 additions and 15 deletions
|
|
@ -97,7 +97,7 @@ class pointAdminController extends point
|
|||
|
||||
// The highest level
|
||||
$config->max_level = $args->max_level;
|
||||
if($config->max_level>1000) $config->max_level = 1000;
|
||||
if($config->max_level>10000) $config->max_level = 10000;
|
||||
if($config->max_level<1) $config->max_level = 1;
|
||||
|
||||
// Set the level icon
|
||||
|
|
@ -141,13 +141,15 @@ class pointAdminController extends point
|
|||
|
||||
$config->group_reset = $args->group_reset;
|
||||
$config->group_ratchet = $args->group_ratchet;
|
||||
|
||||
// Per-level point configurations
|
||||
unset($config->level_step);
|
||||
$level_step = array_map('intval', explode(',', $args->level_step ?: '0'));
|
||||
$config->level_step = array();
|
||||
for($i=1;$i<=$config->max_level;$i++)
|
||||
{
|
||||
$key = "level_step_".$i;
|
||||
$config->level_step[$i] = (int)$args->{$key};
|
||||
$config->level_step[$i] = isset($level_step[$i - 1]) ? $level_step[$i - 1] : array_last($level_step);
|
||||
}
|
||||
|
||||
// A function to calculate per-level points
|
||||
$config->expression = $args->expression;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue