Version 5.0.0 beta 3

This commit is contained in:
Neo committed 2025-12-19 16:47:22 -08:00
1 parent f61b0da85d
commit e86153356a
108 files changed
+2927 -1573

No files matched your search

+17 -6
View File
@@ -570,6 +570,12 @@ class Poll extends ActiveRecord implements SplSubject
*/
public function canViewResults(): bool
{
/* The owner of the poll should always be able to see the results */
if( Member::loggedIn()->member_id == $this->author()->member_id )
{
return true;
}
/* If the poll is closed, check the group permissions.
0 = Never
1 = Always
@@ -580,11 +586,7 @@ class Poll extends ActiveRecord implements SplSubject
}
elseif( Member::loggedIn()->group['g_poll_results'] == 1 )
{
if ( Settings::i()->allow_result_view )
{
return true;
}
else if ( isset( Request::i()->nullVote ) and Member::loggedIn()->member_id )
if ( isset( Request::i()->nullVote ) and Member::loggedIn()->member_id )
{
if ( ! $this->getVote() )
{
@@ -594,8 +596,17 @@ class Poll extends ActiveRecord implements SplSubject
return TRUE;
}
}
elseif( Settings::i()->allow_result_view )
{
return true;
}
else
{
/* If the setting is disabled, check if we have voted */
return (bool) $this->getVote();
}
}
return FALSE;
}