Skip to:
Content

bbPress.org

Changeset 3267


Ignore:
Timestamp:
05/29/2011 02:24:40 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Audit checked() usage. Correct reversed logic, add usage to topic widget, and test all usages to ensure functionality.

Location:
branches/plugin
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-admin/bbp-settings.php

    r3243 r3267  
    6868?>
    6969
    70     <input id="_bbp_enable_favorites" name="_bbp_enable_favorites" type="checkbox" id="_bbp_enable_favorites" value="1" <?php checked( true, bbp_is_favorites_active( true ) ); ?> />
     70    <input id="_bbp_enable_favorites" name="_bbp_enable_favorites" type="checkbox" id="_bbp_enable_favorites" value="1" <?php checked( bbp_is_favorites_active( true ) ); ?> />
    7171    <label for="_bbp_enable_favorites"><?php _e( 'Allow users to mark topics as favorites?', 'bbpress' ); ?></label>
    7272
     
    8484?>
    8585
    86     <input id="_bbp_enable_subscriptions" name="_bbp_enable_subscriptions" type="checkbox" id="_bbp_enable_subscriptions" value="1" <?php checked( true, bbp_is_subscriptions_active( true ) ); ?> />
     86    <input id="_bbp_enable_subscriptions" name="_bbp_enable_subscriptions" type="checkbox" id="_bbp_enable_subscriptions" value="1" <?php checked( bbp_is_subscriptions_active( true ) ); ?> />
    8787    <label for="_bbp_enable_subscriptions"><?php _e( 'Allow users to subscribe to topics', 'bbpress' ); ?></label>
    8888
     
    100100?>
    101101
    102     <input id="_bbp_allow_anonymous" name="_bbp_allow_anonymous" type="checkbox" id="_bbp_allow_anonymous" value="1" <?php checked( true, bbp_allow_anonymous( false ) ); ?> />
     102    <input id="_bbp_allow_anonymous" name="_bbp_allow_anonymous" type="checkbox" id="_bbp_allow_anonymous" value="1" <?php checked( bbp_allow_anonymous( false ) ); ?> />
    103103    <label for="_bbp_allow_anonymous"><?php _e( 'Allow guest users without accounts to create topics and replies', 'bbpress' ); ?></label>
    104104
     
    276276?>
    277277
    278     <input id="_bbp_include_root" name="_bbp_include_root" type="checkbox" id="_bbp_include_root" value="1" <?php checked( true, get_option( '_bbp_include_root', true ) ); ?> />
     278    <input id="_bbp_include_root" name="_bbp_include_root" type="checkbox" id="_bbp_include_root" value="1" <?php checked( get_option( '_bbp_include_root', true ) ); ?> />
    279279    <label for="_bbp_include_root"><?php _e( 'Incude the Forum Base slug in your single forum item links', 'bbpress' ); ?></label>
    280280
  • branches/plugin/bbp-admin/importers/bbpress.php

    r3239 r3267  
    641641            <?php endif; ?>
    642642
    643             <input type="radio" name="step"<?php disabled( $this->is_integrated() ); ?> value="2"<?php checked( $radio, 'user' ); ?> id="step_user" />
     643            <input type="radio" name="step"<?php disabled( $this->is_integrated() ); ?> value="2"<?php checked( 'user', $radio ); ?> id="step_user" />
    644644            <label for="step_user"><?php _e( 'Migrate Users', 'bbpress' ); ?></label>
    645645
    646             <input type="radio" name="step" value="3"<?php checked( $radio, 'board' ); ?> id="step_board" />
     646            <input type="radio" name="step" value="3"<?php checked( 'board', $radio ); ?> id="step_board" />
    647647            <label for="step_board"><?php _e( 'Import Forums, Topics & Posts', 'bbpress' ); ?></label>
    648648
  • branches/plugin/bbp-includes/bbp-core-widgets.php

    r3243 r3267  
    561561        <p><label for="<?php echo $this->get_field_id( 'title'     ); ?>"><?php _e( 'Title:',                  'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title'     ); ?>" name="<?php echo $this->get_field_name( 'title'     ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
    562562        <p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php _e( 'Maximum topics to show:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_shown' ); ?>" name="<?php echo $this->get_field_name( 'max_shown' ); ?>" type="text" value="<?php echo $max_shown; ?>" /></label></p>
    563         <p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Show post date:',         'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php echo ($show_date == 'on') ? 'checked="checked"' : ''; ?>/></label></p>
     563        <p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Show post date:',         'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( 'on', $show_date ); ?> /></label></p>
    564564        <p>
    565565            <label for="<?php echo $this->get_field_id( 'pop_check' ); ?>"><?php _e( 'Popularity check:',  'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'pop_check' ); ?>" name="<?php echo $this->get_field_name( 'pop_check' ); ?>" type="text" value="<?php echo $pop_check; ?>" /></label>
     
    709709        <p><label for="<?php echo $this->get_field_id( 'title'     ); ?>"><?php _e( 'Title:',                   'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title'     ); ?>" name="<?php echo $this->get_field_name( 'title'     ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
    710710        <p><label for="<?php echo $this->get_field_id( 'max_shown' ); ?>"><?php _e( 'Maximum replies to show:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_shown' ); ?>" name="<?php echo $this->get_field_name( 'max_shown' ); ?>" type="text" value="<?php echo $max_shown; ?>" /></label></p>
    711         <p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Show post date:',          'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( $show_date, 'on' ); ?>/></label></p>
     711        <p><label for="<?php echo $this->get_field_id( 'show_date' ); ?>"><?php _e( 'Show post date:',          'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_date' ); ?>" name="<?php echo $this->get_field_name( 'show_date' ); ?>" <?php checked( 'on', $show_date ); ?> /></label></p>
    712712
    713713        <?php
  • branches/plugin/bbp-includes/bbp-reply-template.php

    r3265 r3267  
    17911791            $reply_revision = 1;
    17921792
    1793         return apply_filters( 'bbp_get_form_reply_log_edit', checked( true, $reply_revision, false ) );
     1793        return apply_filters( 'bbp_get_form_reply_log_edit', checked( $reply_revision, true, false ) );
    17941794    }
    17951795
  • branches/plugin/bbp-includes/bbp-topic-template.php

    r3266 r3267  
    30513051            $topic_revision = 1;
    30523052
    3053         return apply_filters( 'bbp_get_form_topic_log_edit', checked( true, $topic_revision, false ) );
     3053        return apply_filters( 'bbp_get_form_topic_log_edit', checked( $topic_revision, true, false ) );
    30543054    }
    30553055
  • branches/plugin/bbp-themes/bbp-twentyten/bbpress/form-user-login.php

    r3207 r3267  
    2525
    2626            <div class="bbp-remember-me">
    27                 <input type="checkbox" name="rememberme" value="forever" <?php checked( bbp_get_sanitize_val( 'rememberme', 'checkbox' ), true, true ); ?> id="rememberme" tabindex="<?php bbp_tab_index(); ?>" />
     27                <input type="checkbox" name="rememberme" value="forever" <?php checked( bbp_get_sanitize_val( 'rememberme', 'checkbox' ) ); ?> id="rememberme" tabindex="<?php bbp_tab_index(); ?>" />
    2828                <label for="rememberme"><?php _e( 'Keep me signed in', 'bbpress' ); ?></label>
    2929            </div>
Note: See TracChangeset for help on using the changeset viewer.