summaryrefslogtreecommitdiff
path: root/page_permissions.php
diff options
context:
space:
mode:
authorJams H Thompson <jht001@users.sourceforge.net>2008-03-23 00:01:26 +0000
committerJams H Thompson <jht001@users.sourceforge.net>2008-03-23 00:01:26 +0000
commit5aa5609f4e2350c1f9f3d15d186fc9726b5a357d (patch)
tree501e0668cb6a437c1c32b6edb408bf8f59116713 /page_permissions.php
parentd6355aaf3e8a9ffaa7bf58f111b7b7355ad1ba1d (diff)
downloadwiki-5aa5609f4e2350c1f9f3d15d186fc9726b5a357d.tar.gz
wiki-5aa5609f4e2350c1f9f3d15d186fc9726b5a357d.tar.bz2
wiki-5aa5609f4e2350c1f9f3d15d186fc9726b5a357d.zip
eliminate dependency on get_bitpage_info.php
Diffstat (limited to 'page_permissions.php')
-rw-r--r--page_permissions.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/page_permissions.php b/page_permissions.php
index 64161a1..d4d6cf2 100644
--- a/page_permissions.php
+++ b/page_permissions.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/Attic/page_permissions.php,v 1.10 2008/03/22 21:37:47 jht001 Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/Attic/page_permissions.php,v 1.11 2008/03/23 00:01:26 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_permissions.php,v 1.10 2008/03/22 21:37:47 jht001 Exp $
+ * $Id: page_permissions.php,v 1.11 2008/03/23 00:01:26 jht001 Exp $
* @package wiki
* @subpackage functions
*/
@@ -21,8 +21,7 @@ include_once( WIKI_PKG_PATH.'BitPage.php');
include_once( WIKI_PKG_PATH.'BitBook.php');
include_once( KERNEL_PKG_PATH.'notification_lib.php' );
include_once( WIKI_PKG_PATH.'lookup_page_inc.php' );
-//make info about page available for templates
-include( WIKI_PKG_PATH.'get_bitpage_info.php' );
+
$gBitSystem->verifyPackage( 'wiki' );
@@ -33,6 +32,12 @@ if( !$gContent->isValid() ) {
die;
}
+// 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);
+
+
// Let creator set permissions
if( $gBitSystem->isFeatureActive( 'wiki_creator_admin' ) && $gContent->isOwner() ) {
$gBitUser->setPreference( 'p_wiki_admin', TRUE );
@@ -63,6 +68,8 @@ if( !$gBitUser->isAdmin() ) {
}
}
+$gBitSmarty->assign_by_ref( 'pageInfo', $gContent->mInfo );
+
require_once( LIBERTY_PKG_PATH.'content_permissions_inc.php' );
$gBitSystem->display( 'bitpackage:wiki/page_permissions.tpl', tra( 'Page Permissions' ) );