- Timestamp:
- 11/13/2021 06:40:37 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/classes/class-bp-notifications-template.php
r13108 r13147 176 176 177 177 // Sort order direction. 178 $orders = array( 'ASC', 'DESC' ); 179 if ( ! empty( $_GET['sort_order'] ) && in_array( $_GET['sort_order'], $orders, true ) ) { 178 if ( ! empty( $_GET['sort_order'] ) ) { 180 179 $r['sort_order'] = $_GET['sort_order']; 181 } else {182 $r['sort_order'] = in_array( $r['sort_order'], $orders ) ? $r['sort_order'] : 'DESC';183 180 } 184 181 … … 187 184 $this->pag_page = bp_sanitize_pagination_arg( $this->pag_arg, $r['page'] ); 188 185 $this->pag_num = bp_sanitize_pagination_arg( 'num', $r['per_page'] ); 186 $this->sort_order = bp_esc_sql_order( $r['sort_order'] ); 189 187 $this->user_id = $r['user_id']; 190 188 $this->is_new = $r['is_new']; 191 189 $this->search_terms = $r['search_terms']; 192 190 $this->order_by = $r['order_by']; 193 $this->sort_order = $r['sort_order'];194 191 $this->query_vars = array( 195 192 'id' => $r['id'],
Note: See TracChangeset
for help on using the changeset viewer.