diff options
| author | bitweaver.org <bitweaver@users.sourceforge.net> | 2006-02-18 19:16:04 +0000 |
|---|---|---|
| committer | bitweaver.org <bitweaver@users.sourceforge.net> | 2006-02-18 19:16:04 +0000 |
| commit | f490d054cbd48c864661bbee54d3681227f2292a (patch) | |
| tree | 9c8c378d154e912267d64c38aca446efdf506689 /read.php | |
| parent | 579690d0f79fc601c29ab0c6dd07af7bc9e45a78 (diff) | |
| download | articles-f490d054cbd48c864661bbee54d3681227f2292a.tar.gz articles-f490d054cbd48c864661bbee54d3681227f2292a.tar.bz2 articles-f490d054cbd48c864661bbee54d3681227f2292a.zip | |
use getField to prevent notice on bogus article id
Diffstat (limited to 'read.php')
| -rw-r--r-- | read.php | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_articles/read.php,v 1.13 2006/02/04 19:04:34 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_articles/read.php,v 1.14 2006/02/18 19:16:04 bitweaver Exp $ * @package article * @subpackage functions */ @@ -27,7 +27,7 @@ if( !$gBitUser->hasPermission( 'bit_p_read_article' ) ) { include_once( ARTICLES_PKG_PATH.'lookup_article_inc.php' ); // additionally we need to check if this article is a submission and see if user has perms to view it. -if( $gContent->mInfo['status_id'] != ARTICLE_STATUS_APPROVED && !( $gBitUser->hasPermission( 'bit_p_edit_submission' ) || $gBitUser->hasPermission( 'bit_p_edit_submission' ) || $gBitUser->hasPermission( 'bit_p_edit_submission' ) || $gBitUser->isAdmin() ) ) { +if( $gContent->getField( 'status_id' ) != ARTICLE_STATUS_APPROVED && !( $gBitUser->hasPermission( 'bit_p_edit_submission' ) || $gBitUser->hasPermission( 'bit_p_edit_submission' ) || $gBitUser->hasPermission( 'bit_p_edit_submission' ) || $gBitUser->isAdmin() ) ) { $gBitSmarty->assign( 'msg', tra( "Permission denied you cannot view this article" ) ); $gBitSystem->display( "error.tpl" ); die; |
