verifyPackage( 'wiki' ); // If the page doesn't exist then display an error $requirePage = TRUE; include( WIKI_PKG_PATH.'lookup_page_inc.php' ); // Since we updated the permissions using updateUserPermissions() in lookup_page_inc.php, we can use the regular permission methods here if( !$gBitUser->hasPermission( 'p_wiki_view_page' ) ) { $gBitSystem->fatalError( tra( "Permission denied. You cannot view this page." ) ); } // Check if we have to perform an action for this page // for example lock/unlock if (isset($_REQUEST["action"])) { if ($_REQUEST["action"] == 'lock') { $gContent->lock(); } elseif ($_REQUEST["action"] == 'unlock') { $gContent->unlock_page(); } } // Now increment page hits since we are visiting this page if ($gBitSystem->isFeatureActive( 'users_count_admin_pageviews' ) || !$gBitUser->isAdmin()) { $gContent->addHit(); } // Get page data $info = $gContent->mInfo; if ($gBitSystem->isFeatureActive( 'wiki_copyrights' ) && $gBitSystem->isFeatureActive( 'wiki_copyrights' ) && $gBitSystem->isFeatureActive( 'wiki_license_page' )) { // insert license if wiki copyrights enabled // $license_info = $wikilib->get_page_info($wiki_license_page); // $wikilib->add_hit($wiki_license_page); $info["data"] = $info["data"] . "\n