summaryrefslogtreecommitdiff
path: root/display_bitpage_inc.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-01-27 21:57:53 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-01-27 21:57:53 +0000
commit45f43e05103232d9b4888a37d5bf70edc8b6c216 (patch)
tree33038cdd81db716ac59787c08f5e156b8313b08f /display_bitpage_inc.php
parent4352690a0d36f924caa3e1b739d53f8da9d6875e (diff)
downloadwiki-45f43e05103232d9b4888a37d5bf70edc8b6c216.tar.gz
wiki-45f43e05103232d9b4888a37d5bf70edc8b6c216.tar.bz2
wiki-45f43e05103232d9b4888a37d5bf70edc8b6c216.zip
replace old code with new versions - we need to stop babysitting outdated code
Diffstat (limited to 'display_bitpage_inc.php')
-rw-r--r--display_bitpage_inc.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/display_bitpage_inc.php b/display_bitpage_inc.php
index b3ba192..e0a2ef3 100644
--- a/display_bitpage_inc.php
+++ b/display_bitpage_inc.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_wiki/display_bitpage_inc.php,v 1.7 2005/08/30 22:40:17 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_wiki/display_bitpage_inc.php,v 1.8 2006/01/27 21:57:53 squareing 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: display_bitpage_inc.php,v 1.7 2005/08/30 22:40:17 squareing Exp $
+ * $Id: display_bitpage_inc.php,v 1.8 2006/01/27 21:57:53 squareing Exp $
* @package wiki
* @subpackage functions
*/
@@ -44,14 +44,13 @@ $gBitSmarty->assign_by_ref('page',$gContent->mInfo['title']);
require_once( WIKI_PKG_PATH.'page_setup_inc.php' );
// Let creator set permissions
-if($wiki_creator_admin == 'y') {
- if( $gContent->isOwner() ) {
- $bit_p_admin_wiki = 'y';
- $gBitSmarty->assign( 'bit_p_admin_wiki', 'y' );
- }
+if($gBitSystem->isFeatureActive( 'wiki_creator_admin' )) {
+ if( $gContent->isOwner() ) {
+ $gBitUser->mPrefs['bit_p_admin_wiki'] = TRUE;
+ }
}
if(isset($_REQUEST["copyrightpage"])) {
- $gBitSmarty->assign_by_ref('copyrightpage',$_REQUEST["copyrightpage"]);
+ $gBitSmarty->assign_by_ref('copyrightpage',$_REQUEST["copyrightpage"]);
}
if( $gBitSystem->isFeatureActive( 'feature_backlinks' ) ) {
// Get the backlinks for the page "page"
@@ -97,7 +96,7 @@ if( $gBitSystem->isFeatureActive( 'count_admin_pvs' ) || !$gBitUser->isAdmin() )
// Check if we have to perform an action for this page
// for example lock/unlock
if( isset( $_REQUEST["action"] ) && (($_REQUEST["action"] == 'lock' || $_REQUEST["action"]=='unlock' ) &&
- ($gBitUser->hasPermission( 'bit_p_admin_wiki' )) || ($user and ($gBitUser->hasPermission( 'bit_p_lock' )) and ($feature_wiki_usrlock == 'y'))) ) {
+($gBitUser->hasPermission( 'bit_p_admin_wiki' )) || ($user and ($gBitUser->hasPermission( 'bit_p_lock' )) and ($gBitSystem->isFeatureActive( 'feature_wiki_usrlock' )))) ) {
$gContent->setLock( ($_REQUEST["action"] == 'lock' ? 'L' : NULL ) );
$gBitSmarty->assign('lock', ($_REQUEST["action"] == 'lock') );
}
@@ -122,7 +121,7 @@ if($gBitUser->hasPermission( 'bit_p_admin_wiki' )) {
// Process an undo here
if(isset($_REQUEST["undo"])) {
- if($gBitUser->hasPermission( 'bit_p_admin_wiki' ) || ($gContent->mInfo["flag"]!='L' && ( ($gBitUser->hasPermission( 'bit_p_edit' ) && $gContent->mInfo["user"]==$user)||($bit_p_remove=='y')) )) {
+ if($gBitUser->hasPermission( 'bit_p_admin_wiki' ) || ($gContent->mInfo["flag"]!='L' && ( ($gBitUser->hasPermission( 'bit_p_edit' ) && $gContent->mInfo["user"]==$user)||($gBitUser->hasPermission( 'bit_p_remove' ))) )) {
// Remove the last version
$gContent->removeLastVersion();
// If page was deleted then re-create