summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2026-03-09 20:26:26 +0000
committerlsces <lester@lsces.co.uk>2026-03-09 20:26:26 +0000
commitfe6238f66809ae75f896d4f04f19d82cf542dbac (patch)
treecc75f9f15ce75b3c45ce8267fab6098c126e5f9d
parent768948b85f948653d0882da2698f1bdde59a0e4d (diff)
downloadrss-fe6238f66809ae75f896d4f04f19d82cf542dbac.tar.gz
rss-fe6238f66809ae75f896d4f04f19d82cf542dbac.tar.bz2
rss-fe6238f66809ae75f896d4f04f19d82cf542dbac.zip
Smarty5 asignByRef missed, code still needs PHP8.4 advisories addressed
-rw-r--r--admin/admin_rssmodules.php36
1 files changed, 11 insertions, 25 deletions
diff --git a/admin/admin_rssmodules.php b/admin/admin_rssmodules.php
index 749d2d3..6e5819d 100644
--- a/admin/admin_rssmodules.php
+++ b/admin/admin_rssmodules.php
@@ -35,7 +35,7 @@ if( isset( $_REQUEST["view"] ) ) {
$feed->handle_content_type();
$items = $feed->get_items();
- $gBitSmarty->assignByRef( 'items', $items );
+ $gBitSmarty->assign( 'items', $items );
}
if( $_REQUEST["rss_id"] ) {
@@ -96,36 +96,24 @@ if (isset($_REQUEST["save"])) {
$gBitSmarty->assign('show_pub_date', 'n');
}
-if ( empty( $_REQUEST["sort_mode"] ) ) {
- $sort_mode = 'name_desc';
-} else {
- $sort_mode = $_REQUEST["sort_mode"];
-}
+$sort_mode = ( empty( $_REQUEST["sort_mode"] ) ) ? 'name_desc' : $_REQUEST["sort_mode"];
-if (!isset($_REQUEST["offset"])) {
- $offset = 0;
-} else {
- $offset = $_REQUEST["offset"];
-}
-if (isset($_REQUEST['page'])) {
+$offset = ( !isset( $_REQUEST["offset"] ) ) ? 0 : $_REQUEST["offset"];
+if (isset( $_REQUEST['page'] )) {
$page = &$_REQUEST['page'];
- $offset = ($page - 1) * $max_records;
+ $offset = ( $page - 1 ) * $max_records;
}
-$gBitSmarty->assignByRef('offset', $offset);
+$gBitSmarty->assign( 'offset', $offset );
-if (isset($_REQUEST["find"])) {
- $find = $_REQUEST["find"];
-} else {
- $find = '';
-}
+$find = ( isset( $_REQUEST["find"] ) ) ? $_REQUEST["find"] : '';
-$gBitSmarty->assign('find', $find);
+$gBitSmarty->assign( 'find', $find );
-$gBitSmarty->assignByRef('sort_mode', $sort_mode);
+$gBitSmarty->assign('sort_mode', $sort_mode);
$channels = $rsslib->list_rss_modules($offset, $max_records, $sort_mode, $find);
$cant_pages = ceil($channels["cant"] / $max_records);
-$gBitSmarty->assignByRef('cant_pages', $cant_pages);
+$gBitSmarty->assign('cant_pages', $cant_pages);
$gBitSmarty->assign('actual_page', 1 + ($offset / $max_records));
if ($channels["cant"] > ($offset + $max_records)) {
@@ -141,11 +129,9 @@ if ($offset > 0) {
$gBitSmarty->assign('prev_offset', -1);
}
-$gBitSmarty->assignByRef('channels', $channels["data"]);
+$gBitSmarty->assign('channels', $channels["data"]);
// Display the template
$gBitSystem->display( 'bitpackage:rss/admin_rssmodules.tpl', NULL, array( 'display_mode' => 'admin' ));
-?>
-