Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/23/2013 06:37:22 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Use strict comparisons where possible (excluding the converter code, as it needs dedicated testing.) See #2358.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/forums/capabilities.php

    r4835 r4995  
    7878
    7979                    // Post is public
    80                     if ( bbp_get_public_status_id() == $_post->post_status ) {
     80                    if ( bbp_get_public_status_id() === $_post->post_status ) {
    8181                        $caps = array( 'spectate' );
    8282
    8383                    // User is author so allow read
    84                     } elseif ( (int) $user_id == (int) $_post->post_author ) {
     84                    } elseif ( (int) $user_id === (int) $_post->post_author ) {
    8585                        $caps = array( 'spectate' );
    8686
     
    138138
    139139                // User is author so allow edit
    140                 } elseif ( (int) $user_id == (int) $_post->post_author ) {
     140                } elseif ( (int) $user_id === (int) $_post->post_author ) {
    141141                    $caps[] = $post_type->cap->edit_posts;
    142142
     
    167167
    168168                // User is author so allow to delete
    169                 } elseif ( (int) $user_id == (int) $_post->post_author ) {
     169                } elseif ( (int) $user_id === (int) $_post->post_author ) {
    170170                    $caps[] = $post_type->cap->delete_posts;
    171171
Note: See TracChangeset for help on using the changeset viewer.