Version 4.3.6

This commit is contained in:
Neo committed 2025-12-19 05:49:12 -08:00
1 parent fe1acf984a
commit 1a0c7fd3c2
609 files changed
+14707 -5726

No files matched your search

+26
View File
@@ -8,6 +8,32 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
class cms_hook_Topic extends _HOOK_CLASS_
{
/**
* Can view?
*
* @param \IPS\Member|NULL $member The member to check for or NULL for the currently logged in member
* @return bool
*/
public function canView( $member=NULL )
{
$canView = parent::canView( $member );
$member = $member ? $member : \IPS\Member::loggedIn();
/* Whitelist which types of do we allow */
$do = array( 'editComment' );
if ( ! $canView )
{
/* Check to see if it's attached to a database record and we are not a guest */
if ( isset( \IPS\Request::i()->do ) and in_array( \IPS\Request::i()->do, $do ) and $record = \IPS\cms\Records::getLinkedRecord( $this ) and $member->member_id )
{
return $record->canView();
}
}
return $canView;
}
/**
* Do Moderator Action
*