verifyPackage( 'wiki' ); $gBitSystem->verifyFeature( 'wiki_history' ); // Get the page from the request var or default it to HomePage include( WIKI_PKG_PATH.'lookup_page_inc.php' ); //vd($gContent->mPageId);vd($gContent->mInfo); if( !$gContent->isValid() || empty( $gContent->mInfo ) ) { $gBitSystem->fatalError( tra( "Unknown page" )); } $gContent->verifyPermission( 'p_wiki_view_page' ); $gContent->verifyPermission( 'p_wiki_view_history' ); $page_id = $_REQUEST['page_id']; $smartyContentRef = 'pageInfo'; include_once( LIBERTY_PKG_PATH.'content_history_inc.php' ); // pagination stuff $gBitSmarty->assign( 'page', $page = !empty( $_REQUEST['page'] ) ? $_REQUEST['page'] : 1 ); if ( !empty($_REQUEST['list_page']) ) { $gBitSmarty->assign( 'page', $page = !empty( $_REQUEST['list_page'] ) ? $_REQUEST['list_page'] : 1 ); } $offset = ( $page - 1 ) * $gBitSystem->getConfig( 'max_records' ); $history = $gContent->getHistory( NULL, NULL, $offset, $gBitSystem->getConfig( 'max_records' ) ); $gBitSmarty->assign_by_ref( 'data', $history['data'] ); $gBitSmarty->assign_by_ref( 'listInfo', $history['listInfo'] ); // Display the template $gBitSmarty->assign_by_ref( 'gContent', $gContent ); $gBitSystem->display( 'bitpackage:wiki/page_history.tpl'); ?>