Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -386,8 +386,8 @@ class _advertisements extends \IPS\Dispatcher\Controller
|
||||
$locations,
|
||||
TRUE,
|
||||
array(
|
||||
'options' => array_combine( array_keys( $defaultLocations ), array_keys( $defaultLocations ) ),
|
||||
'toggles' => $defaultLocations,
|
||||
'options' => array_combine( array_keys( $defaultLocations ), array_keys( $defaultLocations ) ),
|
||||
'toggles' => $defaultLocations,
|
||||
),
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -463,15 +463,26 @@ class _advertisements extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$images = array( 'large' => (string) $values['ad_image'] );
|
||||
|
||||
if( isset( $values['ad_image_small'] ) AND $values['ad_image_small'] )
|
||||
if( $values['ad_image_more'] and isset( $values['ad_image_small'] ) AND $values['ad_image_small'] )
|
||||
{
|
||||
$images['small'] = (string) $values['ad_image_small'];
|
||||
}
|
||||
|
||||
if( isset( $values['ad_image_medium'] ) AND $values['ad_image_medium'] )
|
||||
if( $values['ad_image_more'] and isset( $values['ad_image_medium'] ) AND $values['ad_image_medium'] )
|
||||
{
|
||||
$images['medium'] = (string) $values['ad_image_medium'];
|
||||
}
|
||||
|
||||
/* If there are images, but we disabled additional images, remove them */
|
||||
if( !$values['ad_image_more'] and isset( $values['ad_image_small'] ) AND $values['ad_image_small'] )
|
||||
{
|
||||
$values['ad_image_small']->delete();
|
||||
}
|
||||
|
||||
if( !$values['ad_image_more'] and isset( $values['ad_image_medium'] ) AND $values['ad_image_medium'] )
|
||||
{
|
||||
$values['ad_image_medium']->delete();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user