summaryrefslogtreecommitdiff
path: root/modules/lastblogposts/mod_last_blog_posts.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/lastblogposts/mod_last_blog_posts.php')
-rwxr-xr-x[-rw-r--r--]modules/lastblogposts/mod_last_blog_posts.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/lastblogposts/mod_last_blog_posts.php b/modules/lastblogposts/mod_last_blog_posts.php
index e9c2521..d53652e 100644..100755
--- a/modules/lastblogposts/mod_last_blog_posts.php
+++ b/modules/lastblogposts/mod_last_blog_posts.php
@@ -13,7 +13,7 @@ include_once( BLOGS_PKG_CLASS_PATH.'BitBlogPost.php' );
// moduleParams contains lots of goodies: extract for easier handling
extract( $moduleParams );
-$date_start = NULL;
+$date_start = null;
if( !empty($module_params['date_start_offset']) ){
//offset is passed as number of hours
$date_start = time() - ( $module_params['date_start_offset'] * 3600 );
@@ -22,11 +22,11 @@ if( !empty($module_params['date_start_offset']) ){
$defaultsHash = array(
'sort_mode' => ( !empty( $module_params['sort_mode'] ) ? $module_params['sort_mode'] : 'publish_date_desc' ),
'max_records' => $module_rows,
- 'parse_data' => TRUE,
- 'user' => ( !empty( $module_params['user'] ) ? $module_params['user'] : NULL ),
- 'blog_id' => ( @BitBase::verifyId( $module_params['blog_id'] ) ? $module_params['blog_id'] : NULL ),
- 'group_id' => ( @BitBase::verifyId( $module_params['group_id'] ) ? $module_params['group_id'] : NULL ),
- 'role_id' => ( @BitBase::verifyId( $module_params['role_id'] ) ? $module_params['role_id'] : NULL ),
+ 'parse_data' => true,
+ 'user' => ( !empty( $module_params['user'] ) ? $module_params['user'] : null ),
+ 'blog_id' => ( BitBase::verifyId( $module_params['blog_id'] ) ? $module_params['blog_id'] : null ),
+ 'group_id' => ( BitBase::verifyId( $module_params['group_id'] ) ? $module_params['group_id'] : null ),
+ 'role_id' => ( BitBase::verifyId( $module_params['role_id'] ) ? $module_params['role_id'] : null ),
'date_start' => $date_start,
'offset' => ( !empty( $module_params['offset'] ) ? $module_params['offset'] : 0 ),
);
@@ -42,11 +42,11 @@ if( !$gBitUser->hasPermission( 'p_blogs_admin' )) {
}
// we dont want admin drafts included in regular lists if we are enforcing content status
-$listHash['enforce_status'] = TRUE;
+$listHash['enforce_status'] = true;
if ( !empty( $module_params['status'] ) && $module_params['status'] = "draft" && isset( $gBitUser->mUserId ) ){
// if we are getting drafts then get future posts too
- $listHash['show_future'] = TRUE;
+ $listHash['show_future'] = true;
$listHash['min_status_id'] = -6;
$listHash['max_status_id'] = -4;
$listHash['min_owner_status_id'] = -6;
@@ -64,7 +64,7 @@ $descriptionLength = ( !empty( $module_params['max_preview_length'] ) ? $module_
$gBitSmarty->assign( 'blogPostsFormat', (empty($module_params['format']) ? 'list' : $module_params['format']) );
$gBitSmarty->assign( 'descriptionLength', $descriptionLength );
-$gBitSmarty->assignByRef( 'modLastBlogPosts', $blogPosts["data"] );
+$gBitSmarty->assign( 'modLastBlogPosts', $blogPosts["data"] );
// not sure what this is, but using title doesn't work cos that will rename the moduleTitle
//$gBitSmarty->assign( 'modLastBlogPostsTitle', ( isset( $module_params["title"] ) ? $module_params["title"]:"" ));
?>