TEMP: allow one option

This commit is contained in:
Lastorder 2024-11-22 09:40:10 +09:00 committed by GitHub
parent 690ba43271
commit 0fd0e336a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -70,7 +70,7 @@ jQuery(function($){
$tr = $(this).prevAll('div').children('table').find('>tbody>tr:last');
match = $tr.find('td>input').attr('name').match(/item_(\d+)_(\d+)/);
if(!match) return;
if(!match || match[2] == 1) return;
$tr.remove();

View file

@ -100,8 +100,7 @@ class PollController extends Poll
}
}
// TEMP: allow empty poll if add item is on
if((!isset($args->poll) || !is_array($args->poll) || !count($args->poll)) && $vars->add_item != '2')
if(!isset($args->poll) || !is_array($args->poll) || !count($args->poll))
{
throw new Rhymix\Framework\Exception('cmd_null_item');
}