Version 4.6.0

This commit is contained in:
Neo committed 2025-12-19 05:55:31 -08:00
1 parent f79dcf067a
commit 517a5e1f70
2036 files changed
+110041 -26162

No files matched your search

+25 -1
View File
@@ -209,7 +209,7 @@ class _Poll extends \IPS\Patterns\ActiveRecord implements \SplSubject
$existing = $this->choices;
foreach ( $data['questions'] as $k => $questionData )
{
if ( $questionData['title'] )
if ( $questionData['title'] OR $questionData['answers'] )
{
$choices[ $k ] = array(
'question' => $questionData['title'],
@@ -419,6 +419,9 @@ class _Poll extends \IPS\Patterns\ActiveRecord implements \SplSubject
$this->recountVotes();
$this->save();
}
/* Achievements */
$member->achievementAction( 'core', 'VotePoll', $this );
}
/**
@@ -676,4 +679,25 @@ class _Poll extends \IPS\Patterns\ActiveRecord implements \SplSubject
'questions' => $questions
);
}
/**
* Save Changed Columns
*
* @return void
*/
public function save()
{
$new = FALSE;
if ( $this->_new )
{
$new = TRUE;
}
parent::save();
if( $new )
{
$this->author()->achievementAction( 'core', 'NewPoll', $this );
}
}
}