Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -42,6 +42,7 @@ class _StaticCache extends \IPS\Widget
|
||||
|
||||
$member = \IPS\Member::loggedIn() ?: new \IPS\Member;
|
||||
|
||||
$this->cacheKey = "widget_{$this->key}_" . $this->uniqueKey . '_' . md5( json_encode( $configuration ) . "_" . $member->language()->id . "_" . $member->skin . "_" . $orientation );
|
||||
$theme = $member->skin ?: \IPS\Theme::defaultTheme();
|
||||
$this->cacheKey = "widget_{$this->key}_" . $this->uniqueKey . '_' . md5( json_encode( $configuration ) . "_" . $member->language()->id . "_" . $theme . "_" . $orientation );
|
||||
}
|
||||
}
|
||||
@@ -366,7 +366,7 @@ abstract class _Widget
|
||||
public static function load( $parent, $widgetKey, $uniqueKey, $configuration=array(), $access=null, $orientation=null )
|
||||
{
|
||||
/* If our parent is not enabled, do not attempt to use this widget - both \IPS\Application and \IPS\Plugin have get__enabled() methods, so this covers both */
|
||||
if ( $parent->_enabled == FALSE )
|
||||
if ( $parent->enabled == FALSE )
|
||||
{
|
||||
throw new \OutOfRangeException;
|
||||
}
|
||||
@@ -506,9 +506,9 @@ abstract class _Widget
|
||||
'modal' => \IPS\Member::loggedIn()->language()->addToStack('dev_widget_menu_style_modal'),
|
||||
) ) ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'dev_widget_allow_reuse', ( \is_array( $current ) ? $current['dev_widget_allow_reuse'] : 0 ), FALSE ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'dev_widget_allow_reuse', ( \is_array( $current ) ? $current['dev_widget_allow_reuse'] : 0 ), FALSE, [], NULL, NULL, NULL, md5(uniqid() ) ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'dev_widget_embeddable', ( \is_array( $current ) ? $current['dev_widget_embeddable'] : 0 ), FALSE ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'dev_widget_embeddable', ( \is_array( $current ) ? $current['dev_widget_embeddable'] : 0 ), FALSE, [], NULL, NULL, NULL, md5(uniqid() ) ) );
|
||||
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
@@ -1101,9 +1101,13 @@ abstract class _Widget
|
||||
{
|
||||
$form = new \IPS\Helpers\Form;
|
||||
}
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'show_on_all_devices', isset( $this->configuration['devices_to_show'] ) ? empty( array_diff( array( 'Phone', 'Tablet', 'Desktop' ), $this->configuration['devices_to_show'] ) ) : TRUE, FALSE, array( 'togglesOff' => array( 'devices_to_show' ) ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\CheckboxSet( 'devices_to_show', isset( $this->configuration['devices_to_show'] ) ? $this->configuration['devices_to_show'] : array( 'Phone', 'Tablet', 'Desktop' ), FALSE, array( 'options' => array( 'Phone' => \IPS\Member::loggedIn()->language()->addToStack( 'device_phone' ), 'Tablet' => \IPS\Member::loggedIn()->language()->addToStack( 'device_tablet' ), 'Desktop' => \IPS\Member::loggedIn()->language()->addToStack( 'device_desktop' ) ) ), NULL, NULL, NULL, 'devices_to_show' ) );
|
||||
|
||||
/* Only show visibility options if we are editing from block manager as configuration is specific to each instance */
|
||||
if( \IPS\Dispatcher::i()->controllerLocation == 'front' )
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'show_on_all_devices', isset( $this->configuration['devices_to_show'] ) ? empty( array_diff( array( 'Phone', 'Tablet', 'Desktop' ), $this->configuration['devices_to_show'] ) ) : TRUE, FALSE, array( 'togglesOff' => array( 'devices_to_show' ) ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\CheckboxSet( 'devices_to_show', isset( $this->configuration['devices_to_show'] ) ? $this->configuration['devices_to_show'] : array( 'Phone', 'Tablet', 'Desktop' ), FALSE, array( 'options' => array( 'Phone' => \IPS\Member::loggedIn()->language()->addToStack( 'device_phone' ), 'Tablet' => \IPS\Member::loggedIn()->language()->addToStack( 'device_tablet' ), 'Desktop' => \IPS\Member::loggedIn()->language()->addToStack( 'device_desktop' ) ) ), NULL, NULL, NULL, 'devices_to_show' ) );
|
||||
}
|
||||
|
||||
if( \IPS\Settings::i()->clubs AND ( ( \IPS\Request::i()->pageApp === 'core' AND \IPS\Request::i()->pageModule === 'clubs' ) OR ( \IPS\Request::i()->pageApp !== 'core' AND \IPS\Request::i()->pageApp !== 'nexus' ) ) )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user