From c4234724ab1513ec43f253a8e03d5488bdc75746 Mon Sep 17 00:00:00 2001 From: lsces Date: Wed, 25 Mar 2026 10:17:59 +0000 Subject: PHP8.4 style tidies --- admin/index.php | 2 -- admin/schema_inc.php | 16 ++++++++-------- index.php | 9 +++++---- liberty_plugins/data.rss.php | 1 + rss_error.php | 10 ++++++---- templates/index.php | 2 -- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/admin/index.php b/admin/index.php index 3e305fe..1e6de35 100644 --- a/admin/index.php +++ b/admin/index.php @@ -2,5 +2,3 @@ // This is not a package. header ("location: ../index.php"); - -?> \ No newline at end of file diff --git a/admin/schema_inc.php b/admin/schema_inc.php index ef73154..94e6b0d 100644 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -1,7 +1,8 @@ " rss_id I4 AUTO PRIMARY, name C(30) NOTNULL, @@ -14,14 +15,14 @@ $tables = array( content X ", - 'rss_feeds' => " + 'rss_feeds' => " name C(30) NOTNULL, rss_ver C(1) NOTNULL DEFAULT '1', refresh I4 DEFAULT '300', last_updated I8, rss_cache B - " -); + ", +]; foreach( array_keys( $tables ) AS $tableName ) { $gBitInstaller->registerSchemaTable( RSS_PKG_NAME, $tableName, $tables[$tableName] ); @@ -33,7 +34,6 @@ $gBitInstaller->registerPackageInfo( RSS_PKG_NAME, array( ) ); // ### Default Preferences -$gBitInstaller->registerPreferences( RSS_PKG_NAME, array( - array( RSS_PKG_NAME, 'rssfeed_cache_time', 3600 ), -)); -?> +$gBitInstaller->registerPreferences( RSS_PKG_NAME, [ + [ RSS_PKG_NAME, 'rssfeed_cache_time', 3600 ], +]); \ No newline at end of file diff --git a/index.php b/index.php index a01fb5c..3c76623 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,6 @@ mPackages as $pkg => $pkgInfo ) { if ( empty($pkgs) ) { $pkgs['none'] = 'No Feeds Enabled'; } $gBitSmarty->assign( "pkgs", $pkgs ); -$feedFormat = array( +$feedFormat = [ 0 => "RSS 0.91", 1 => "RSS 1.0", 2 => "RSS 2.0", @@ -40,7 +42,7 @@ $feedFormat = array( 7 => "OPML", 8 => "HTML", 9 => "JS", -); +]; $gBitSmarty->assign( "feedFormat", $feedFormat ); if( !empty( $_REQUEST['get_feed'] ) ) { @@ -54,5 +56,4 @@ if( !empty( $_REQUEST['get_feed'] ) ) { } $gBitSmarty->assign( 'feedlink', $feedlink ); -$gBitSystem->display( 'bitpackage:rss/rss.tpl', tra( 'Select Feed' ) , array( 'display_mode' => 'display' )); -?> +$gBitSystem->display( 'bitpackage:rss/rss.tpl', KernelTools::tra( 'Select Feed' ) , [ 'display_mode' => 'display' ]); diff --git a/liberty_plugins/data.rss.php b/liberty_plugins/data.rss.php index ec900cf..4c8bdd7 100755 --- a/liberty_plugins/data.rss.php +++ b/liberty_plugins/data.rss.php @@ -3,6 +3,7 @@ namespace Bitweaver\Liberty; use Bitweaver\KernelTools; use Bitweaver\Rss\RSSLib; +use function count; /** * @version $Revision$ diff --git a/rss_error.php b/rss_error.php index 18a2387..f66f220 100644 --- a/rss_error.php +++ b/rss_error.php @@ -1,4 +1,7 @@ title = tra( 'Syndication Problem' ); +$item->title = KernelTools::tra( 'Syndication Problem' ); $item->link = 'http://'.$_SERVER['HTTP_HOST'].BIT_ROOT_URL; -$item->description = !empty( $message ) ? $message : tra( "You don't have permission to view this syndication feed." ); +$item->description = !empty( $message ) ? $message : KernelTools::tra( "You don't have permission to view this syndication feed." ); $item->source = 'http://'.$_SERVER['HTTP_HOST'].BIT_ROOT_URL; $item->author = $gBitUser->getPreference( 'site_title' ); @@ -25,5 +28,4 @@ $rss->addItem( $item ); // display the error msg echo $rss->saveFeed( $rss_version_name, TEMP_PKG_PATH.'rss/error.xml' ); -die; -?> +die; \ No newline at end of file diff --git a/templates/index.php b/templates/index.php index 3e305fe..1e6de35 100644 --- a/templates/index.php +++ b/templates/index.php @@ -2,5 +2,3 @@ // This is not a package. header ("location: ../index.php"); - -?> \ No newline at end of file -- cgit v1.3