summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2025-08-27 17:01:22 +0100
committerlsces <lester@lsces.co.uk>2025-08-27 17:01:22 +0100
commitcd65f3b9afa75bc70c95a08949c965bde43d98fd (patch)
tree8ff77a7e18fefce950db7bc36bc4671295722f83 /modules
parent0ae6ef9faac97b5cdc316d7d701adc05ce651002 (diff)
downloadfeed-cd65f3b9afa75bc70c95a08949c965bde43d98fd.tar.gz
feed-cd65f3b9afa75bc70c95a08949c965bde43d98fd.tar.bz2
feed-cd65f3b9afa75bc70c95a08949c965bde43d98fd.zip
updated to PHP8.4 and namespace
Diffstat (limited to 'modules')
-rwxr-xr-x[-rw-r--r--]modules/mod_feed.php15
-rwxr-xr-x[-rw-r--r--]modules/mod_status.php20
-rw-r--r--modules/mod_status.tpl2
3 files changed, 15 insertions, 22 deletions
diff --git a/modules/mod_feed.php b/modules/mod_feed.php
index 7c7584c..e515835 100644..100755
--- a/modules/mod_feed.php
+++ b/modules/mod_feed.php
@@ -12,26 +12,23 @@
/**
* global defs
*/
+namespace Bitweaver\Feed;
+
global $gQueryUser,$gBitSmarty;
-require_once( FEED_PKG_INCLUDE_PATH.'feed_lib.php' );
+require_once FEED_PKG_INCLUDE_PATH . 'feed_lib.php';
if( !empty($gQueryUser) ){
if( !empty( $moduleParams['module_params']['no_link_user'] ) ) {
- $listHash['no_link_user'] = TRUE;
+ $listHash['no_link_user'] = true;
}
if( !empty( $moduleParams['module_rows'] ) ) {
$listHash['max_records'] = $moduleParams['module_rows'];
}
- if( !empty( $moduleParams['module_params']['user_id'] ) ){
- $listHash['user_id'] = $moduleParams['module_params']['user_id'];
- }else{
- $listHash['user_id'] = $gQueryUser->mUserId;
- }
+ $listHash['user_id'] = ( !empty( $moduleParams['module_params']['user_id'] ) ) ? $moduleParams['module_params']['user_id'] : $gQueryUser->mUserId;
$actions = feed_get_actions( $listHash );
- $_template->tpl_vars['actions'] = new Smarty_variable( $actions);
+ $gBitSmarty->assign( 'actions', $actions);
}
-?>
diff --git a/modules/mod_status.php b/modules/mod_status.php
index ceb2785..192617e 100644..100755
--- a/modules/mod_status.php
+++ b/modules/mod_status.php
@@ -12,9 +12,12 @@
/**
* global defs
*/
+namespace Bitweaver\Feed;
+use Bitweaver\Liberty\LibertyComment;
+
global $gQueryUser,$gBitSmarty;
-require_once( FEED_PKG_INCLUDE_PATH.'feed_lib.php' );
+require_once FEED_PKG_INCLUDE_PATH . 'feed_lib.php';
if( !empty( $_REQUEST['feed_status'] ) ){
@@ -23,7 +26,7 @@ if( !empty( $_REQUEST['feed_status'] ) ){
}
if( !empty( $moduleParams['module_params']['no_link_user'] ) ) {
- $listHash['no_link_user'] = TRUE;
+ $listHash['no_link_user'] = true;
}
if( !empty( $moduleParams['module_rows'] ) ) {
$listHash['max_records'] = $moduleParams['module_rows'];
@@ -31,14 +34,10 @@ if( !empty( $moduleParams['module_rows'] ) ) {
$listHash['max_records'] = $moduleParams['module_params']['max_records'];
}
-if( !empty( $moduleParams['module_params']['user_id'] ) ){
- $listHash['user_id'] = $moduleParams['module_params']['user_id'];
-}else{
- $listHash['user_id'] = $gQueryUser->mUserId;
-}
+$listHash['user_id'] = ( !empty( $moduleParams['module_params']['user_id'] ) ) ? $moduleParams['module_params']['user_id'] : $gQueryUser->mUserId;
$statuses = feed_get_status( $listHash );
-$_template->tpl_vars['statuses'] = new Smarty_variable( $statuses);
+$gBitSmarty->assign( 'statuses', $statuses);
foreach ($statuses as $status){
@@ -57,10 +56,7 @@ foreach ($statuses as $status){
$statuses = feed_get_status( $listHash );
- $_template->tpl_vars['statuses'] = new Smarty_variable( $statuses);
+ $gBitSmarty->assign( 'statuses', $statuses);
break;
}
}
-
-?>
-
diff --git a/modules/mod_status.tpl b/modules/mod_status.tpl
index 3e1afc4..e8a8940 100644
--- a/modules/mod_status.tpl
+++ b/modules/mod_status.tpl
@@ -1,5 +1,5 @@
{literal}
-<script type="text/javascript">
+<script>
function showHideReplies( contentId , total , feedback ){