Skip to:
Content

bbPress.org


Ignore:
Timestamp:
07/10/2013 03:29:03 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Use string values when comparing against super globals. Regression introduced in r4995. See #2358.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/admin/topics.php

    r4995 r5021  
    502502
    503503                    $is_sticky = bbp_is_topic_sticky( $topic_id );
    504                     $is_super  = ( empty( $is_sticky ) && !empty( $_GET['super'] ) && 1 === (int) $_GET['super'] ) ? true : false;
    505                     $message   = true === $is_sticky ? 'unsticked'     : 'sticked';
    506                     $message   = true === $is_super  ? 'super_sticked' : $message;
    507                     $success   = true === $is_sticky ? bbp_unstick_topic( $topic_id ) : bbp_stick_topic( $topic_id, $is_super );
     504                    $is_super  = false === $is_sticky && !empty( $_GET['super'] ) && ( "1" === $_GET['super'] ) ? true : false;
     505                    $message   = true  === $is_sticky ? 'unsticked'     : 'sticked';
     506                    $message   = true  === $is_super  ? 'super_sticked' : $message;
     507                    $success   = true  === $is_sticky ? bbp_unstick_topic( $topic_id ) : bbp_stick_topic( $topic_id, $is_super );
    508508
    509509                    break;
Note: See TracChangeset for help on using the changeset viewer.