diff options
| author | lsces <lester@lsces.co.uk> | 2025-08-29 13:03:49 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2025-08-29 13:03:49 +0100 |
| commit | 144b7ea64606dd1875b10ce87693250f84bea3f7 (patch) | |
| tree | dc05003a3f39d5c8641fcd9a9de3569c6eaeff1a /page_watches.php | |
| parent | 7fefadbccfeb0e9effe1342adb7a5d52755d401c (diff) | |
| download | wiki-144b7ea64606dd1875b10ce87693250f84bea3f7.tar.gz wiki-144b7ea64606dd1875b10ce87693250f84bea3f7.tar.bz2 wiki-144b7ea64606dd1875b10ce87693250f84bea3f7.zip | |
General code updated to PHP8.4 and namespace
Diffstat (limited to 'page_watches.php')
| -rwxr-xr-x[-rw-r--r--] | page_watches.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/page_watches.php b/page_watches.php index 791f78f..db00931 100644..100755 --- a/page_watches.php +++ b/page_watches.php @@ -13,15 +13,16 @@ /** * required setup */ -require_once( '../kernel/includes/setup_inc.php' ); -include_once( WIKI_PKG_CLASS_PATH.'BitPage.php'); +require_once '../kernel/includes/setup_inc.php'; +use Bitweaver\KernelTools; +use Bitweaver\Liberty\LibertyComment; $gBitSystem->verifyPackage( 'wiki' ); $gBitSystem->verifyFeature( 'users_watches' ); -$gBitSystem->verifyPermission( 'p_admin_users', tra( "Permission denied you cannot browse these page watches" ) ); +$gBitSystem->verifyPermission( 'p_admin_users', KernelTools::tra( "Permission denied you cannot browse these page watches" ) ); // Get the page from the request var or default it to HomePage -include( WIKI_PKG_INCLUDE_PATH.'lookup_page_inc.php' ); +include WIKI_PKG_INCLUDE_PATH.'lookup_page_inc.php'; // make comment count for this page available for templates $gComment = new LibertyComment(); @@ -32,19 +33,17 @@ $gBitSmarty->assign('comments_count', $numComments); //vd($gContent->mPageId);vd($gContent->mInfo); if( !$gContent->isValid() || empty( $gContent->mInfo ) ) { - $gBitSystem->fatalError( tra( "Unknown page" )); + $gBitSystem->fatalError( KernelTools::tra( "Unknown page" )); } -$watches = NULL; +$watches = null; if( !empty( $gContent->mPageId ) ) { $event = 'wiki_page_changed'; $watches = $gBitUser->get_event_watches($event, $gContent->mPageId); - $gBitSmarty->assignByRef('watches', $watches); - $gBitSmarty->assignByRef( 'pageInfo', $gContent->mInfo ); + $gBitSmarty->assign('watches', $watches); + $gBitSmarty->assign( 'pageInfo', $gContent->mInfo ); } // Display the template -$gBitSystem->display( 'bitpackage:wiki/page_watches.tpl', NULL, array( 'display_mode' => 'display' )); - -?> +$gBitSystem->display( 'bitpackage:wiki/page_watches.tpl', null, [ 'display_mode' => 'display' ] ); |
