summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BitBlogPost.php6
-rw-r--r--templates/center_list_blog_posts.php14
2 files changed, 4 insertions, 16 deletions
diff --git a/BitBlogPost.php b/BitBlogPost.php
index 19a82b9..6d4108f 100644
--- a/BitBlogPost.php
+++ b/BitBlogPost.php
@@ -816,11 +816,7 @@ class BitBlogPost extends LibertyMime {
$whereSql .= ' AND lc.`user_id` = ? ';
}
- if( @$this->verifyId( $pListHash['group_id'] ) ) {
- array_push( $bindVars, (int)$pListHash['group_id'] );
- $joinSql .= " INNER JOIN `".BIT_DB_PREFIX."users_groups_map` ugm ON (ugm.`user_id`=uu.`user_id`)";
- $whereSql .= ' AND ugm.`group_id` = ? ';
- }
+ $this->getServicesSql( 'content_user_collection_function', $selectSql, $joinSql, $whereSql, $bindVars, NULL, &$pListHash );
// map user to login in case we used one instead of the other
if( !empty( $pListHash['user'] ) ) {
diff --git a/templates/center_list_blog_posts.php b/templates/center_list_blog_posts.php
index 48bb7aa..45afaf0 100644
--- a/templates/center_list_blog_posts.php
+++ b/templates/center_list_blog_posts.php
@@ -3,7 +3,7 @@
* @version $Header$
* @package bitweaver
*/
-global $gBitSmarty, $gBlog, $gBitSystem, $gQueryUserId, $moduleParams, $gBitUser;
+global $gBitSmarty, $gBlog, $gBitSystem, $moduleParams, $gBitUser;
if( !empty( $moduleParams ) ) {
extract( $moduleParams );
}
@@ -56,19 +56,11 @@ if( !empty( $moduleParams )) {
$listHash = $_REQUEST;
}
-if( empty( $listHash['user_id'] )) {
- if( !empty( $gQueryUserId )) {
- $listHash['user_id'] = $gQueryUserId;
- } elseif( isset( $_REQUEST['user_id'] ) ) {
- $listHash['user_id'] = $_REQUEST['user_id'];
- }
-}
+BitUser::userCollection( $_REQUEST, $listHash );
+
if ( empty( $listHash['sort_mode'] ) ){
$listHash['sort_mode'] = 'sort_date_desc';
}
-if( @BitBase::verifyId( $_REQUEST['group_id'] ) ) {
- $listHash['group_id'] = $_REQUEST['group_id'];
-}
if( !$gBitUser->hasPermission( 'p_blogs_admin' )) {
$listHash['content_perm_name'] = 'p_blogs_view';