Changeset 9372 for trunk/src/bp-activity/bp-activity-classes.php
- Timestamp:
- 01/19/2015 06:14:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-classes.php
r9366 r9372 319 319 } 320 320 321 $ defaults =array(321 $r = wp_parse_args( $args, array( 322 322 'page' => 1, // The current page 323 323 'per_page' => 25, // Activity items per page … … 337 337 'update_meta_cache' => true, 338 338 'count_total' => false, 339 ); 340 $r = wp_parse_args( $args, $defaults ); 339 ) ); 341 340 342 341 // Select conditions … … 360 359 if ( ! empty( $scope_query['sql'] ) ) { 361 360 $where_conditions['scope_query_sql'] = $scope_query['sql']; 362 363 // No matches, so we should alter the SQL statement to match nothing364 } else {365 $where_conditions['scope_no_results'] = '0 = 1';366 361 } 367 362 … … 370 365 $r = self::array_replace_recursive( $r, $scope_query['override'] ); 371 366 } 367 372 368 // Advanced filtering 373 369 } elseif ( ! empty( $r['filter_query'] ) ) { 374 370 $filter_query = new BP_Activity_Query( $r['filter_query'] ); 375 if ( $sql = $filter_query->get_sql() ) { 371 $sql = $filter_query->get_sql(); 372 if ( ! empty( $sql ) ) { 376 373 $where_conditions['filter_query_sql'] = $sql; 377 374 } … … 403 400 404 401 // Hide Hidden Items? 405 if ( ! $r['show_hidden'] ) 402 if ( ! $r['show_hidden'] ) { 406 403 $where_conditions['hidden_sql'] = "a.hide_sitewide = 0"; 404 } 407 405 408 406 // Exclude specified items … … 616 614 617 615 if ( !empty( $r['max'] ) ) { 618 if ( (int) $total_activities > (int) $r['max'] ) 616 if ( (int) $total_activities > (int) $r['max'] ) { 619 617 $total_activities = $r['max']; 618 } 620 619 } 621 620
Note: See TracChangeset
for help on using the changeset viewer.