Version 5.0.6
This commit is contained in:
1 parent
a3a4a9ccbd
commit
b89858b2ff
1214 files changed
+92828
-14859
No files matched your search
@@ -565,7 +565,7 @@ class advanced extends Controller
|
||||
/* Build and show form */
|
||||
$form = new Form;
|
||||
|
||||
$form->add( new Codemirror( 'custom_body_code', Settings::i()->custom_body_code, FALSE, array('height' => 150, 'codeModeAllowedLanguages' => [ 'xml' ] ), NULL, NULL, NULL, 'custom_body_code' ) );
|
||||
$form->add( new Codemirror( 'custom_body_code', Settings::i()->custom_body_code, FALSE, array('height' => 150, 'codeModeAllowedLanguages' => [ 'html' ] ), NULL, NULL, NULL, 'custom_body_code' ) );
|
||||
$form->add( new Codemirror( 'custom_page_view_js', Settings::i()->custom_page_view_js, FALSE, array('height' => 150, 'codeModeAllowedLanguages' => [ 'javascript' ] ), NULL, NULL, NULL, 'custom_page_view_js' ) );
|
||||
|
||||
if ( $values = $form->values() )
|
||||
|
||||
@@ -81,7 +81,7 @@ class email extends \IPS\Dispatcher\Controller
|
||||
$settingsForm->add( new Color( 'email_color', Settings::i()->email_color, TRUE ) );
|
||||
$settingsForm->add( new Upload( 'email_logo', Settings::i()->email_logo ? File::get( 'core_Theme', Settings::i()->email_logo ) : NULL, FALSE, [ 'image' => TRUE, 'storageExtension' => 'core_Theme' ] ) );
|
||||
$settingsForm->add( new YesNo( 'social_links_in_email', Settings::i()->social_links_in_email, FALSE, [], NULL, NULL, NULL, 'social_links_in_email' ) );
|
||||
|
||||
$settingsForm->add( new YesNo( 'our_picks_in_email', Settings::i()->our_picks_in_email, FALSE, array(), NULL, NULL, NULL, 'our_picks_in_email' ) );
|
||||
|
||||
$settingsForm->add( new YesNo( 'email_truncate', ( Settings::i()->email_truncate ), FALSE, array(), NULL, NULL, NULL, 'email_truncate' ) );
|
||||
$settingsForm->add( new YesNo( 'email_log_do', ( Settings::i()->prune_log_emailstats != 0 ), FALSE, array( 'togglesOn' => array( 'prune_log_emailstats' ) ), NULL, NULL, NULL, 'email_log_do' ) );
|
||||
|
||||
@@ -87,20 +87,6 @@ class general extends Controller
|
||||
$form->add( new YesNo( 'site_site_elsewhere', Settings::i()->site_site_elsewhere, FALSE, [ 'togglesOn' => [ 'site_main_url', 'site_main_title' ] ] ) );
|
||||
$form->add( new FormUrl( 'site_main_url', Settings::i()->site_main_url, FALSE, [], NULL, NULL, NULL, 'site_main_url' ) );
|
||||
$form->add( new Text( 'site_main_title', Settings::i()->site_main_title, FALSE, [], NULL, NULL, NULL, 'site_main_title' ) );
|
||||
$diagnosticsOptions = [];
|
||||
if( (bool) Settings::i()->usage_reporting === true )
|
||||
{
|
||||
$diagnosticsOptions[] = 'usage';
|
||||
}
|
||||
if( (bool) Settings::i()->diagnostics_reporting === true )
|
||||
{
|
||||
$diagnosticsOptions[] = 'diagnostics';
|
||||
}
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\CheckboxSet( 'diagnostics_reporting', $diagnosticsOptions, FALSE, array( 'options' => array(
|
||||
'usage' => 'diagnostics_reporting_usage',
|
||||
'diagnostics' => 'diagnostics_reporting_diagnostics',
|
||||
) ) ) );
|
||||
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
@@ -115,11 +101,7 @@ class general extends Controller
|
||||
} ) );
|
||||
|
||||
$values['site_address'] = json_encode( $values['site_address'] );
|
||||
|
||||
$values['usage_reporting'] = in_array( 'usage', $values['diagnostics_reporting'] );
|
||||
$values['diagnostics_reporting'] = in_array( 'diagnostics', $values['diagnostics_reporting'] );
|
||||
Db::i()->update( 'core_tasks', array( 'enabled' => intval( $values['usage_reporting'] ) ), array( '`key`=?', 'usagereporting' ) );
|
||||
|
||||
|
||||
$form->saveAsSettings( $values );
|
||||
|
||||
if ( $values['site_online'] )
|
||||
|
||||
@@ -85,12 +85,14 @@ class licensekey extends Controller
|
||||
'icon' => 'refresh',
|
||||
'link' => Url::internal( 'app=core&module=settings&controller=licensekey&do=refresh' )->csrf(),
|
||||
'title' => 'license_refresh',
|
||||
'class' => 'ipsButton--disabled',
|
||||
),
|
||||
'remove' => array(
|
||||
'icon' => 'pencil',
|
||||
'link' => Url::internal( 'app=core&module=settings&controller=licensekey&do=settings' ),
|
||||
'title' => 'license_change',
|
||||
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => Member::loggedIn()->language()->addToStack('license_change') )
|
||||
'data' => array( 'ipsDialog' => '', 'ipsDialog-title' => Member::loggedIn()->language()->addToStack('license_change') ),
|
||||
'class' => 'ipsButton--disabled',
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
@@ -497,7 +497,7 @@ class login extends Controller
|
||||
/* Redirect */
|
||||
Output::i()->redirect( Url::internal( 'app=core&module=settings&controller=login&tab=registration' ), 'saved' );
|
||||
}
|
||||
$desc = Theme::i()->getTemplate( 'global', 'core' )->message( Member::loggedIn()->language()->addToStack('registration_default_group_info', NULL, [ 'sprintf' => [Group::load( Settings::i()->member_group )->formattedName ] ] ), 'none i-border-radius_0' );
|
||||
$desc = Theme::i()->getTemplate( 'global', 'core' )->message( Member::loggedIn()->language()->addToStack('registration_default_group_info', NULL, [ 'htmlsprintf' => [Group::load( Settings::i()->member_group )->formattedName ] ] ), 'none i-border-radius_0' );
|
||||
|
||||
/* Display */
|
||||
return $desc . $form;
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace IPS\core\modules\admin\settings;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use Exception;
|
||||
use InvalidArgumentException;
|
||||
use IPS\Application;
|
||||
use IPS\Content;
|
||||
@@ -51,6 +52,7 @@ use function count;
|
||||
use function defined;
|
||||
use function intval;
|
||||
use function is_array;
|
||||
use function preg_match;
|
||||
use const IPS\TEMP_DIRECTORY;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
@@ -193,6 +195,7 @@ class posting extends Controller
|
||||
}, NULL, NULL, 'attachment_image_size' ) );
|
||||
|
||||
$form->add( new Number( 'max_internalembed_width', Settings::i()->max_internalembed_width, FALSE, array( 'unlimited' => 0 ), NULL, NULL, 'px', 'max_internalembed_width' ) );
|
||||
$form->add( new Number( 'max_embeddedmedia_width', Settings::i()->max_embeddedmedia_width, FALSE, array( 'unlimited' => 0 ), NULL, NULL, 'px', 'max_embeddedmedia_width' ) );
|
||||
|
||||
$form->addHeader('posting_content');
|
||||
if ( Login::registrationType() != 'disabled' )
|
||||
@@ -925,6 +928,7 @@ class posting extends Controller
|
||||
continue;
|
||||
}
|
||||
|
||||
$isCustom = preg_match( "/^ipsCustom(Node|Mark|Extension)__/", $restriction );
|
||||
if ( isset( $dependencies[ $restriction ] ) )
|
||||
{
|
||||
$firstLine = '';
|
||||
@@ -936,6 +940,16 @@ class posting extends Controller
|
||||
|
||||
Member::loggedIn()->language()->words['editor_r__' . $restriction . '_desc'] = $firstLine . sprintf( Member::loggedIn()->language()->get( 'editor_r__dependency' ), Member::loggedIn()->language()->addToStack( 'editor_r__' . $dependencies[$restriction] ) );
|
||||
}
|
||||
else if ( !$isCustom )
|
||||
{
|
||||
try
|
||||
{
|
||||
/* Now make sure to put the _desc description in just in case so the form can use it */
|
||||
$actualDesc = Member::loggedIn()->language()->get( "editor_r__" . $restriction . "__desc" );
|
||||
Member::loggedIn()->language()->words["editor_r__" . $restriction . "_desc"] = $actualDesc;
|
||||
}
|
||||
catch ( UnderflowException ) {}
|
||||
}
|
||||
|
||||
$dependents = [];
|
||||
foreach ( $dependencies as $dependent => $dependency )
|
||||
|
||||
@@ -147,7 +147,7 @@ class webapp extends Controller
|
||||
if( $values = $form->values() )
|
||||
{
|
||||
$path = Url::createFromString( Url::baseUrl() )->data[ Url::COMPONENT_PATH ];
|
||||
$startUrl = $path ?? '';
|
||||
$startUrl = !empty( $path ) ? $path : '/';
|
||||
|
||||
if ( $values['manifest_custom_url_toggle'] !== FALSE and ! empty( $values['manifest_short_url'] ) )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user