diff options
| author | wjames5 <will@tekimaki.com> | 2008-10-03 20:20:07 +0000 |
|---|---|---|
| committer | wjames5 <will@tekimaki.com> | 2008-10-03 20:20:07 +0000 |
| commit | c4ec5e3b11e0bfb1698c6f9afb7296d4a4f10591 (patch) | |
| tree | 94d27c53a7de20f0e2c9a7741b086fb51f14d7e2 | |
| parent | 4cc954fcbfb71db632403b0e287247be4dfd7865 (diff) | |
| download | wiki-c4ec5e3b11e0bfb1698c6f9afb7296d4a4f10591.tar.gz wiki-c4ec5e3b11e0bfb1698c6f9afb7296d4a4f10591.tar.bz2 wiki-c4ec5e3b11e0bfb1698c6f9afb7296d4a4f10591.zip | |
sandbox check needs to come before perms check
| -rw-r--r-- | edit.php | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_wiki/edit.php,v 1.52 2008/10/03 17:20:16 wjames5 Exp $ + * $Header: /cvsroot/bitweaver/_bit_wiki/edit.php,v 1.53 2008/10/03 20:20:07 wjames5 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: edit.php,v 1.52 2008/10/03 17:20:16 wjames5 Exp $ + * $Id: edit.php,v 1.53 2008/10/03 20:20:07 wjames5 Exp $ * @package wiki * @subpackage functions */ @@ -21,9 +21,14 @@ include_once( WIKI_PKG_PATH.'BitBook.php' ); $gBitSystem->verifyPackage( 'wiki' ); - include( WIKI_PKG_PATH.'lookup_page_inc.php' ); +$wiki_sandbox = FALSE; +if( ( !empty( $_REQUEST['page'] ) && $_REQUEST['page'] == 'SandBox' ) || ( !empty( $_REQUEST['title'] ) && $_REQUEST['title'] == 'SandBox' ) ) { + $gContent->mInfo['title'] = 'SandBox'; + $wiki_sandbox = TRUE; +} + if( $wiki_sandbox && !$gBitSystem->isFeatureActive( 'wiki_sandbox' ) ) { $gBitSystem->fatalError( tra( "The SandBox is disabled" )); } elseif( !$wiki_sandbox ){ @@ -47,12 +52,6 @@ if( !isset( $_REQUEST['title'] ) && isset( $gContent->mInfo['title'] ) ) { $_REQUEST['title'] = $gContent->mInfo['title']; } -$wiki_sandbox = FALSE; -if( ( !empty( $_REQUEST['page'] ) && $_REQUEST['page'] == 'SandBox' ) || ( !empty( $_REQUEST['title'] ) && $_REQUEST['title'] == 'SandBox' ) ) { - $gContent->mInfo['title'] = 'SandBox'; - $wiki_sandbox = TRUE; -} - if( $gContent->isLocked() ) { $gBitSystem->fatalError( 'Cannot edit page because it is locked' ); } |
