diff options
| author | lsces <lester@lsces.co.uk> | 2025-08-29 13:22:36 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2025-08-29 13:22:36 +0100 |
| commit | c663ffd212f6055884fdb60a3b08e50c920a5e1a (patch) | |
| tree | 77258196dd7446ffe27a5080083a854c78d02a23 /modules | |
| parent | 976d6bbd1f9c7b1431688c17eabe954a5d58f621 (diff) | |
| download | users-c663ffd212f6055884fdb60a3b08e50c920a5e1a.tar.gz users-c663ffd212f6055884fdb60a3b08e50c920a5e1a.tar.bz2 users-c663ffd212f6055884fdb60a3b08e50c920a5e1a.zip | |
Modules tools updated to PHP8.4 and namespace
Diffstat (limited to 'modules')
| -rwxr-xr-x[-rw-r--r--] | modules/mod_online_users.php | 4 | ||||
| -rwxr-xr-x[-rw-r--r--] | modules/mod_since_last_visit.php | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | modules/mod_user_pages.php | 14 | ||||
| -rwxr-xr-x[-rw-r--r--] | modules/mod_user_profile.php | 4 | ||||
| -rwxr-xr-x[-rw-r--r--] | modules/mod_who_is_there.php | 6 |
5 files changed, 15 insertions, 15 deletions
diff --git a/modules/mod_online_users.php b/modules/mod_online_users.php index d041163..076a036 100644..100755 --- a/modules/mod_online_users.php +++ b/modules/mod_online_users.php @@ -16,6 +16,6 @@ $listHash['online' ] = true; $listHash['last_get'] = !empty( $module_params['time_buffer'] ) ? $module_params['time_buffer'] : 900; $online_users = $gBitUser->getUserActivity( $listHash ); -$_template->tpl_vars['online_users'] = new Smarty_variable( $online_users); -$_template->tpl_vars['logged_users'] = new Smarty_variable( count( $online_users ) ); +$gBitSmarty->assign( 'online_users', $online_users); +$gBitSmarty->assign( 'logged_users', count( $online_users ) ); ?> diff --git a/modules/mod_since_last_visit.php b/modules/mod_since_last_visit.php index d6c0f53..dce063b 100644..100755 --- a/modules/mod_since_last_visit.php +++ b/modules/mod_since_last_visit.php @@ -14,7 +14,7 @@ */ if( $gBitSystem->isPackageActive( 'bitforums' ) ) { $nvi_info = $gBitSystem->get_news_from_last_visit($user); - $_template->tpl_vars['nvi_info'] = new Smarty_variable( $nvi_info); + $gBitSmarty->assign( 'nvi_info', $nvi_info); } ?> diff --git a/modules/mod_user_pages.php b/modules/mod_user_pages.php index b1a7f25..9ac19cb 100644..100755 --- a/modules/mod_user_pages.php +++ b/modules/mod_user_pages.php @@ -19,27 +19,27 @@ if( !empty( $gQueryUser->mUserId ) ) { if( empty( $module_title ) ) { if( !empty( $module_params['content_type_guid'] ) && !empty( $gLibertySystem->mContentTypes[$module_params['content_type_guid']] ) ) { - $title = tra( "Last Changes" ).': '.$gLibertySystem->getContentTypeName( $module_params['content_type_guid'], TRUE ); - $_template->tpl_vars['contentType'] = new Smarty_variable( $module_params['content_type_guid'] ); + $title = tra( "Last Changes" ).': '.$gLibertySystem->getContentTypeName( $module_params['content_type_guid'], true ); + $gBitSmarty->assign( 'contentType', $module_params['content_type_guid'] ); } else { - $_template->tpl_vars['contentType'] = new Smarty_variable( FALSE ); + $gBitSmarty->assign( 'contentType', false ); $title = tra( "Last Changes" ); } - $_template->tpl_vars['moduleTitle'] = new Smarty_variable( $title ); + $gBitSmarty->assign( 'moduleTitle', $title ); } if( !empty( $module_params['show_date'] ) ) { - $_template->tpl_vars['userShowDate'] = new Smarty_variable( TRUE ); + $gBitSmarty->assign( 'userShowDate', true ); } $listHash = array( - 'content_type_guid' => !empty( $module_params['content_type_guid'] ) ? $module_params['content_type_guid'] : NULL, + 'content_type_guid' => !empty( $module_params['content_type_guid'] ) ? $module_params['content_type_guid'] : null, 'offset' => 0, 'max_records' => $module_rows, 'sort_mode' => 'last_modified_desc', 'user_id' => $userId, ); $modLastPages = $gBitUser->getContentList( $listHash ); -$_template->tpl_vars['modLastPages'] = new Smarty_variable( $modLastPages ); +$gBitSmarty->assign( 'modLastPages', $modLastPages ); ?> diff --git a/modules/mod_user_profile.php b/modules/mod_user_profile.php index 4b92773..5dfafde 100644..100755 --- a/modules/mod_user_profile.php +++ b/modules/mod_user_profile.php @@ -34,6 +34,6 @@ if( !empty( $module_params['user_id'] )) { $userPrefs = &$gBitUser->mPrefs; } -$_template->tpl_vars['userInfo'] = new Smarty_variable( $userInfo ); -$_template->tpl_vars['userPrefs'] = new Smarty_variable( $userPrefs ); +$gBitSmarty->assign( 'userInfo', $userInfo ); +$gBitSmarty->assign( 'userPrefs', $userPrefs ); ?> diff --git a/modules/mod_who_is_there.php b/modules/mod_who_is_there.php index dbfb031..d1b495e 100644..100755 --- a/modules/mod_who_is_there.php +++ b/modules/mod_who_is_there.php @@ -12,7 +12,7 @@ * @package users * @subpackage modules */ -$listHash['online'] = TRUE; -$_template->tpl_vars['online_users'] = new Smarty_variable( $gBitUser->getUserActivity( $listHash ) ); -$_template->tpl_vars['logged_users'] = new Smarty_variable( $gBitUser->countSessions( TRUE ) ); +$listHash['online'] = true; +$gBitSmarty->assign( 'online_users', $gBitUser->getUserActivity( $listHash ) ); +$gBitSmarty->assign( 'logged_users', $gBitUser->countSessions( true ) ); ?> |
