Version 4.7.6

This commit is contained in:
Neo committed 2025-12-19 16:05:19 -08:00
1 parent 8ba7d43898
commit 7b7404e741
1085 files changed
+30590 -7837

No files matched your search

@@ -34,6 +34,54 @@ class _Gallery extends \IPS\gallery\extensions\core\EditorLocations\Images
{
return NULL;
}
/**
* Permission check for attachments
*
* @param \IPS\Member $member The member
* @param int|null $id1 Primary ID
* @param int|null $id2 Secondary ID
* @param string|null $id3 Arbitrary data
* @param array $attachment The attachment data
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
* @return bool
*/
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment, $viewOnly=FALSE )
{
if( $id3 and $id3 == 'album' )
{
try
{
$album = \IPS\gallery\Album::load( $id1 );
return $album->canView( $member );
}
catch ( \OutOfRangeException $e )
{
return FALSE;
}
}
return parent::attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment, $viewOnly );
}
/**
* Attachment lookup
*
* @param int|null $id1 Primary ID
* @param int|null $id2 Secondary ID
* @param string|null $id3 Arbitrary data
* @return \IPS\Http\Url|\IPS\Content|\IPS\Node\Model
* @throws \LogicException
*/
public function attachmentLookup( $id1, $id2, $id3 )
{
if( $id3 and $id3 == 'album' )
{
return \IPS\gallery\Album\Comment::load( $id2 );
}
return parent::attachmentLookup( $id1, $id2, $id3 );
}
/**
* Can whatever is posted in this editor be moderated?