diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2006-01-10 21:11:26 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2006-01-10 21:11:26 +0000 |
| commit | 9aa9bb1cd5d5e3d78cf7fbe243353fe065024fc8 (patch) | |
| tree | 937a0157280208ce13ceb3e1b44430ab755055fc /templates/center_list_blog_posts.php | |
| parent | e70bdd1ac9eeb6466a7e8dcaaf3f00ce3c6bd8d7 (diff) | |
| download | blogs-9aa9bb1cd5d5e3d78cf7fbe243353fe065024fc8.tar.gz blogs-9aa9bb1cd5d5e3d78cf7fbe243353fe065024fc8.tar.bz2 blogs-9aa9bb1cd5d5e3d78cf7fbe243353fe065024fc8.zip | |
merge recent changes into HEAD
Diffstat (limited to 'templates/center_list_blog_posts.php')
| -rw-r--r-- | templates/center_list_blog_posts.php | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/templates/center_list_blog_posts.php b/templates/center_list_blog_posts.php index 1dbc495..7752736 100644 --- a/templates/center_list_blog_posts.php +++ b/templates/center_list_blog_posts.php @@ -4,23 +4,23 @@ global $gBitSmarty, $gBlog, $gBitSystem, $categlib, $_REQUEST, $maxRecords, $gQu $postRecords = ( $module_rows ? $module_rows : $maxRecords ); if (defined("CATEGORIES_PKG_PATH")) { - include_once( CATEGORIES_PKG_PATH.'categ_lib.php'); + include_once( CATEGORIES_PKG_PATH.'categ_lib.php'); } include_once( BLOGS_PKG_PATH.'BitBlog.php' ); require_once( USERS_PKG_PATH.'BitUser.php' ); if ($gBitSystem->isPackageActive( 'vvcat' )) { - if (isset($_REQUEST['addcateg']) and $_REQUEST['addcateg'] and isset($_REQUEST['post_id']) and $_REQUEST['post_id']) { - $categlib->categorize_blog_post($_REQUEST['post_id'],$_REQUEST['addcateg'],true); - } elseif (isset($_REQUEST['delcategs']) and isset($_REQUEST['post_id']) and $_REQUEST['post_id']) { - $categlib->uncategorize('blogpost',$_REQUEST['post_id']); - } - $categs = $categlib->list_all_categories(0, -1, 'name_asc', '', '', 0); + if (isset($_REQUEST['addcateg']) and $_REQUEST['addcateg'] and isset($_REQUEST['post_id']) and $_REQUEST['post_id']) { + $categlib->categorize_blog_post($_REQUEST['post_id'],$_REQUEST['addcateg'],true); + } elseif (isset($_REQUEST['delcategs']) and isset($_REQUEST['post_id']) and $_REQUEST['post_id']) { + $categlib->uncategorize('blogpost',$_REQUEST['post_id']); + } + $categs = $categlib->list_all_categories(0, -1, 'name_asc', '', '', 0); - $gBitSmarty->assign('categs',$categs['data']); - $gBitSmarty->assign('page','view.php'); - $choosecateg = str_replace('"',"'",$gBitSmarty->fetch('bitpackage:blogs/popup_categs.tpl')); - $gBitSmarty->assign('choosecateg',$choosecateg); + $gBitSmarty->assign('categs',$categs['data']); + $gBitSmarty->assign('page','view.php'); + $choosecateg = str_replace('"',"'",$gBitSmarty->fetch('bitpackage:blogs/popup_categs.tpl')); + $gBitSmarty->assign('choosecateg',$choosecateg); } if ( empty( $_REQUEST["sort_mode"] ) ) { @@ -61,6 +61,17 @@ $listHash['parse_data'] = TRUE; $listHash['load_comments'] = TRUE; $listHash['page'] = (!empty($_REQUEST['page']) ? $_REQUEST['page'] : 1); $listHash['offset'] = (!empty($_REQUEST['offset']) ? $_REQUEST['offset'] : 0); + +if( @BitBase::verifyId( $module_params['blog_id'] ) ) { + $listHash['blog_id'] = $module_params['blog_id']; +} +if( @BitBase::verifyId( $module_params['user_id'] ) ) { + $listHash['user_id'] = $module_params['user_id']; +} +if ( !empty( $module_params['sort_mode'] ) ) { + $listHash['sort_mode'] = $module_params['sort_mode']; +} + // Get a list of last changes to the Wiki database if ($gQueryUserId) { $listHash['user_id'] = $gQueryUserId; |
