summaryrefslogtreecommitdiff
path: root/page_history.php
diff options
context:
space:
mode:
authorJams H Thompson <jht001@users.sourceforge.net>2008-03-23 10:57:04 +0000
committerJams H Thompson <jht001@users.sourceforge.net>2008-03-23 10:57:04 +0000
commit6dc74e804c0a259f4c51f717c675d35621e82fa5 (patch)
treee101d98c7d4fd0dc7dc565d9a1e11f34c6b52053 /page_history.php
parentde27150873e284391a020009c9106f56d6ea0aab (diff)
downloadwiki-6dc74e804c0a259f4c51f717c675d35621e82fa5.tar.gz
wiki-6dc74e804c0a259f4c51f717c675d35621e82fa5.tar.bz2
wiki-6dc74e804c0a259f4c51f717c675d35621e82fa5.zip
fix bug in history preview
Diffstat (limited to 'page_history.php')
-rw-r--r--page_history.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/page_history.php b/page_history.php
index c90bb5c..fac77ae 100644
--- a/page_history.php
+++ b/page_history.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/page_history.php,v 1.28 2008/03/23 00:01:26 jht001 Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/page_history.php,v 1.29 2008/03/23 10:57:04 jht001 Exp $
*
* Copyright (c) 2004 bitweaver.org
* Copyright (c) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: page_history.php,v 1.28 2008/03/23 00:01:26 jht001 Exp $
+ * $Id: page_history.php,v 1.29 2008/03/23 10:57:04 jht001 Exp $
* @package wiki
* @subpackage functions
*/
@@ -25,11 +25,6 @@ $gBitSystem->verifyFeature( 'wiki_history' );
// Get the page from the request var or default it to HomePage
include( WIKI_PKG_PATH.'lookup_page_inc.php' );
-// make comment count for this page available for templates
-$gComment = new LibertyComment( NULL, $gContent->mContentId );
-$numComments = $gComment->getNumComments($gContent->mContentId);
-$gBitSmarty->assign('comments_count', $numComments);
-
//vd($gContent->mPageId);vd($gContent->mInfo);
if( !$gContent->isValid() || empty( $gContent->mInfo ) ) {
$gBitSystem->fatalError( tra( "Unknown page" ));
@@ -38,6 +33,13 @@ if( !$gContent->isValid() || empty( $gContent->mInfo ) ) {
$gContent->verifyViewPermission();
$gContent->verifyPermission( 'p_wiki_view_history' );
+// make comment count for this page available for templates
+$gComment = new LibertyComment( NULL, $gContent->mContentId );
+$numComments = $gComment->getNumComments($gContent->mContentId);
+$gBitSmarty->assign('comments_count', $numComments);
+
+$gBitSmarty->assign_by_ref( 'pageInfo', $gContent->mInfo );
+
if (!empty( $_REQUEST['rollback_preview'] )) {
$gBitSmarty->assign( 'rollback_preview', $_REQUEST['rollback_preview']);
}
@@ -60,7 +62,5 @@ $gBitSmarty->assign_by_ref( 'listInfo', $history['listInfo'] );
// Display the template
$gBitSmarty->assign_by_ref( 'gContent', $gContent );
-$gBitSmarty->assign_by_ref( 'pageInfo', $gContent->mInfo );
-
-$gBitSystem->display( 'bitpackage:wiki/page_history.tpl');
+$gBitSystem->display( 'bitpackage:wiki/page_history.tpl' );
?>