summaryrefslogtreecommitdiff
path: root/read.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2007-01-23 16:07:15 +0000
committerMax Kremmel <xing@synapse.plus.com>2007-01-23 16:07:15 +0000
commit878de1a959b17892fb9a8eb38b8621f0ba0f1185 (patch)
tree0fa7dffeb829edb1709ed193fddcfc824118ed06 /read.php
parent18fd79c2083c495f6369b8f68319004a0ea4f4e8 (diff)
downloadarticles-878de1a959b17892fb9a8eb38b8621f0ba0f1185.tar.gz
articles-878de1a959b17892fb9a8eb38b8621f0ba0f1185.tar.bz2
articles-878de1a959b17892fb9a8eb38b8621f0ba0f1185.zip
add approval and delete links to article display page when article status is pending
Diffstat (limited to 'read.php')
-rw-r--r--read.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/read.php b/read.php
index 92df48f..312c84e 100644
--- a/read.php
+++ b/read.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_articles/read.php,v 1.16 2006/04/29 16:26:25 squareing Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_articles/read.php,v 1.17 2007/01/23 16:07:15 squareing Exp $
* @package article
* @subpackage functions
*/
@@ -27,17 +27,17 @@ if( !$gBitUser->hasPermission( 'p_articles_read' ) ) {
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->getField( 'status_id' ) != ARTICLE_STATUS_APPROVED && !( $gBitUser->hasPermission( 'p_articles_edit_submission' ) || $gBitUser->hasPermission( 'p_articles_edit_submission' ) || $gBitUser->hasPermission( 'p_articles_edit_submission' ) || $gBitUser->isAdmin() ) ) {
- $gBitSmarty->assign( 'msg', tra( "Permission denied you cannot view this article" ) );
- $gBitSystem->display( "error.tpl" );
- die;
+if( $gContent->getField( 'status_id' ) != ARTICLE_STATUS_APPROVED ) {
+ if( !( $gBitUser->hasPermission( 'p_articles_edit_submission' ) || $gBitUser->hasPermission( 'p_articles_approve_submission' ))) {
+ $gBitSystem->fatalError( "Permission denied you cannot view this article" );
+ }
}
$gContent->addHit();
$gBitSmarty->assign_by_ref( 'article', $gContent->mInfo );
// get all the services that want to display something on this page
-$displayHash = array( 'perm_name' => 'p_wiki_view_page' );
+$displayHash = array( 'perm_name' => 'p_articles_read' );
$gContent->invokeServices( 'content_display_function', $displayHash );
$topics = BitArticleTopic::getTopicList();