Version 5.0.13
This commit is contained in:
1 parent
b89858b2ff
commit
5efe744c5f
1407 files changed
+69690
-30177
No files matched your search
@@ -226,6 +226,12 @@ trait Solvable
|
||||
*/
|
||||
public function canSolve( ?Member $member = NULL ): bool
|
||||
{
|
||||
/* Extensions go first */
|
||||
if( $permCheck = Permissions::can( 'solve', $this, $member ) )
|
||||
{
|
||||
return ( $permCheck === Permissions::PERM_ALLOW );
|
||||
}
|
||||
|
||||
if( !$this->actionEnabled( 'solve', $member ) )
|
||||
{
|
||||
return false;
|
||||
@@ -238,6 +244,12 @@ trait Solvable
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Guests cannot do this */
|
||||
if( !$member->member_id )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/* If we have no replies, it's not solvable yet */
|
||||
if( $this->commentCount() <= 0 OR ( static::$firstCommentRequired AND $this->commentCount() == 1 ) )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user