summaryrefslogtreecommitdiff
path: root/attachments.php
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2026-03-26 17:38:36 +0000
committerlsces <lester@lsces.co.uk>2026-03-26 17:38:36 +0000
commit0bb2516c7143125e58e21295fd47b2064d31bb64 (patch)
tree87c91837fb135abcde08598d46c679c7801bac1d /attachments.php
parentca5bc9374b72dc41758b34a88591af3881269b97 (diff)
downloadliberty-0bb2516c7143125e58e21295fd47b2064d31bb64.tar.gz
liberty-0bb2516c7143125e58e21295fd47b2064d31bb64.tar.bz2
liberty-0bb2516c7143125e58e21295fd47b2064d31bb64.zip
Namespace changes
Diffstat (limited to 'attachments.php')
-rwxr-xr-xattachments.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/attachments.php b/attachments.php
index 248602f..945ad12 100755
--- a/attachments.php
+++ b/attachments.php
@@ -1,4 +1,5 @@
<?php
+
/**
* attachment_browser
*
@@ -11,12 +12,15 @@
/**
* bit setup
*/
+use Bitweaver\KernelTools;
+use Bitweaver\Liberty\LibertyMime;
+
require_once("../kernel/includes/setup_inc.php");
$gContent = new LibertyMime();
if( !$gBitUser->isRegistered() ) {
- $gBitSystem->fatalError( tra( 'You need to be logged in to view this page.' ));
+ $gBitSystem->fatalError( KernelTools::tra( 'You need to be logged in to view this page.' ));
}
$feedback = [];
@@ -25,10 +29,10 @@ if( $gBitUser->isAdmin() ) {
if( !empty( $listHash['login'] ) && $listHash['login'] == 'all' ) {
$listHash['user_id'] = null;
} elseif( !empty( $listHash['login'] ) ) {
- if( $userInfo = $gBitUser->getUserInfo( array( 'login' => $listHash['login'] ) ) ) {
+ if( $userInfo = $gBitUser->getUserInfo( [ 'login' => $listHash['login'] ] ) ) {
$listHash['user_id'] = $userInfo['user_id'];
} else {
- $feedback['error'] = tra( 'That user does not exist.' );
+ $feedback['error'] = KernelTools::tra( 'That user does not exist.' );
}
} else {
$listHash['user_id'] = $gBitUser->mUserId;
@@ -41,5 +45,4 @@ $attachments = $gContent->getAttachmentList( $listHash );
$gBitSmarty->assign( 'listInfo', $listHash['listInfo'] );
$gBitSmarty->assign( 'attachments', $attachments );
$gBitSmarty->assign( 'feedback', $feedback );
-$gBitSystem->display( 'bitpackage:liberty/attachments.tpl', tra( 'Attachments' ), array( 'display_mode' => 'display' ));
-?>
+$gBitSystem->display( 'bitpackage:liberty/attachments.tpl', KernelTools::tra( 'Attachments' ), [ 'display_mode' => 'display' ]);