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_history.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_history.php')
| -rwxr-xr-x[-rw-r--r--] | page_history.php | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/page_history.php b/page_history.php index 86f18fe..add60d5 100644..100755 --- a/page_history.php +++ b/page_history.php @@ -13,24 +13,25 @@ /** * required setup */ -require_once( '../kernel/includes/setup_inc.php' ); -require_once( WIKI_PKG_CLASS_PATH.'BitPage.php'); +require_once '../kernel/includes/setup_inc.php'; +use Bitweaver\Wiki\BitPage; +use Bitweaver\KernelTools; $gBitSystem->verifyPackage( 'wiki' ); $gBitSystem->verifyFeature( 'wiki_history' ); // 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'; //vd($gContent->mPageId);vd($gContent->mInfo); if( !$gContent->isValid() || empty( $gContent->mInfo ) ) { - $gBitSystem->fatalError( tra( "Unknown page" )); + $gBitSystem->fatalError( KernelTools::tra( "Unknown page" )); } $gContent->verifyViewPermission(); $gContent->verifyUserPermission( 'p_wiki_view_history' ); -$gBitSmarty->assignByRef( 'pageInfo', $gContent->mInfo ); +$gBitSmarty->assign( 'pageInfo', $gContent->mInfo ); if (!empty( $_REQUEST['rollback_preview'] )) { $gBitSmarty->assign( 'rollback_preview', $_REQUEST['rollback_preview']); @@ -39,7 +40,7 @@ if (!empty( $_REQUEST['rollback_preview'] )) { // set up stuff to get history working $smartyContentRef = 'pageInfo'; $rollbackPerm = 'p_wiki_rollback'; -include_once( LIBERTY_PKG_INCLUDE_PATH.'content_history_inc.php' ); +include_once LIBERTY_PKG_INCLUDE_PATH.'content_history_inc.php'; // pagination stuff $gBitSmarty->assign( 'page', $page = !empty( $_REQUEST['page'] ) ? $_REQUEST['page'] : 1 ); @@ -48,11 +49,11 @@ if( !empty( $_REQUEST['list_page'] )) { } $offset = ( $page - 1 ) * $gBitSystem->getConfig( 'max_records' ); -$history = $gContent->getHistory( NULL, NULL, $offset, $gBitSystem->getConfig( 'max_records' ) ); -$gBitSmarty->assignByRef( 'data', $history['data'] ); -$gBitSmarty->assignByRef( 'listInfo', $history['listInfo'] ); +$history = $gContent->getHistory( null, null, $offset, $gBitSystem->getConfig( 'max_records' ) ); +$gBitSmarty->assign( 'data', $history['data'] ); +$gBitSmarty->assign( 'listInfo', $history['listInfo'] ); // Display the template -$gBitSmarty->assignByRef( 'gContent', $gContent ); -$gBitSystem->display( 'bitpackage:wiki/page_history.tpl' , NULL, array( 'display_mode' => 'display' )); -?> +$gBitSmarty->assign( 'gContent', $gContent ); +$gBitSystem->display( 'bitpackage:wiki/page_history.tpl' , null, array( 'display_mode' => 'display' )); + |
