diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2006-09-22 08:44:46 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2006-09-22 08:44:46 +0000 |
| commit | 90153d9203713d353b5625315234d0d7c796a383 (patch) | |
| tree | fa58ff51a29b9a6e6ece4e91e1923c4455c38e3e /modules | |
| parent | 5b3abdd948b76a3db5e6f629baf4ff8a251df236 (diff) | |
| download | articles-90153d9203713d353b5625315234d0d7c796a383.tar.gz articles-90153d9203713d353b5625315234d0d7c796a383.tar.bz2 articles-90153d9203713d353b5625315234d0d7c796a383.zip | |
allow selection of articles based on topic_id or topic_name and fix {inlinemodule} parameter assignment
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/mod_articles.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/mod_articles.php b/modules/mod_articles.php index 732b800..1c2184a 100644 --- a/modules/mod_articles.php +++ b/modules/mod_articles.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_articles/modules/mod_articles.php,v 1.10 2006/04/14 17:18:37 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_articles/modules/mod_articles.php,v 1.11 2006/09/22 08:44:46 squareing Exp $ * @package article * @subpackage modules */ @@ -34,8 +34,17 @@ if( !empty( $module_params['sort_mode'] ) && in_array( $module_params['sort_mode $getHash['status_id'] = $status_id; $getHash['sort_mode'] = $sort_mode; $getHash['max_records'] = !empty( $module_rows ) ? $module_rows : $gBitSystem->getConfig( 'articles_max_list' ); -$getHash['topic'] = !empty( $module_params['topic'] ) ? $module_params['topic'] : NULL; +$getHash['topic_name'] = !empty( $module_params['topic_name'] ) ? $module_params['topic_name'] : NULL; +$getHash['topic_id'] = !empty( $module_params['topic_id'] ) ? $module_params['topic_id'] : NULL; $articles = $articles->getList( $getHash ); +if( ( !empty( $module_params['topic_id'] ) || !empty( $module_params['topic_name'] ) ) && empty( $module_title ) && !empty( $articles ) ) { + $gBitSmarty->assign( 'moduleTitle', $articles['data'][0]['topic_name'] ); +} elseif( !empty( $module_title ) ) { + $gBitSmarty->assign( 'moduleTitle', $module_title ); +} else { + $gBitSmarty->assign( 'moduleTitle', "Articles" ); +} + $gBitSmarty->assign( 'modArticles', $articles['data'] ); ?> |
