Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -12,7 +12,7 @@
|
||||
namespace IPS\gallery\extensions\core\GroupLimits;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -37,7 +37,36 @@ class _Album
|
||||
'exclude' => array(),
|
||||
'lessIsMore' => array(),
|
||||
'neg1IsBest' => array(),
|
||||
'zeroIsBest' => array( 'g_album_limit', 'g_img_album_limit', 'g_max_upload', 'g_max_transfer', 'g_max_views', 'g_movie_size' ),
|
||||
'zeroIsBest' => array( 'g_img_album_limit', 'g_max_upload', 'g_max_transfer', 'g_max_views', 'g_movie_size' ),
|
||||
'callback' => array( 'g_album_limit' => function( $a, $b, $k, $member ) {
|
||||
/* We only want to use the limit if this group can create albums */
|
||||
$limits = array();
|
||||
if ( $a['g_create_albums'] )
|
||||
{
|
||||
if ( $a[ $k ] == 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$limits[] = $a[ $k ];
|
||||
}
|
||||
}
|
||||
|
||||
if ( $b['g_create_albums'] )
|
||||
{
|
||||
if ( $b[ $k ] == 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$limits[] = $b[ $k ];
|
||||
}
|
||||
}
|
||||
|
||||
return \count( $limits ) ? \max( $limits ) : 0;
|
||||
} )
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user