diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-14 09:42:36 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-14 09:42:36 +0100 |
| commit | c9b2d19672559b7c7319d15caf7d5cfbe7b192c6 (patch) | |
| tree | 89d0ab47a203c8f0f06ffd7af38c9a6f98f79056 /modules | |
| parent | 9bc2edd591213b7fd535c36b7957a43246341b7f (diff) | |
| download | blogs-c9b2d19672559b7c7319d15caf7d5cfbe7b192c6.tar.gz blogs-c9b2d19672559b7c7319d15caf7d5cfbe7b192c6.tar.bz2 blogs-c9b2d19672559b7c7319d15caf7d5cfbe7b192c6.zip | |
php-cs-fixer tidies to php8.5 standards
Diffstat (limited to 'modules')
| -rwxr-xr-x | modules/index.php | 2 | ||||
| -rwxr-xr-x | modules/lastblogposts/mod_last_blog_posts.php | 7 | ||||
| -rwxr-xr-x | modules/mod_blog_roll.php | 2 | ||||
| -rwxr-xr-x | modules/mod_last_blog_posts.php | 7 |
4 files changed, 8 insertions, 10 deletions
diff --git a/modules/index.php b/modules/index.php index 3e305fe..c0437d0 100755 --- a/modules/index.php +++ b/modules/index.php @@ -1,4 +1,4 @@ -<?php +<?php // This is not a package. header ("location: ../index.php"); diff --git a/modules/lastblogposts/mod_last_blog_posts.php b/modules/lastblogposts/mod_last_blog_posts.php index d53652e..b371319 100755 --- a/modules/lastblogposts/mod_last_blog_posts.php +++ b/modules/lastblogposts/mod_last_blog_posts.php @@ -19,7 +19,7 @@ if( !empty($module_params['date_start_offset']) ){ $date_start = time() - ( $module_params['date_start_offset'] * 3600 ); } -$defaultsHash = array( +$defaultsHash = [ 'sort_mode' => ( !empty( $module_params['sort_mode'] ) ? $module_params['sort_mode'] : 'publish_date_desc' ), 'max_records' => $module_rows, 'parse_data' => true, @@ -29,7 +29,7 @@ $defaultsHash = array( 'role_id' => ( BitBase::verifyId( $module_params['role_id'] ) ? $module_params['role_id'] : null ), 'date_start' => $date_start, 'offset' => ( !empty( $module_params['offset'] ) ? $module_params['offset'] : 0 ), -); +]; $listHash = array_merge($module_params, $defaultsHash); @@ -46,7 +46,7 @@ $listHash['enforce_status'] = true; if ( !empty( $module_params['status'] ) && $module_params['status'] = "draft" && isset( $gBitUser->mUserId ) ){ // if we are getting drafts then get future posts too - $listHash['show_future'] = true; + $listHash['show_future'] = true; $listHash['min_status_id'] = -6; $listHash['max_status_id'] = -4; $listHash['min_owner_status_id'] = -6; @@ -56,7 +56,6 @@ if ( !empty( $module_params['status'] ) && $module_params['status'] = "draft" && $listHash['min_owner_status_id'] = 0; } - $blogPost = new BitBlogPost(); $blogPosts = $blogPost->getList( $listHash ); diff --git a/modules/mod_blog_roll.php b/modules/mod_blog_roll.php index c66bca2..8bf91c0 100755 --- a/modules/mod_blog_roll.php +++ b/modules/mod_blog_roll.php @@ -20,7 +20,7 @@ RoleUser::userCollection( $moduleParams->value['module_params'] ?? null, $listHa $blog = new BitBlog(); if( $modBlogs = $blog->getList( $listHash ) ) { foreach( array_keys( $modBlogs ) as $b ) { - $modBlogs[$b]['post'] = $blog->getPost( [ 'blog_id' => $modBlogs[$b]['blog_id'] ] ); + $modBlogs[$b]['post'] = $blog->getPost( [ 'blog_id' => $modBlogs[$b]['blog_id'] ] ); } $gBitSmarty->assign( 'modBlogs', $modBlogs ); } diff --git a/modules/mod_last_blog_posts.php b/modules/mod_last_blog_posts.php index cb083a2..50def16 100755 --- a/modules/mod_last_blog_posts.php +++ b/modules/mod_last_blog_posts.php @@ -19,7 +19,7 @@ if( !empty($module_params['date_start_offset']) ){ $date_start = time() - ( $module_params['date_start_offset'] * 3600 ); } -$defaultsHash = array( +$defaultsHash = [ 'sort_mode' => ( !empty( $module_params['sort_mode'] ) ? $module_params['sort_mode'] : 'publish_date_desc' ), 'max_records' => $module_rows, 'parse_data' => true, @@ -29,7 +29,7 @@ $defaultsHash = array( 'group_id' => ( BitBase::verifyId( $module_params['group_id'] ) ? $module_params['group_id'] : null ), 'date_start' => $date_start, 'offset' => ( !empty( $module_params['offset'] ) ? $module_params['offset'] : 0 ), -); +]; $listHash = array_merge($module_params, $defaultsHash); @@ -46,7 +46,7 @@ $listHash['enforce_status'] = true; if ( !empty( $module_params['status'] ) && $module_params['status'] = "draft" && isset( $gBitUser->mUserId ) ){ // if we are getting drafts then get future posts too - $listHash['show_future'] = true; + $listHash['show_future'] = true; $listHash['min_status_id'] = -6; $listHash['max_status_id'] = -4; $listHash['min_owner_status_id'] = -6; @@ -56,7 +56,6 @@ if ( !empty( $module_params['status'] ) && $module_params['status'] = "draft" && $listHash['min_owner_status_id'] = 0; } - $blogPost = new BitBlogPost(); $blogPosts = $blogPost->getList( $listHash ); $descriptionLength = ( !empty( $module_params['max_preview_length'] ) ? $module_params['max_preview_length'] : 500 ); |
