Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+14 -12
View File
@@ -150,24 +150,26 @@ class _Vote extends \IPS\Patterns\ActiveRecord
$choices = $this->poll->choices;
foreach ( $this->member_choices as $k => $v )
{
if ( is_array( $v ) )
if ( isset( $choices[ $k ] ) ) // If the question has been deleted since this vote was cast, this won't be set
{
foreach ( $v as $key => $memberValues )
if ( is_array( $v ) )
{
if ( $choices[ $k ]['votes'][ $memberValues ] > 0 )
foreach ( $v as $key => $memberValues )
{
$choices[ $k ]['votes'][ $memberValues ]--;
if ( $choices[ $k ]['votes'][ $memberValues ] > 0 )
{
$choices[ $k ]['votes'][ $memberValues ]--;
}
}
}
else
{
if ( $choices[ $k ]['votes'][ $v ] > 0 )
{
$choices[ $k ]['votes'][ $v ]--;
}
}
}
else
{
if ( $choices[ $k ]['votes'][ $v ] > 0 )
{
$choices[ $k ]['votes'][ $v ]--;
}
}
}
$this->poll->choices = $choices;