Version 5.0.6
This commit is contained in:
1 parent
a3a4a9ccbd
commit
b89858b2ff
1214 files changed
+92828
-14859
No files matched your search
@@ -33,7 +33,6 @@ use IPS\Db\Exception as DbException;
|
||||
use IPS\Dispatcher;
|
||||
use IPS\Extensions\CustomFieldAbstract;
|
||||
use IPS\File;
|
||||
use IPS\File\FileSystem;
|
||||
use IPS\GeoLocation;
|
||||
use IPS\Helpers\Form;
|
||||
use IPS\Helpers\Form\Codemirror;
|
||||
@@ -1322,11 +1321,11 @@ class Fields extends CustomField implements Permissions
|
||||
|
||||
try
|
||||
{
|
||||
return Member::loggedIn()->language()->get( static::$langKey . '_' . $this->id );
|
||||
return (string) Member::loggedIn()->language()->get( static::$langKey . '_' . $this->id ); # If the key doesn't exist, we populate with null
|
||||
}
|
||||
catch( UnderflowException $e )
|
||||
{
|
||||
return FALSE;
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1900,9 +1899,9 @@ class Fields extends CustomField implements Permissions
|
||||
'Upload' => array_merge( array( 'field_upload_is_image', 'field_upload_is_multiple', 'field_upload_thumb' ), $displayDefaults ),
|
||||
'Url' => array_merge( array( 'field_default_value', 'field_unique' ), $displayDefaults ),
|
||||
'YesNo' => array_merge( array( 'field_default_value' ), $displayDefaults ),
|
||||
'Youtube' => array( 'media_params', 'media_display_listing_method', 'media_display_display_method', 'field_unique' ),
|
||||
'Spotify' => array( 'media_params', 'media_display_listing_method', 'media_display_display_method', 'field_unique' ),
|
||||
'Soundcloud'=> array( 'media_params', 'media_display_listing_method', 'media_display_display_method', 'field_unique' )
|
||||
'Youtube' => array( 'media_params', 'media_display_listing_method', 'media_display_display_method', 'field_unique', 'field_display_display_json_where' ),
|
||||
'Spotify' => array( 'media_params', 'media_display_listing_method', 'media_display_display_method', 'field_unique', 'field_display_display_json_where' ),
|
||||
'Soundcloud'=> array( 'media_params', 'media_display_listing_method', 'media_display_display_method', 'field_unique', 'field_display_display_json_where' )
|
||||
);
|
||||
|
||||
foreach ( $toggles as $k => $v )
|
||||
@@ -2327,12 +2326,12 @@ class Fields extends CustomField implements Permissions
|
||||
|
||||
}, NULL, NULL, 'field_display_display_json_custom' ) );
|
||||
|
||||
/* Display where? */
|
||||
$form->add( new Radio( 'field_display_display_json_where', ($displayJson['display']['where'] ?? 'top'), FALSE, array( 'options' => array( 'top' => 'cms_field_display_top', 'bottom' => 'cms_field_display_bottom' ) ), NULL, NULL, NULL, 'field_display_display_json_where' ) );
|
||||
|
||||
/* Media display */
|
||||
$form->add( new Radio( 'media_display_display_method', $mediaDisplayDefault, FALSE, array( 'options' => $mediaListingOptions ), NULL, NULL, NULL, 'media_display_display_method' ) );
|
||||
|
||||
/* Display where? */
|
||||
$form->add( new Radio( 'field_display_display_json_where', ($displayJson['display']['where'] ?? 'top'), FALSE, array( 'options' => array( 'top' => 'cms_field_display_top', 'bottom' => 'cms_field_display_bottom' ) ), NULL, NULL, NULL, 'field_display_display_json_where' ) );
|
||||
|
||||
$form->addSeparator();
|
||||
|
||||
$form->add( new YesNo( 'field_display_commentform', $this->id ? $this->display_commentform : 0, FALSE, array(), NULL, NULL, NULL, 'field_display_commentform' ) );
|
||||
@@ -2745,6 +2744,11 @@ class Fields extends CustomField implements Permissions
|
||||
{
|
||||
$displayJson['listing']['method'] = $values['media_display_listing_method'];
|
||||
$displayJson['display']['method'] = $values['media_display_display_method'];
|
||||
|
||||
if ( isset( $values['field_display_display_json_where'] ) )
|
||||
{
|
||||
$displayJson['display']['where'] = $values['field_display_display_json_where'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user