Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/10/2011 06:34:48 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Remove superfluous isset check on $_REQUEST, and clean up $max check in bp_has_members()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-template.php

    r4092 r4093  
    276276        // Pass a filter if ?s= is set.
    277277        if ( is_null( $search_terms ) ) {
    278                 if ( isset( $_REQUEST['s'] ) && !empty( $_REQUEST['s'] ) )
     278                if ( !empty( $_REQUEST['s'] ) )
    279279                        $search_terms = $_REQUEST['s'];
    280280                else
    … …  
    282282        }
    283283
    284         if ( $max ) {
    285                 if ( $per_page > $max )
    286                         $per_page = $max;
    287         }
     284        // Set per_page to max if max is larger than per_page
     285        if ( !empty( $max ) && ( $per_page > $max ) )
     286                $per_page = $max;
    288287
    289288        // Make sure we return no members if we looking at friendship requests and there are none.
Note: See TracChangeset for help on using the changeset viewer.