Skip to content

Commit

Permalink
Fix a preview of posts with not allowed front office statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
yurabakhtin committed Jun 9, 2016
1 parent 671a697 commit 45b01cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inc/skins/_skin.funcs.php
Expand Up @@ -179,7 +179,7 @@ function skin_init( $disp )

// Check if the post has allowed front office statuses
$allowed_statuses = get_inskin_statuses( $Blog->ID, 'post' );
if( ! in_array( $Item->status, $allowed_statuses ) )
if( ! $preview && ! in_array( $Item->status, $allowed_statuses ) )
{
global $disp;
$disp = '404';
Expand Down
2 changes: 1 addition & 1 deletion skins_fallback_v6/_item_meta_comments.inc.php
Expand Up @@ -17,7 +17,7 @@
global $disp;

if( ( $disp == 'single' || $disp == 'page' ) &&
! empty( $Item ) &&
isset( $Item ) && $Item->ID > 0 &&
is_logged_in() &&
$current_User->check_perm( 'meta_comment', 'view', false, $Item ) )
{ // Display the meta comments if current user can edit this post:
Expand Down
2 changes: 1 addition & 1 deletion skins_fallback_v6/_item_workflow.inc.php
Expand Up @@ -16,7 +16,7 @@
global $disp;

if( ( $disp == 'single' || $disp == 'page' ) &&
! empty( $Item ) &&
isset( $Item ) && $Item->ID > 0 &&
is_logged_in() &&
$Blog->get_setting( 'use_workflow' ) &&
$current_User->check_perm( 'blog_can_be_assignee', 'edit', false, $Blog->ID ) &&
Expand Down

0 comments on commit 45b01cb

Please sign in to comment.