summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-14 09:54:15 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-14 09:54:15 +0100
commit7e4af642c93da5af9889211cff169c901e35d6b8 (patch)
tree9fd6433fcf8e763c97fd8499b2f13e88312bf3ce /admin
parentb463af3dd0d69bf659bd0820bd07bebd6358f74c (diff)
downloadliberty-7e4af642c93da5af9889211cff169c901e35d6b8.tar.gz
liberty-7e4af642c93da5af9889211cff169c901e35d6b8.tar.bz2
liberty-7e4af642c93da5af9889211cff169c901e35d6b8.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-xadmin/admin_liberty_inc.php2
-rwxr-xr-xadmin/comments.php2
-rwxr-xr-xadmin/plugins.php4
-rwxr-xr-xadmin/plugins/data_code.php6
-rwxr-xr-xadmin/schema_inc.php13
5 files changed, 12 insertions, 15 deletions
diff --git a/admin/admin_liberty_inc.php b/admin/admin_liberty_inc.php
index 81344a8..a1ad6af 100755
--- a/admin/admin_liberty_inc.php
+++ b/admin/admin_liberty_inc.php
@@ -107,7 +107,6 @@ $imageProcessors = [
];
$gBitSmarty->assign( 'imageProcessors', $imageProcessors );
-
$cacheTimes = [
0 => KernelTools::tra( "(no cache)" ),
60 => "1 " . KernelTools::tra( "minute" ),
@@ -123,7 +122,6 @@ $cacheTimes = [
];
$gBitSmarty->assign( "cacheTimes", $cacheTimes );
-
$formCaptcha = [
"liberty_use_captcha_freecap" => [
'label' => 'Use Freecap',
diff --git a/admin/comments.php b/admin/comments.php
index 1660d42..31fa501 100755
--- a/admin/comments.php
+++ b/admin/comments.php
@@ -40,7 +40,7 @@ if( !empty( $_REQUEST['change_prefs'] ) ) {
simple_set_toggle( $item, LIBERTY_PKG_NAME );
}
- $formValues = array('comments_edit_minutes', 'comments_per_page', 'comments_default_ordering', 'comments_default_display_mode' , 'comments_default_post_lines');
+ $formValues = ['comments_edit_minutes', 'comments_per_page', 'comments_default_ordering', 'comments_default_display_mode' , 'comments_default_post_lines'];
foreach( $formValues as $item ) {
simple_set_value( $item, LIBERTY_PKG_NAME );
}
diff --git a/admin/plugins.php b/admin/plugins.php
index d5a1df5..5aca875 100755
--- a/admin/plugins.php
+++ b/admin/plugins.php
@@ -1,5 +1,6 @@
<?php
namespace Bitweaver\Liberty;
+
require_once '../../kernel/includes/setup_inc.php';
use Bitweaver\KernelTools;
@@ -7,7 +8,7 @@ include_once KERNEL_PKG_INCLUDE_PATH.'simple_form_functions_lib.php';
$gBitSystem->verifyPermission( 'p_admin' );
-// this will clear out all plugin settings in the database. scanAllPlugins
+// this will clear out all plugin settings in the database. scanAllPlugins
// below will then reload all plugins and set them to their default setup.
if( !empty( $_REQUEST['reset_all_plugins'] ) ) {
// because of include_once scenarios in scanAllPlugins, you need two complete page refreshes afternuking the plugin settings
@@ -40,7 +41,6 @@ if( isset( $_REQUEST['pluginsave'] ) && !empty( $_REQUEST['pluginsave'] ) ) {
$gBitSystem->storeConfig( 'content_force_allow_html', !empty( $_REQUEST['content_force_allow_html'] ) ? $_REQUEST['content_force_allow_html'] : null, LIBERTY_PKG_NAME );
}
-
// Sort the plugins to avoild splitting tables
foreach( $gLibertySystem->mPlugins as $guid => $plugin ) {
// since plugins can be in other packages, they can't use package constants. here we re-interpret URLs
diff --git a/admin/plugins/data_code.php b/admin/plugins/data_code.php
index 0709945..8274a94 100755
--- a/admin/plugins/data_code.php
+++ b/admin/plugins/data_code.php
@@ -7,7 +7,7 @@ $gBitSystem->verifyPermission( 'p_admin' );
$feedback = [];
-$sources = array(
+$sources = [
'ASP' => 'ASP',
'ActionScript' => 'ActionScript',
'Ada' => 'Ada',
@@ -62,7 +62,7 @@ $sources = array(
'VisualFoxPro' => 'VisualFoxPro',
'XML' => 'XML',
'ini' => 'ini',
-);
+];
$gBitSmarty->assign( 'sources', $sources );
if( !empty( $_REQUEST['plugin_settings'] )) {
@@ -71,4 +71,4 @@ if( !empty( $_REQUEST['plugin_settings'] )) {
}
$gBitSmarty->assign( 'feedback', $feedback );
-$gBitSystem->display( 'bitpackage:liberty/plugins/data_code_admin.tpl', KernelTools::tra( 'Data Code Plugin Settings' ), array( 'display_mode' => 'admin' ));
+$gBitSystem->display( 'bitpackage:liberty/plugins/data_code_admin.tpl', KernelTools::tra( 'Data Code Plugin Settings' ), [ 'display_mode' => 'admin' ]);
diff --git a/admin/schema_inc.php b/admin/schema_inc.php
index 20e358a..bc56c89 100755
--- a/admin/schema_inc.php
+++ b/admin/schema_inc.php
@@ -238,8 +238,8 @@ foreach( array_keys( $tables ) AS $tableName ) {
// Constraints which must be installed after table creation
$constraints = [
- 'liberty_content_permissions' => array( 'liberty_content_perm_group_ref' => 'FOREIGN KEY (`group_id`) REFERENCES `' . BIT_DB_PREFIX . 'users_groups` (`group_id`)' ),
- 'liberty_process_queue' => array( 'liberty_process_queue_ref' => 'FOREIGN KEY (`content_id`) REFERENCES `' . BIT_DB_PREFIX . 'liberty_content`( `content_id` )' ),
+ 'liberty_content_permissions' => [ 'liberty_content_perm_group_ref' => 'FOREIGN KEY (`group_id`) REFERENCES `' . BIT_DB_PREFIX . 'users_groups` (`group_id`)' ],
+ 'liberty_process_queue' => [ 'liberty_process_queue_ref' => 'FOREIGN KEY (`content_id`) REFERENCES `' . BIT_DB_PREFIX . 'liberty_content`( `content_id` )' ],
];
@@ -272,9 +272,9 @@ $indices = [
];
if ( defined( 'ROLE_MODEL' ) ) {
- $constraints['liberty_content_permissions'] = array('liberty_content_perm_role_ref' => 'FOREIGN KEY (`role_id`) REFERENCES `'.BIT_DB_PREFIX.'users_roles` (`role_id`)');
+ $constraints['liberty_content_permissions'] = ['liberty_content_perm_role_ref' => 'FOREIGN KEY (`role_id`) REFERENCES `'.BIT_DB_PREFIX.'users_roles` (`role_id`)'];
unset($indices['liberty_content_perm_group_idx']);
- $indices['liberty_content_perm_role_idx'] = array( 'table' => 'liberty_content_permissions', 'cols' => 'role_id', 'opts' => null );
+ $indices['liberty_content_perm_role_idx'] = [ 'table' => 'liberty_content_permissions', 'cols' => 'role_id', 'opts' => null ];
}
foreach( array_keys($constraints) AS $tableName ) {
@@ -301,7 +301,7 @@ $sequences = [
$gBitInstaller->registerSchemaSequences( LIBERTY_PKG_NAME, $sequences );
// ### Default Preferences
-$gBitInstaller->registerPreferences( LIBERTY_PKG_NAME, array(
+$gBitInstaller->registerPreferences( LIBERTY_PKG_NAME, [
//array(LIBERTY_PKG_NAME, 'liberty_cache_images','n'),
//array(LIBERTY_PKG_NAME, 'liberty_cache_pages','n'),
[ LIBERTY_PKG_NAME, 'liberty_auto_display_attachment_thumbs', 'small' ],
@@ -312,7 +312,7 @@ $gBitInstaller->registerPreferences( LIBERTY_PKG_NAME, array(
// array(LIBERTY_PKG_NAME, 'liberty_attachment_style', 'standard'),
// The default for new installs is htmlpurifier old stays simple
[ LIBERTY_PKG_NAME, 'liberty_html_purifier', 'htmlpurifier' ],
-) );
+] );
$gBitInstaller->registerSchemaDefault( LIBERTY_PKG_NAME, [
"INSERT INTO `" . BIT_DB_PREFIX . "liberty_content_status` (`content_status_id`,`content_status_name`) VALUES (-999, 'Deleted')",
@@ -332,7 +332,6 @@ $gBitInstaller->registerSchemaDefault( LIBERTY_PKG_NAME, [
"UPDATE `" . BIT_DB_PREFIX . "liberty_content` SET `content_status_id`=50",
] );
-
// ### Default UserPermissions
$gBitInstaller->registerUserPermissions( LIBERTY_PKG_NAME, [
[ 'p_liberty_edit_html_style', 'Can include style information in HTML', 'editors', LIBERTY_PKG_NAME ],