diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2006-01-27 21:57:53 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2006-01-27 21:57:53 +0000 |
| commit | 45f43e05103232d9b4888a37d5bf70edc8b6c216 (patch) | |
| tree | 33038cdd81db716ac59787c08f5e156b8313b08f /like_pages.php | |
| parent | 4352690a0d36f924caa3e1b739d53f8da9d6875e (diff) | |
| download | wiki-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 'like_pages.php')
| -rw-r--r-- | like_pages.php | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/like_pages.php b/like_pages.php index 5f5f0b3..22496f1 100644 --- a/like_pages.php +++ b/like_pages.php @@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_wiki/like_pages.php,v 1.3 2005/08/01 18:42:04 squareing Exp $ + * $Header: /cvsroot/bitweaver/_bit_wiki/like_pages.php,v 1.4 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: like_pages.php,v 1.3 2005/08/01 18:42:04 squareing Exp $ + * $Id: like_pages.php,v 1.4 2006/01/27 21:57:53 squareing Exp $ * @package wiki * @subpackage functions */ @@ -20,11 +20,9 @@ require_once( '../bit_setup_inc.php' ); include_once( WIKI_PKG_PATH.'BitPage.php'); include_once( WIKI_PKG_PATH.'lookup_page_inc.php' ); $gBitSystem->verifyPackage( 'wiki' ); -if ($feature_likePages != 'y') { - $gBitSmarty->assign('msg', tra("This feature is disabled").": feature_likePages"); - $gBitSystem->display( 'error.tpl' ); - die; -} +$gBitSystem->verifyFeature( 'feature_likePages' ); +$gBitSystem->verifyPermission( 'bit_p_view', tra( "Permission denied you cannot view pages like this page" ) ); + // Get the page from the request var or default it to HomePage if( !$gContent->isValid() ) { $gBitSmarty->assign('msg', tra("No page indicated")); @@ -32,12 +30,6 @@ if( !$gContent->isValid() ) { die; } include_once( WIKI_PKG_PATH.'page_setup_inc.php' ); -// Now check permissions to access this page -if (!$gBitUser->hasPermission( 'bit_p_view' )) { - $gBitSmarty->assign('msg', tra("Permission denied you cannot view pages like this page")); - $gBitSystem->display( 'error.tpl' ); - die; -} $likepages = $wikilib->get_like_pages( $gContent->mInfo['title'] ); $gBitSmarty->assign_by_ref('likepages', $likepages); |
