summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2005-09-03 09:50:25 +0000
committerMax Kremmel <xing@synapse.plus.com>2005-09-03 09:50:25 +0000
commit9192c18be8675a970c2222a7a37cbea04af2c2e0 (patch)
tree1e9a45eb94ca795a0b30bbe2fc01b148910a2635 /index.php
parent6f1cd3787e4b994a76d73b4e024d90bec7482c81 (diff)
downloadarticles-9192c18be8675a970c2222a7a37cbea04af2c2e0.tar.gz
articles-9192c18be8675a970c2222a7a37cbea04af2c2e0.tar.bz2
articles-9192c18be8675a970c2222a7a37cbea04af2c2e0.zip
mainly article filter options related changes
Diffstat (limited to 'index.php')
-rw-r--r--index.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/index.php b/index.php
index 011beb2..1037192 100644
--- a/index.php
+++ b/index.php
@@ -1,5 +1,5 @@
<?php
-// $Header: /cvsroot/bitweaver/_bit_articles/index.php,v 1.5 2005/08/27 20:26:28 squareing Exp $
+// $Header: /cvsroot/bitweaver/_bit_articles/index.php,v 1.6 2005/09/03 09:50:25 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.
@@ -18,10 +18,17 @@ if( !empty( $_REQUEST['article_id'] ) ) {
}
require_once( ARTICLES_PKG_PATH.'lookup_article_inc.php' );
+include_once( ARTICLES_PKG_PATH.'article_filter_inc.php' );
-// only display approved articles
-$_REQUEST['status_id'] = ARTICLE_STATUS_APPROVED;
-$_REQUEST['max_records'] = $gBitSystem->mPrefs['max_articles'];
+if( $gBitUser->isAdmin() || $gBitUser->hasPermission( 'bit_p_admin_cms' ) ) {
+ $_REQUEST['status_id'] = !empty( $_REQUEST['status_id'] ) ? $_REQUEST['status_id'] : ARTICLE_STATUS_APPROVED;
+ $_REQUEST['max_records'] = !empty( $_REQUEST['max_records'] ) ? $_REQUEST['max_records'] : $gBitSystem->mPrefs['max_articles'];
+ $_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['max_records'] = $gBitSystem->mPrefs['max_articles'];
+}
$articles = $gContent->getList( $_REQUEST );
foreach( $articles['data'] as $key => $article ) {