summaryrefslogtreecommitdiff
path: root/admin
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2025-08-27 17:18:02 +0100
committerlsces <lester@lsces.co.uk>2025-08-27 17:18:02 +0100
commit768948b85f948653d0882da2698f1bdde59a0e4d (patch)
tree3b9530af0c345b90e522c059ffc0544faeffe9e6 /admin
parentfff657e9b266f0641fa53c2aff86eb8c836c13ef (diff)
downloadrss-768948b85f948653d0882da2698f1bdde59a0e4d.tar.gz
rss-768948b85f948653d0882da2698f1bdde59a0e4d.tar.bz2
rss-768948b85f948653d0882da2698f1bdde59a0e4d.zip
Code updated to PHP8.4 and namespace
Diffstat (limited to 'admin')
-rw-r--r--admin/admin_rss_inc.php83
1 files changed, 42 insertions, 41 deletions
diff --git a/admin/admin_rss_inc.php b/admin/admin_rss_inc.php
index 79ba37d..f3eb8b1 100644
--- a/admin/admin_rss_inc.php
+++ b/admin/admin_rss_inc.php
@@ -1,5 +1,7 @@
<?php
+use Bitweaver\KernelTools;
+
// $Header$
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
@@ -8,64 +10,64 @@
foreach( $gBitSystem->mPackages as $pkg => $pkgInfo ) {
if( is_file( $pkgInfo['path'].$pkg.'_rss.php' ) ) {
- $formRSSFeeds[$pkg.'_rss'] = array(
+ $formRSSFeeds["{$pkg}_rss"] = [
'label' => $pkg,
- );
+ ];
}
}
$gBitSmarty->assign( "formRSSFeeds", $formRSSFeeds );
-$formRSSSettings = array(
- 'rssfeed_language' => array(
+$formRSSSettings = [
+ 'rssfeed_language' => [
'label' => 'Language',
- ),
- 'rssfeed_creator' => array(
+ ],
+ 'rssfeed_creator' => [
'label' => 'Creator',
- ),
- 'rssfeed_editor' => array(
+ ],
+ 'rssfeed_editor' => [
'label' => 'Editor',
- 'note' => 'Email address for person responsible for editorial content. For RDF 2.0',
- ),
- 'rssfeed_webmaster' => array(
+ 'note' => 'Email address for person responsible for editorial content. For RDF 2.0',
+ ],
+ 'rssfeed_webmaster' => [
'label' => 'Webmaster',
- 'note' => 'Email address for person responsible for technical issues relating to channel. For RDF 2.0',
- ),
- 'rssfeed_image_url' => array(
+ 'note' => 'Email address for person responsible for technical issues relating to channel. For RDF 2.0',
+ ],
+ 'rssfeed_image_url' => [
'label' => 'Image URL',
- 'note' => 'Enter the full URL to an image that you want to associate with your RSS channels',
- ),
- 'rssfeed_css_url' => array(
+ 'note' => 'Enter the full URL to an image that you want to associate with your RSS channels',
+ ],
+ 'rssfeed_css_url' => [
'label' => 'CSS File URL',
- 'note' => 'Enter the full URL to a CSS file you want to use to style your RSS Feeds.',
- ),
- 'rssfeed_truncate' => array(
+ 'note' => 'Enter the full URL to a CSS file you want to use to style your RSS Feeds.',
+ ],
+ 'rssfeed_truncate' => [
'label' => 'Truncate RSS feed',
- 'note' => 'Enter the number of characters you want to feed per item in the rss feeds. Default is 5000 characters.',
- ),
-);
+ 'note' => 'Enter the number of characters you want to feed per item in the rss feeds. Default is 5000 characters.',
+ ],
+];
$gBitSmarty->assign( "formRSSSettings", $formRSSSettings );
-$formRSSOptions = array(
- 'rssfeed_httpauth' => array(
+$formRSSOptions = [
+ 'rssfeed_httpauth' => [
'label' => 'Enable HTTP Authentication',
- 'note' => 'Use HTTP Authentication with SSL to enable Registered Users to gain access to Private Content Feeds.',
- ),
-);
+ 'note' => 'Use HTTP Authentication with SSL to enable Registered Users to gain access to Private Content Feeds.',
+ ],
+];
$gBitSmarty->assign( "formRSSOptions", $formRSSOptions );
-$cacheTimes = array(
- 0 => tra( "(no cache)" ),
- 60 => "1 ".tra( "minute" ),
- 300 => "5 ".tra( "minutes" ),
- 600 => "10 ".tra( "minutes" ),
- 1800 => "30 ".tra( "minutes" ),
- 3600 => "1 ".tra( "hour" ),
- 7200 => "2 ".tra( "hours" ),
- 14400 => "4 ".tra( "hours" ),
-);
+$cacheTimes = [
+ 0 => KernelTools::tra( "(no cache)" ),
+ 60 => "1 " . KernelTools::tra( "minute" ),
+ 300 => "5 " . KernelTools::tra( "minutes" ),
+ 600 => "10 " . KernelTools::tra( "minutes" ),
+ 1800 => "30 " . KernelTools::tra( "minutes" ),
+ 3600 => "1 " . KernelTools::tra( "hour" ),
+ 7200 => "2 " . KernelTools::tra( "hours" ),
+ 14400 => "4 " . KernelTools::tra( "hours" ),
+];
$gBitSmarty->assign( "cacheTimes", $cacheTimes );
-$feedTypes = array(
+$feedTypes = [
0 => "RSS 0.91",
1 => "RSS 1.0",
2 => "RSS 2.0",
@@ -76,7 +78,7 @@ $feedTypes = array(
7 => "OPML",
8 => "HTML",
9 => "JS",
-);
+];
$gBitSmarty->assign( "feedTypes", $feedTypes );
if( !empty( $_REQUEST['feed_settings'] ) ) {
@@ -100,4 +102,3 @@ if( !empty( $_REQUEST['feed_settings'] ) ) {
simple_set_toggle( $item, RSS_PKG_NAME );
}
}
-?>