diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-14 09:49:08 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-14 09:49:08 +0100 |
| commit | 0227c8d830b8c7d58ef628a32dffc1e116feb727 (patch) | |
| tree | 89a25c81b9f4da345557236b7e48d5e106dae0f0 /admin | |
| parent | 6f8d642060d9e9112cdafaede4b2ea28a2e22ce3 (diff) | |
| download | ckeditor-0227c8d830b8c7d58ef628a32dffc1e116feb727.tar.gz ckeditor-0227c8d830b8c7d58ef628a32dffc1e116feb727.tar.bz2 ckeditor-0227c8d830b8c7d58ef628a32dffc1e116feb727.zip | |
php-cs-fixer tidies to php8.5 standards
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'admin')
| -rwxr-xr-x | admin/admin_ckeditor_inc.php | 82 | ||||
| -rwxr-xr-x | admin/schema_inc.php | 16 |
2 files changed, 48 insertions, 50 deletions
diff --git a/admin/admin_ckeditor_inc.php b/admin/admin_ckeditor_inc.php index 1008c32..e3698c5 100755 --- a/admin/admin_ckeditor_inc.php +++ b/admin/admin_ckeditor_inc.php @@ -1,64 +1,62 @@ <?php -$formCkeditorFeatures = array( - "ckeditor_custom_config" => array( - 'label' => 'Custom Config File', - 'note' => 'If enabled, a custom configuration is included, either <kbd>' . THEMES_PKG_DIR . '/styles/<current-style>/ckeditor/ckconfig.custom.js</kbd>, or <kbd>' . CKEDITOR_PKG_DIR . '/ckconfig.custom.js</kbd>. It may be a modified copy of <kbd>ckconfig.js</kbd> or of <kbd>ckconfig.bitweaver.js</kbd>. Depending on the modifications, a few of the settings below might not work anymore as expected (e.g., toolbar or skin settings).' - ), - "ckeditor_debug" => array( - 'label' => 'Enabled debugging', - 'note' => 'Enable support for debug message output. On first debug message a window will pop up.' - ), - "ckeditor_on_click" => array( - 'label' => 'Load CKEditor on Click', - 'note' => 'Delay loading the CKEditor until the user clicks on the text area.' - ), - "ckeditor_ask" => array( - 'label' => 'Ask to use CKEditor', - 'note' => 'If set the user will be prompted if they want to use CKEditor for a given textbox. This option implies Load CKEditor on Click even if it is not set.' - ), -); - +$formCkeditorFeatures = [ + "ckeditor_custom_config" => [ + "label" => "Custom Config File", + "note" => "If enabled, a custom configuration is included, either <kbd>" . THEMES_PKG_PATH . "/styles/<current-style>/ckeditor/ckconfig.custom.js</kbd>, or <kbd>" . CKEDITOR_PKG_DIR . "/ckconfig.custom.js</kbd>. It may be a modified copy of <kbd>ckconfig.js</kbd> or of <kbd>ckconfig.bitweaver.js</kbd>. Depending on the modifications, a few of the settings below might not work anymore as expected (e.g., toolbar or skin settings).", + ], + "ckeditor_debug" => [ + "label" => "Enabled debugging", + "note" => "Enable support for debug message output. On first debug message a window will pop up.", + ], + "ckeditor_on_click" => [ + "label" => "Load CKEditor on Click", + "note" => "Delay loading the CKEditor until the user clicks on the text area.", + ], + "ckeditor_ask" => [ + "label" => "Ask to use CKEditor", + "note" => "If set the user will be prompted if they want to use CKEditor for a given textbox. This option implies Load CKEditor on Click even if it is not set.", + ], +]; // Toolbars -$gBitSmarty->assign( 'formCkeditorFeatures', $formCkeditorFeatures ); - -$formToolbars = array( 'ckedit_toolbars' => array( - 'label' => 'Toolbar Set', - 'note' => 'The toolbar set to use. "All" includes functionality not supported by Bitweaver. Use at your own risk!' - ) -); +$gBitSmarty->assign( "formCkeditorFeatures", $formCkeditorFeatures ); -$gBitSmarty->assign( 'formToolbars', $formToolbars ); -$gBitSmarty->assign( 'formToolbarChoices', array('Basic', 'Intermediate', 'Advanced', 'Full')); +$formToolbars = [ + "ckedit_toolbars" => [ + "label" => "Toolbar Set", + "note" => 'The toolbar set to use. "All" includes functionality not supported by Bitweaver. Use at your own risk!', + ], +]; +$gBitSmarty->assign( "formToolbars", $formToolbars ); +$gBitSmarty->assign( "formToolbarChoices", ["Basic", "Intermediate", "Advanced", "Full"]); // Skin -$formSkin = array( 'ckedit_skin' => array( - 'label' => 'Skin', - 'note' => 'The skin to use.', - ) -); -$gBitSmarty->assign( 'formSkin', $formSkin ); -$skins = array_flip( scandir( CKEDITOR_PKG_PATH.'skins/' ) ); -foreach( array( '.', '..' ) as $dir ) { +$formSkin = [ + "ckedit_skin" => [ + "label" => "Skin", + "note" => "The skin to use.", + ], +]; +$gBitSmarty->assign( "formSkin", $formSkin ); +$skins = array_flip( scandir( CKEDITOR_PKG_PATH."skins/" ) ); +foreach( [ ".", ".." ] as $dir ) { if( isset( $skins[$dir] ) ) { unset( $skins[$dir] ); } } -$gBitSmarty->assign( 'formSkinChoices', array_keys( $skins ) ); +$gBitSmarty->assign( "formSkinChoices", array_keys( $skins ) ); - -if( !empty( $_REQUEST['change_prefs'] ) ) { +if( !empty( $_REQUEST["change_prefs"] ) ) { foreach( $formCkeditorFeatures as $item => $data ) { simple_set_toggle( $item, CKEDITOR_PKG_NAME ); } - $ckeditorSets = array_merge( $formToolbars , $formSkin); + $ckeditorSets = [ ...$formToolbars , ...$formSkin]; foreach( $ckeditorSets as $item => $data ) { simple_set_value( $item, CKEDITOR_PKG_NAME ); } -} -?> +}
\ No newline at end of file diff --git a/admin/schema_inc.php b/admin/schema_inc.php index 7ebca97..5e67611 100755 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -1,13 +1,13 @@ <?php global $gBitInstaller; -$gBitInstaller->registerPackageInfo( CKEDITOR_PKG_NAME, [ - 'description' => "CKEditor is a 'What You See Is What You Get' textarea HTML editor. It works with IE 5.5+, Firefox 1.0+, Mozilla 1.3+, and Netscape 7+. ", - 'license' => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>', - 'important' => 'When using this WYSIWYG editor, we recommend that you either use HTML as the only content format or use TikiWiki with the option <kbd>allow HTML</kbd> enabled (formats are set in Administration --> Liberty --> Liberty plugins). It <em>can not</em> be used with competing editor TinyMCE active, and it is largely incompatible with the package Quicktags.', - 'version' => '3.1+', +$gBitInstaller->registerPackageInfo( CKEDITOR_PKG_NAME, [ + "description" => "CKEditor is a 'What You See Is What You Get' textarea HTML editor. It works with IE 5.5+, Firefox 1.0+, Mozilla 1.3+, and Netscape 7+. ", + "license" => '<a href="http://www.gnu.org/licenses/licenses.html#LGPL">LGPL</a>', + "important" => "When using this WYSIWYG editor, we recommend that you either use HTML as the only content format or use TikiWiki with the option <kbd>allow HTML</kbd> enabled (formats are set in Administration --> Liberty --> Liberty plugins). It <em>can not</em> be used with competing editor TinyMCE active, and it is largely incompatible with the package Quicktags.", + "version" => "3.1+", ] ); -$gBitInstaller->registerPreferences( CKEDITOR_PKG_NAME, [ - [ CKEDITOR_PKG_NAME,'ckedit_debug','n'], - [ CKEDITOR_PKG_NAME,'ckedit_toolbars', 'Basic'], +$gBitInstaller->registerPreferences( CKEDITOR_PKG_NAME, [ + [ CKEDITOR_PKG_NAME,"ckedit_debug","n"], + [ CKEDITOR_PKG_NAME,"ckedit_toolbars", "Basic"], ] ); |
