From 6531be9e1c361e2565859531d78341cc1855dd12 Mon Sep 17 00:00:00 2001 From: Lester Caine Date: Thu, 14 May 2026 10:09:57 +0100 Subject: tidy config git exclusions and php-cs-fixer tidies to php8.5 standards Exclude config/css, fonts, iconsets, images, themes from tracking. Untrack config_inc.php (already in .gitignore but was previously tracked). Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 5 ++ config/kernel/auth_check.php | 34 ++++----- config/kernel/auth_config.php | 8 +- config/kernel/config_inc.php | 167 ------------------------------------------ 4 files changed, 26 insertions(+), 188 deletions(-) delete mode 100755 config/kernel/config_inc.php diff --git a/.gitignore b/.gitignore index 9bf6862..1df6630 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ vendor/* config/kernel/config_inc.php +config/css/ +config/fonts/ +config/iconsets/ +config/images/ +config/themes/ diff --git a/config/kernel/auth_check.php b/config/kernel/auth_check.php index d3c2586..18de119 100755 --- a/config/kernel/auth_check.php +++ b/config/kernel/auth_check.php @@ -3,7 +3,7 @@ include 'auth_config.php'; if( !empty( $_SESSION['user_role'] ) && $_SESSION['user_role'] > 0 ) { - http_response_code(200); + http_response_code(200); exit; } @@ -11,23 +11,23 @@ if( !empty( $_SESSION['user_role'] ) && $_SESSION['user_role'] > 0 ) { preg_match( '|/attachments/\d+/(\d+)/|', $_SERVER['REQUEST_URI'], $matches ); if( !empty( $matches[1] ) ) { - $contentId = (int)$matches[1]; - try { - $pdo = new PDO( $gBitDbHost, $gBitDbUser, $gBitDbPassword ); - $stmt = $pdo->prepare( - "SELECT COUNT(*) FROM LIBERTY_CONTENT_ROLE_MAP - WHERE content_id = ?" - ); - $stmt->execute( [$contentId] ); - if( $stmt->fetchColumn() == 0 ) { - http_response_code( 200 ); + $contentId = (int)$matches[1]; + try { + $pdo = new PDO( $gBitDbHost, $gBitDbUser, $gBitDbPassword ); + $stmt = $pdo->prepare( + "SELECT COUNT(*) FROM LIBERTY_CONTENT_ROLE_MAP + WHERE content_id = ?", + ); + $stmt->execute( [$contentId] ); + if( $stmt->fetchColumn() == 0 ) { + http_response_code( 200 ); } else { http_response_code( 403 ); } - } catch( PDOException $e ) { - // db failure - deny access safely - http_response_code( 403 ); - exit; - } - exit; + } catch( PDOException $e ) { + // db failure - deny access safely + http_response_code( 403 ); + exit; + } + exit; } \ No newline at end of file diff --git a/config/kernel/auth_config.php b/config/kernel/auth_config.php index 020e8d8..c7e9016 100755 --- a/config/kernel/auth_config.php +++ b/config/kernel/auth_config.php @@ -1,6 +1,6 @@ [ 'width' => 1024, 'height' => 1024 ], - 'large' => [ 'width' => 800, 'height' => 800 ], - 'medium' => [ 'width' => 400, 'height' => 400 ], - 'small' => [ 'width' => 160, 'height' => 160 ], - 'avatar' => [ 'width' => 100, 'height' => 100 ], - 'icon' => [ 'width' => 48, 'height' => 48 ], -]; - -define( 'LIBERTY_DEFAULT_MIME_HANDLER', 'mimeflatdefault' ); - - - /******************************************************\ - *************** Debugging Options **************** - \******************************************************/ - -// If you wish to force compiling of every page, you can set the next setting to -// TRUE. this will, however, severly impact performance since every page that is -// generated is generated afresh and the cache is recreated every time. -$smarty_force_compile = FALSE; - - -// Setting TEMPLATE_DEBUG = TRUE will output in your -// templates, which will allow you to track all used templates in the HTML source -// of the page. This will also disable stripping of whitespace making it easier to -// read the templates. You will only see the effect of the strip changes by -// clearing out your cache or setting $smarty_force_compile = TRUE; -// Note: be sure to set this to FALSE and clear out the cache once done since it -// will increase the page size by at least 10%. -//define( 'TEMPLATE_DEBUG', TRUE ); - -// If you want to go a step further with template debugging then this enables -// smarty's debugging console. A popup with a dump of all of the vars the -// template(s) have been passed. -$smarty_debugging = FALSE; - - -// This statement will enable you to view all database queries made -//$gDebug = TRUE; - - -// This will turn on ADODB performance monitoring and log all queries. This should -// not be enabled except when doing query analysis due to an overall performance -// drop. see kernel/admin/db_performance.php for statistics -//define( 'DB_PERFORMANCE_STATS', TRUE ); -- cgit v1.3