- Timestamp:
- 11/13/2021 06:40:37 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-members-invitations-template.php
r13108 r13147 185 185 186 186 // Sort order direction. 187 $orders = array( 'ASC', 'DESC' ); 188 if ( ! empty( $_GET['sort_order'] ) && in_array( $_GET['sort_order'], $orders ) ) { 187 if ( ! empty( $_GET['sort_order'] ) ) { 189 188 $r['sort_order'] = $_GET['sort_order']; 190 } else {191 $r['sort_order'] = in_array( $r['sort_order'], $orders ) ? $r['sort_order'] : 'DESC';192 189 } 193 190 … … 196 193 $this->pag_page = bp_sanitize_pagination_arg( $this->pag_arg, $r['page'] ); 197 194 $this->pag_num = bp_sanitize_pagination_arg( 'num', $r['per_page'] ); 195 $this->sort_order = bp_esc_sql_order( $r['sort_order'] ); 198 196 $this->user_id = $r['user_id']; 199 197 $this->search_terms = $r['search_terms']; 200 198 $this->order_by = $r['order_by']; 201 $this->sort_order = $r['sort_order'];202 199 $this->query_vars = array( 203 200 'id' => $r['id'], … … 253 250 */ 254 251 public function has_invitations() { 255 if ( $this->current_invitation_count ) { 256 return true; 257 } 258 259 return false; 252 return ! empty( $this->current_invitation_count ); 260 253 } 261 254
Note: See TracChangeset
for help on using the changeset viewer.