Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -128,6 +128,12 @@ class _Announcement extends \IPS\Content\Item
|
||||
*/
|
||||
public static function loadAllByLocation( $location )
|
||||
{
|
||||
/* Are we banned? If so, do not return any announcements */
|
||||
if ( \IPS\Member::loggedIn()->isBanned() )
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
$announcements = static::getStore();
|
||||
|
||||
$return = array();
|
||||
@@ -252,8 +258,8 @@ class _Announcement extends \IPS\Content\Item
|
||||
{
|
||||
if ( $key != 'core' )
|
||||
{
|
||||
/* Don't list apps without front modules */
|
||||
if( !\count( $data->modules( 'front' ) ) )
|
||||
/* Don't list apps without front modules or that are not being revealed */
|
||||
if( !\count( $data->modules( 'front' ) ) OR $data->hide_tab )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -292,7 +298,7 @@ class _Announcement extends \IPS\Content\Item
|
||||
$groups[ $group->g_id ] = $group->name;
|
||||
}
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Select( 'announce_permissions', $announcement ? ( $announcement->permissions == '*' ? '*' : explode( ',', $announcement->permissions ) ) : '*', NULL, array( 'multiple' => TRUE, 'options' => $groups, 'unlimited' => '*', 'unlimitedLang' => 'everyone' ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\CheckboxSet( 'announce_permissions', $announcement ? ( $announcement->permissions == '*' ? '*' : explode( ',', $announcement->permissions ) ) : '*', NULL, array( 'multiple' => TRUE, 'options' => $groups, 'unlimited' => '*', 'unlimitedLang' => 'everyone', 'impliedUnlimited' => TRUE ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\Custom( 'announce_color', $announcement ? $announcement->color : 'information', NULL, array( 'getHtml' => function( $element )
|
||||
{
|
||||
return \IPS\Theme::i()->getTemplate( 'forms', 'core', 'front' )->colorSelection( $element->name, $element->value );
|
||||
|
||||
Reference in new issue
Block a user