Skip to:
Content

bbPress.org

Ticket #2319: common-widgets.patch

File common-widgets.patch, 5.2 KB (added by alex-ye, 12 years ago)
  • widgets.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: \includes\common
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    161161        public function update( $new_instance, $old_instance ) {
    162162                $instance             = $old_instance;
    163163                $instance['title']    = strip_tags( $new_instance['title'] );
    164                 $instance['register'] = esc_url( $new_instance['register'] );
    165                 $instance['lostpass'] = esc_url( $new_instance['lostpass'] );
     164                $instance['register'] = esc_url_raw( $new_instance['register'] );
     165                $instance['lostpass'] = esc_url_raw( $new_instance['lostpass'] );
    166166
    167167                return $instance;
    168168        }
     
    837837                $instance              = $old_instance;
    838838                $instance['title']     = strip_tags( $new_instance['title'] );
    839839                $instance['order_by']  = strip_tags( $new_instance['order_by'] );
     840                $instance['parent_forum'] = (int) $new_instance['parent_forum'];
    840841                $instance['show_date'] = (bool) $new_instance['show_date'];
    841842                $instance['show_user'] = (bool) $new_instance['show_user'];
    842843                $instance['max_shown'] = (int) $new_instance['max_shown'];
    843844
    844845                // Force to any
    845                 if ( !empty( $instance['parent_forum'] ) || !is_numeric( $instance['parent_forum'] ) ) {
     846                if ( !empty( $instance['parent_forum'] ) && !is_numeric( $instance['parent_forum'] ) )
    846847                        $instance['parent_forum'] = 'any';
    847                 } else {
    848                         $instance['parent_forum'] = (int) $new_instance['parent_forum'];
    849                 }
    850848
    851849                return $instance;
    852850        }
     
    878876                        <small><?php _e( '"0" to show only root - "any" to show all', 'bbpress' ); ?></small>
    879877                </p>
    880878
    881                 <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', $settings['show_date'] ); ?> /></label></p>
    882                 <p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php _e( 'Show topic author:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_user' ); ?>" name="<?php echo $this->get_field_name( 'show_user' ); ?>" <?php checked( 'on', $settings['show_user'] ); ?> /></label></p>
     879                <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( true, $settings['show_date'] ); ?> value="1" /></label></p>
     880                <p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php _e( 'Show topic author:', 'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_user' ); ?>" name="<?php echo $this->get_field_name( 'show_user' ); ?>" <?php checked( true, $settings['show_user'] ); ?> value="1" /></label></p>
    883881
    884882                <p>
    885883                        <label for="<?php echo $this->get_field_id( 'order_by' ); ?>"><?php _e( 'Order By:',        'bbpress' ); ?></label>
     
    12241222
    12251223                <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 esc_attr( $settings['title']     ); ?>" /></label></p>
    12261224                <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 esc_attr( $settings['max_shown'] ); ?>" /></label></p>
    1227                 <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', $settings['show_date'] ); ?> /></label></p>
    1228                 <p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php _e( 'Show reply author:',       'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_user' ); ?>" name="<?php echo $this->get_field_name( 'show_user' ); ?>" <?php checked( 'on', $settings['show_user'] ); ?> /></label></p>
    1229  No newline at end of file
     1225                <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( true, $settings['show_date'] ); ?> value="1" /></label></p>
     1226                <p><label for="<?php echo $this->get_field_id( 'show_user' ); ?>"><?php _e( 'Show reply author:',       'bbpress' ); ?> <input type="checkbox" id="<?php echo $this->get_field_id( 'show_user' ); ?>" name="<?php echo $this->get_field_name( 'show_user' ); ?>" <?php checked( true, $settings['show_user'] ); ?> value="1" /></label></p>
     1227 No newline at end of file
    12301228
    12311229                <?php