summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsces <none@none>2012-06-07 20:48:22 +0100
committerlsces <none@none>2012-06-07 20:48:22 +0100
commit6a6107f47020b443cb06817085a8f545d65622d2 (patch)
tree5e6504dc4ee90c784215db67491772f9013aafe9
parent5859a8f3568384c15f1f2b988a26ac1db277445c (diff)
downloadarticles-6a6107f47020b443cb06817085a8f545d65622d2.tar.gz
articles-6a6107f47020b443cb06817085a8f545d65622d2.tar.bz2
articles-6a6107f47020b443cb06817085a8f545d65622d2.zip
Allow index page to handle a single article correctly.
Was dropping back to list even if a valid article_id was supplied
-rw-r--r--index.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/index.php b/index.php
index af276d2..5e98842 100644
--- a/index.php
+++ b/index.php
@@ -9,12 +9,15 @@ require_once( '../kernel/setup_inc.php' );
// Is package installed and enabled
$gBitSystem->verifyPackage( 'articles' );
+require_once( ARTICLES_PKG_PATH.'BitArticle.php' );
// Now check permissions to access this page
$gBitSystem->verifyPermission( 'p_articles_read' );
if( !empty( $_REQUEST['article_id'] ) ) {
- header( "location: ".BitArticle::getDisplayUrlFromHash( array ( 'article_id' => ( int )$_REQUEST['article_id'] ) ) );
+ $param = array ( 'article_id' => ( int )$_REQUEST['article_id'] );
+ header( "Location: ".BitArticle::getDisplayUrlFromHash( $param ) );
+ exit;
}
// Display the template