Changeset 9414
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-notifications/bp-notifications-template.php
r9352 r9414 283 283 // Overrides 284 284 285 // Set which pagination page286 if ( isset( $_GET[ $r['page_arg'] ] ) ) {287 $r['page'] = intval( $_GET[ $r['page_arg'] ] );288 }289 290 // Set the number to show per page291 if ( isset( $_GET['num'] ) ) {292 $r['per_page'] = intval( $_GET['num'] );293 } else {294 $r['per_page'] = intval( $r['per_page'] );295 }296 297 285 // Sort order direction 298 286 $orders = array( 'ASC', 'DESC' ); … … 304 292 305 293 // Setup variables 306 $this->pag_page = $r['page']; 307 $this->pag_num = $r['per_page']; 294 $this->pag_arg = sanitize_key( $r['page_arg'] ); 295 $this->pag_page = bp_sanitize_pagination_arg( $this->pag_arg, $r['page'] ); 296 $this->pag_num = bp_sanitize_pagination_arg( 'num', $r['per_page'] ); 308 297 $this->user_id = $r['user_id']; 309 298 $this->is_new = $r['is_new']; 310 299 $this->search_terms = $r['search_terms']; 311 $this->page_arg = $r['page_arg'];312 300 $this->order_by = $r['order_by']; 313 301 $this->sort_order = $r['sort_order']; … … 339 327 340 328 $this->pag_links = paginate_links( array( 341 'base' => add_query_arg( $this->pag e_arg, '%#%' ),329 'base' => add_query_arg( $this->pag_arg, '%#%' ), 342 330 'format' => '', 343 331 'total' => ceil( (int) $this->total_notification_count / (int) $this->pag_num ),
Note: See TracChangeset
for help on using the changeset viewer.