summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-01-31 10:21:11 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-01-31 10:21:11 +0000
commit6130c1dd61a75a4501e3d938f15587a640c2cd63 (patch)
treeb9c0e71710c67d2554003d89a6e9d7170670bdfa /index.php
parent45817cdb7b8cc29b6c2268fa7143c552451576a3 (diff)
downloadarticles-6130c1dd61a75a4501e3d938f15587a640c2cd63.tar.gz
articles-6130c1dd61a75a4501e3d938f15587a640c2cd63.tar.bz2
articles-6130c1dd61a75a4501e3d938f15587a640c2cd63.zip
fix various article submission related issues
Diffstat (limited to 'index.php')
-rw-r--r--index.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/index.php b/index.php
index 57e1d56..bc2e70c 100644
--- a/index.php
+++ b/index.php
@@ -1,5 +1,5 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_articles/index.php,v 1.8 2006/01/10 21:11:08 squareing Exp $
+// $Header: /cvsroot/bitweaver/_bit_articles/index.php,v 1.9 2006/01/31 10:21:11 squareing Exp $
// Copyright( c )2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// 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.
@@ -26,11 +26,19 @@ if( $gBitUser->isAdmin() || $gBitUser->hasPermission( 'bit_p_admin_cms' ) ) {
$_REQUEST['topic_id'] = !empty( $_REQUEST['topic_id'] ) ? $_REQUEST['topic_id'] : NULL;
$_REQUEST['type_id'] = !empty( $_REQUEST['type_id'] ) ? $_REQUEST['type_id'] : NULL;
} else {
- $_REQUEST['status_id'] = ARTICLE_STATUS_APPROVED;
+ $_REQUEST['status_id'] = ARTICLE_STATUS_APPROVED;
$_REQUEST['max_records'] = $gBitSystem->mPrefs['max_articles'];
}
$articles = $gContent->getList( $_REQUEST );
-$gBitSmarty->assign_by_ref( 'articles', $articles['data'] );
+$gBitSmarty->assign( 'articles', $articles['data'] );
+$gBitSmarty->assign( 'listInfo', $_REQUEST['control'] );
+
+// display submissions if we have the perm to approve them
+if( $gBitUser->hasPermission( 'bit_p_approve_submission' ) ) {
+ $listHash = array( 'status_id' => ARTICLE_STATUS_PENDING );
+ $submissions = $gContent->getList( $listHash );
+ $gBitSmarty->assign( 'submissions', $submissions['data'] );
+}
// Display the template
$gDefaultCenter = 'bitpackage:articles/center_list_articles.tpl';