Skip to:
Content

BuddyPress.org

Changeset 14148


Ignore:
Timestamp:
12/16/2025 03:59:38 PM (4 months ago)
Author:
espellcaste
Message:

WPCS - miscellaneous fixes to the BP_Activity_Activity class.

Props espellcaste.

See #9173
See #9174

Location:
trunk/src/bp-activity
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-template.php

    r14077 r14148  
    25972597 *
    25982598 * @since 2.0.0
    2599  * @since 2.8.0 Added $comment as a parameter.
     2599 * @since 2.8.0 Added `$comment` as a parameter.
    26002600 *
    26012601 * @param object|int $comment Object of the activity comment or activity comment ID. Usually unnecessary
     
    26102610     *
    26112611     * @since 2.0.0
    2612      * @since 2.8.0 Added $comment as a parameter.
    2613      *
    2614      * @param  object|int $comment Object of the activity comment or activity comment ID. Usually unnecessary
     2612     * @since 2.8.0 Added `$comment` as a parameter.
     2613     *
     2614     * @param object|int $comment Object of the activity comment or activity comment ID. Usually unnecessary
    26152615     *                             when used in activity comment loop.
    26162616     * @return int
     
    26572657         *
    26582658         * @since 2.0.0
    2659          *
    2660          * @param int $depth Depth for the current activity comment.
    2661          */
    2662         return apply_filters( 'bp_activity_get_comment_depth', $depth );
     2659         * @since 15.0.0 Added `$comment` as a parameter.
     2660         *
     2661         * @param int        $depth Depth for the current activity comment.
     2662         * @param object|int $comment Object of the activity comment or activity comment ID.
     2663         */
     2664        return apply_filters( 'bp_activity_get_comment_depth', $depth, $comment );
    26632665    }
    26642666
  • trunk/src/bp-activity/classes/class-bp-activity-activity.php

    r13988 r14148  
    162162    public function __construct( $id = false ) {
    163163        // Instantiate errors object.
    164         $this->errors = new WP_Error;
    165 
    166         if ( !empty( $id ) ) {
     164        $this->errors = new WP_Error();
     165
     166        if ( ! empty( $id ) ) {
    167167            $this->id = (int) $id;
    168168            $this->populate();
     
    239239        $bp = buddypress();
    240240
    241         $this->id                = apply_filters_ref_array( 'bp_activity_id_before_save',                array( $this->id,                &$this ) );
    242         $this->item_id           = apply_filters_ref_array( 'bp_activity_item_id_before_save',           array( $this->item_id,          &$this ) );
     241        $this->id                = apply_filters_ref_array( 'bp_activity_id_before_save', array( $this->id, &$this ) );
     242        $this->item_id           = apply_filters_ref_array( 'bp_activity_item_id_before_save', array( $this->item_id, &$this ) );
    243243        $this->secondary_item_id = apply_filters_ref_array( 'bp_activity_secondary_item_id_before_save', array( $this->secondary_item_id, &$this ) );
    244         $this->user_id           = apply_filters_ref_array( 'bp_activity_user_id_before_save',           array( $this->user_id,          &$this ) );
    245         $this->primary_link      = apply_filters_ref_array( 'bp_activity_primary_link_before_save',      array( $this->primary_link,      &$this ) );
    246         $this->component         = apply_filters_ref_array( 'bp_activity_component_before_save',         array( $this->component,        &$this ) );
    247         $this->type              = apply_filters_ref_array( 'bp_activity_type_before_save',              array( $this->type,              &$this ) );
    248         $this->action            = apply_filters_ref_array( 'bp_activity_action_before_save',            array( $this->action,            &$this ) );
    249         $this->content           = apply_filters_ref_array( 'bp_activity_content_before_save',           array( $this->content,          &$this ) );
    250         $this->date_recorded     = apply_filters_ref_array( 'bp_activity_date_recorded_before_save',     array( $this->date_recorded,    &$this ) );
    251         $this->hide_sitewide     = apply_filters_ref_array( 'bp_activity_hide_sitewide_before_save',     array( $this->hide_sitewide,    &$this ) );
    252         $this->mptt_left         = apply_filters_ref_array( 'bp_activity_mptt_left_before_save',         array( $this->mptt_left,        &$this ) );
    253         $this->mptt_right        = apply_filters_ref_array( 'bp_activity_mptt_right_before_save',        array( $this->mptt_right,        &$this ) );
    254         $this->is_spam           = apply_filters_ref_array( 'bp_activity_is_spam_before_save',           array( $this->is_spam,          &$this ) );
     244        $this->user_id           = apply_filters_ref_array( 'bp_activity_user_id_before_save', array( $this->user_id, &$this ) );
     245        $this->primary_link      = apply_filters_ref_array( 'bp_activity_primary_link_before_save', array( $this->primary_link, &$this ) );
     246        $this->component         = apply_filters_ref_array( 'bp_activity_component_before_save', array( $this->component, &$this ) );
     247        $this->type              = apply_filters_ref_array( 'bp_activity_type_before_save', array( $this->type, &$this ) );
     248        $this->action            = apply_filters_ref_array( 'bp_activity_action_before_save', array( $this->action, &$this ) );
     249        $this->content           = apply_filters_ref_array( 'bp_activity_content_before_save', array( $this->content, &$this ) );
     250        $this->date_recorded     = apply_filters_ref_array( 'bp_activity_date_recorded_before_save', array( $this->date_recorded, &$this ) );
     251        $this->hide_sitewide     = apply_filters_ref_array( 'bp_activity_hide_sitewide_before_save', array( $this->hide_sitewide, &$this ) );
     252        $this->mptt_left         = apply_filters_ref_array( 'bp_activity_mptt_left_before_save', array( $this->mptt_left, &$this ) );
     253        $this->mptt_right        = apply_filters_ref_array( 'bp_activity_mptt_right_before_save', array( $this->mptt_right, &$this ) );
     254        $this->is_spam           = apply_filters_ref_array( 'bp_activity_is_spam_before_save', array( $this->is_spam, &$this ) );
    255255
    256256        /**
     
    423423                8 => 'exclude',
    424424                9 => 'in',
    425                 10 => 'spam'
     425                10 => 'spam',
    426426            );
    427427
     
    460460
    461461        // Select conditions.
    462         $select_sql = "SELECT DISTINCT a.id";
    463 
    464         $from_sql   = " FROM {$bp->activity->table_name} a";
    465 
    466         $join_sql   = '';
     462        $select_sql = 'SELECT DISTINCT a.id';
     463
     464        $from_sql = " FROM {$bp->activity->table_name} a";
     465
     466        $join_sql = '';
    467467
    468468        // Where conditions.
     
    553553        // Searching.
    554554        if ( $r['search_terms'] ) {
    555             $search_terms_like = '%' . bp_esc_like( $r['search_terms'] ) . '%';
     555            $search_terms_like              = '%' . bp_esc_like( $r['search_terms'] ) . '%';
    556556            $where_conditions['search_sql'] = $wpdb->prepare( 'a.content LIKE %s', $search_terms_like );
    557557
     
    578578        }
    579579
    580         switch( $r['order_by'] ) {
    581             case 'id' :
    582             case 'user_id' :
    583             case 'component' :
    584             case 'type' :
    585             case 'action' :
    586             case 'content' :
    587             case 'primary_link' :
    588             case 'item_id' :
    589             case 'secondary_item_id' :
    590             case 'date_recorded' :
    591             case 'hide_sitewide' :
    592             case 'mptt_left' :
    593             case 'mptt_right' :
    594             case 'is_spam' :
     580        switch ( $r['order_by'] ) {
     581            case 'id':
     582            case 'user_id':
     583            case 'component':
     584            case 'type':
     585            case 'action':
     586            case 'content':
     587            case 'primary_link':
     588            case 'item_id':
     589            case 'secondary_item_id':
     590            case 'date_recorded':
     591            case 'hide_sitewide':
     592            case 'mptt_left':
     593            case 'mptt_right':
     594            case 'is_spam':
    595595                break;
    596596
    597             default :
     597            default:
    598598                $r['order_by'] = 'date_recorded';
    599599                break;
     
    603603        // Hide Hidden Items?
    604604        if ( ! $r['show_hidden'] ) {
    605             $where_conditions['hidden_sql'] = "a.hide_sitewide = 0";
     605            $where_conditions['hidden_sql'] = 'a.hide_sitewide = 0';
    606606        }
    607607
    608608        // Exclude specified items.
    609609        if ( ! empty( $r['exclude'] ) ) {
    610             $exclude = implode( ',', wp_parse_id_list( $r['exclude'] ) );
     610            $exclude                     = implode( ',', wp_parse_id_list( $r['exclude'] ) );
    611611            $where_conditions['exclude'] = "a.id NOT IN ({$exclude})";
    612612        }
     
    614614        // The specific ids to which you want to limit the query.
    615615        if ( ! empty( $r['in'] ) ) {
    616             $in = implode( ',', wp_parse_id_list( $r['in'] ) );
     616            $in                     = implode( ',', wp_parse_id_list( $r['in'] ) );
    617617            $where_conditions['in'] = "a.id IN ({$in})";
    618618        }
     
    651651        // Build the excluded type sql part.
    652652        if ( ! empty( $excluded_types ) ) {
    653             $not_in = "'" . implode( "', '", esc_sql( $excluded_types ) ) . "'";
     653            $not_in                             = "'" . implode( "', '", esc_sql( $excluded_types ) ) . "'";
    654654            $where_conditions['excluded_types'] = "a.type NOT IN ({$not_in})";
    655655        }
     
    685685
    686686        // Sanitize page and per_page parameters.
    687         $page     = absint( $r['page']     );
     687        $page     = absint( $r['page'] );
    688688        $per_page = absint( $r['per_page'] );
    689689
     
    705705         * @since 2.0.0
    706706         *
    707          * @param bool                 $value Whether to use legacy structure or not.
    708          * @param BP_Activity_Activity $value Current method being called.
    709          * @param array                $r     Parsed arguments passed into method.
     707         * @param bool   $use_legacy_activity_query Whether to use legacy structure or not.
     708         * @param string $method Current method being called.
     709         * @param array  $r     Parsed arguments passed into method.
    710710         */
    711711        if ( ! $only_get_count && apply_filters( 'bp_use_legacy_activity_query', false, __METHOD__, $r ) ) {
    712712
    713713            // Legacy queries joined against the user table.
    714             $select_sql = "SELECT DISTINCT a.*, u.user_email, u.user_nicename, u.user_login, u.display_name";
     714            $select_sql = 'SELECT DISTINCT a.*, u.user_email, u.user_nicename, u.user_login, u.display_name';
    715715            $from_sql   = " FROM {$bp->activity->table_name} a LEFT JOIN {$wpdb->users} u ON a.user_id = u.ID";
    716716
    717717            if ( ! empty( $page ) && ! empty( $per_page ) ) {
    718                 $pag_sql = $wpdb->prepare( "LIMIT %d, %d", absint( ( $page - 1 ) * $per_page ), $per_page );
     718                $pag_sql = $wpdb->prepare( 'LIMIT %d, %d', absint( ( $page - 1 ) * $per_page ), $per_page );
    719719
    720720                /** This filter is documented in bp-activity/bp-activity-classes.php */
     
    757757                // We query for $per_page + 1 items in order to
    758758                // populate the has_more_items flag.
    759                 $activity_ids_sql .= $wpdb->prepare( " LIMIT %d, %d", absint( ( $page - 1 ) * $per_page ), $per_page + 1 );
     759                $activity_ids_sql .= $wpdb->prepare( ' LIMIT %d, %d', absint( ( $page - 1 ) * $per_page ), $per_page + 1 );
    760760            }
    761761
     
    12601260        );
    12611261
    1262         return BP_Activity_Activity::get( $max, $page, $per_page, $sort, false, false, $display_comments, false, false, $activity_ids );
     1262        return self::get( $max, $page, $per_page, $sort, false, false, $display_comments, false, false, $activity_ids );
    12631263    }
    12641264
     
    14261426        // ID.
    14271427        if ( ! empty( $r['id'] ) ) {
    1428             $where_args[] = $wpdb->prepare( "id = %d", $r['id'] );
     1428            $where_args[] = $wpdb->prepare( 'id = %d', $r['id'] );
    14291429        }
    14301430
    14311431        // User ID.
    14321432        if ( ! empty( $r['user_id'] ) ) {
    1433             $where_args[] = $wpdb->prepare( "user_id = %d", $r['user_id'] );
     1433            $where_args[] = $wpdb->prepare( 'user_id = %d', $r['user_id'] );
    14341434        }
    14351435
    14361436        // Action.
    14371437        if ( ! empty( $r['action'] ) ) {
    1438             $where_args[] = $wpdb->prepare( "action = %s", $r['action'] );
     1438            $where_args[] = $wpdb->prepare( 'action = %s', $r['action'] );
    14391439        }
    14401440
    14411441        // Content.
    14421442        if ( ! empty( $r['content'] ) ) {
    1443             $where_args[] = $wpdb->prepare( "content = %s", $r['content'] );
     1443            $where_args[] = $wpdb->prepare( 'content = %s', $r['content'] );
    14441444        }
    14451445
    14461446        // Component.
    14471447        if ( ! empty( $r['component'] ) ) {
    1448             $where_args[] = $wpdb->prepare( "component = %s", $r['component'] );
     1448            $where_args[] = $wpdb->prepare( 'component = %s', $r['component'] );
    14491449        }
    14501450
    14511451        // Type.
    14521452        if ( ! empty( $r['type'] ) ) {
    1453             $where_args[] = $wpdb->prepare( "type = %s", $r['type'] );
     1453            $where_args[] = $wpdb->prepare( 'type = %s', $r['type'] );
    14541454        }
    14551455
    14561456        // Primary Link.
    14571457        if ( ! empty( $r['primary_link'] ) ) {
    1458             $where_args[] = $wpdb->prepare( "primary_link = %s", $r['primary_link'] );
     1458            $where_args[] = $wpdb->prepare( 'primary_link = %s', $r['primary_link'] );
    14591459        }
    14601460
    14611461        // Item ID.
    14621462        if ( ! empty( $r['item_id'] ) ) {
    1463             $where_args[] = $wpdb->prepare( "item_id = %d", $r['item_id'] );
     1463            $where_args[] = $wpdb->prepare( 'item_id = %d', $r['item_id'] );
    14641464        }
    14651465
    14661466        // Secondary item ID.
    14671467        if ( ! empty( $r['secondary_item_id'] ) ) {
    1468             $where_args[] = $wpdb->prepare( "secondary_item_id = %d", $r['secondary_item_id'] );
     1468            $where_args[] = $wpdb->prepare( 'secondary_item_id = %d', $r['secondary_item_id'] );
    14691469        }
    14701470
    14711471        // Date Recorded.
    14721472        if ( ! empty( $r['date_recorded'] ) ) {
    1473             $where_args[] = $wpdb->prepare( "date_recorded = %s", $r['date_recorded'] );
     1473            $where_args[] = $wpdb->prepare( 'date_recorded = %s', $r['date_recorded'] );
    14741474        }
    14751475
    14761476        // Hidden sitewide.
    14771477        if ( ! empty( $r['hide_sitewide'] ) ) {
    1478             $where_args[] = $wpdb->prepare( "hide_sitewide = %d", $r['hide_sitewide'] );
     1478            $where_args[] = $wpdb->prepare( 'hide_sitewide = %d', $r['hide_sitewide'] );
    14791479        }
    14801480
     
    15251525
    15261526            // Delete all activity meta entries for activity items.
    1527             BP_Activity_Activity::delete_activity_meta_entries( $activity_ids );
     1527            self::delete_activity_meta_entries( $activity_ids );
    15281528
    15291529            // Setup empty array for comments.
     
    15341534
    15351535                // Attempt to delete comments.
    1536                 $comments = BP_Activity_Activity::delete( array(
    1537                     'type'    => 'activity_comment',
    1538                     'item_id' => $activity_id
    1539                 ) );
     1536                $comments = self::delete(
     1537                    array(
     1538                        'type'    => 'activity_comment',
     1539                        'item_id' => $activity_id,
     1540                    )
     1541                );
    15401542
    15411543                // Merge IDs together.
     
    16241626        // Now fetch the activity comments and parse them into the correct position in the activities array.
    16251627        foreach ( (array) $activities as $activity ) {
    1626             $top_level_parent_id = 'activity_comment' == $activity->type ? $activity->item_id : 0;
    1627             $activity_comments[$activity->id] = BP_Activity_Activity::get_activity_comments( $activity->id, $activity->mptt_left, $activity->mptt_right, $spam, $top_level_parent_id );
     1628            $top_level_parent_id                = 'activity_comment' == $activity->type ? $activity->item_id : 0;
     1629            $activity_comments[ $activity->id ] = self::get_activity_comments( $activity->id, $activity->mptt_left, $activity->mptt_right, $spam, $top_level_parent_id );
    16281630        }
    16291631
    16301632        // Merge the comments with the activity items.
    16311633        foreach ( (array) $activities as $key => $activity ) {
    1632             if ( isset( $activity_comments[$activity->id] ) ) {
    1633                 $activities[$key]->children = $activity_comments[$activity->id];
     1634            if ( isset( $activity_comments[ $activity->id ] ) ) {
     1635                $activities[ $key ]->children = $activity_comments[ $activity->id ];
    16341636            }
    16351637        }
     
    16761678            // Select the user's fullname with the query.
    16771679            if ( bp_is_active( 'xprofile' ) ) {
    1678                 $fullname_select = ", pd.value as user_fullname";
    1679                 $fullname_from = ", {$bp->profile->table_name_data} pd ";
    1680                 $fullname_where = "AND pd.user_id = a.user_id AND pd.field_id = 1";
     1680                $fullname_select = ', pd.value as user_fullname';
     1681                $fullname_from   = ", {$bp->profile->table_name_data} pd ";
     1682                $fullname_where  = 'AND pd.user_id = a.user_id AND pd.field_id = 1';
    16811683
    16821684                // Prevent debug errors.
     
    17421744                if ( isset( $ref[ $d->secondary_item_id ] ) ) {
    17431745                    $ref[ $d->secondary_item_id ]->children[ $d->id ] = $d;
    1744                     $ref[ $d->id ] =& $ref[ $d->secondary_item_id ]->children[ $d->id ];
     1746                    $ref[ $d->id ]                                    =& $ref[ $d->secondary_item_id ]->children[ $d->id ];
    17451747
    17461748                    // If we don't have a reference on the parent, put in the root level.
    17471749                } else {
    17481750                    $comments[ $d->id ] = $d;
    1749                     $ref[ $d->id ] =& $comments[ $d->id ];
     1751                    $ref[ $d->id ]      =& $comments[ $d->id ];
    17501752                }
    17511753            }
     
    17531755            // Calculate depth for each item.
    17541756            foreach ( $ref as &$r ) {
    1755                 $depth = 1;
     1757                $depth     = 1;
    17561758                $parent_id = $r->secondary_item_id;
    17571759
    17581760                while ( $parent_id !== $r->item_id ) {
    1759                     $depth++;
     1761                    ++$depth;
    17601762
    17611763                    // When display_comments=stream, the parent comment may not be part of the
     
    17721774                                $parent_id = $direct_parent->secondary_item_id;
    17731775                            }
    1774 
    17751776                        } else {
    17761777                            // Something went wrong.  Short-circuit the depth calculation.
     
    18221823
    18231824        // Get all descendants of this node.
    1824         $comments    = BP_Activity_Activity::get_child_comments( $parent_id );
     1825        $comments    = self::get_child_comments( $parent_id );
    18251826        $descendants = wp_list_pluck( $comments, 'id' );
    18261827
    18271828        // Loop the descendants and recalculate the left and right values.
    18281829        foreach ( (array) $descendants as $descendant_id ) {
    1829             $right = BP_Activity_Activity::rebuild_activity_comment_tree( $descendant_id, $right );
     1830            $right = self::rebuild_activity_comment_tree( $descendant_id, $right );
    18301831        }
    18311832
     
    19011902
    19021903        for ( $i = 0, $count = count( $activities ); $i < $count; ++$i ) {
    1903             $title                            = explode( '<span', $activities[$i]['content'] );
    1904             $activity_feed[$i]['title']       = wp_strip_all_tags( $title[0] );
    1905             $activity_feed[$i]['link']        = $activities[$i]['primary_link'];
    1906             $activity_feed[$i]['description'] = @sprintf( $activities[$i]['content'], '' );
    1907             $activity_feed[$i]['pubdate']     = $activities[$i]['date_recorded'];
     1904            $title                              = explode( '<span', $activities[ $i ]['content'] );
     1905            $activity_feed[ $i ]['title']       = wp_strip_all_tags( $title[0] );
     1906            $activity_feed[ $i ]['link']        = $activities[ $i ]['primary_link'];
     1907            $activity_feed[ $i ]['description'] = @sprintf( $activities[ $i ]['content'], '' );
     1908            $activity_feed[ $i ]['pubdate']     = $activities[ $i ]['date_recorded'];
    19081909        }
    19091910
     
    19441945
    19451946        // Build IN operator sql syntax.
    1946         if ( count( $items_prepared ) )
     1947        if ( count( $items_prepared ) ) {
    19471948            return sprintf( '%s IN ( %s )', trim( $field ), implode( ',', $items_prepared ) );
    1948         else
     1949        } else {
    19491950            return false;
     1951        }
    19501952    }
    19511953
     
    19811983        $filter_sql = array();
    19821984
    1983         if ( !empty( $filter_array['user_id'] ) ) {
    1984             $user_sql = BP_Activity_Activity::get_in_operator_sql( 'a.user_id', $filter_array['user_id'] );
    1985             if ( !empty( $user_sql ) )
     1985        if ( ! empty( $filter_array['user_id'] ) ) {
     1986            $user_sql = self::get_in_operator_sql( 'a.user_id', $filter_array['user_id'] );
     1987            if ( ! empty( $user_sql ) ) {
    19861988                $filter_sql[] = $user_sql;
    1987         }
    1988 
    1989         if ( !empty( $filter_array['object'] ) ) {
    1990             $object_sql = BP_Activity_Activity::get_in_operator_sql( 'a.component', $filter_array['object'] );
    1991             if ( !empty( $object_sql ) )
     1989            }
     1990        }
     1991
     1992        if ( ! empty( $filter_array['object'] ) ) {
     1993            $object_sql = self::get_in_operator_sql( 'a.component', $filter_array['object'] );
     1994            if ( ! empty( $object_sql ) ) {
    19921995                $filter_sql[] = $object_sql;
    1993         }
    1994 
    1995         if ( !empty( $filter_array['action'] ) ) {
    1996             $action_sql = BP_Activity_Activity::get_in_operator_sql( 'a.type', $filter_array['action'] );
    1997             if ( ! empty( $action_sql ) )
     1996            }
     1997        }
     1998
     1999        if ( ! empty( $filter_array['action'] ) ) {
     2000            $action_sql = self::get_in_operator_sql( 'a.type', $filter_array['action'] );
     2001            if ( ! empty( $action_sql ) ) {
    19982002                $filter_sql[] = $action_sql;
    1999         }
    2000 
    2001         if ( !empty( $filter_array['primary_id'] ) ) {
    2002             $pid_sql = BP_Activity_Activity::get_in_operator_sql( 'a.item_id', $filter_array['primary_id'] );
    2003             if ( !empty( $pid_sql ) )
     2003            }
     2004        }
     2005
     2006        if ( ! empty( $filter_array['primary_id'] ) ) {
     2007            $pid_sql = self::get_in_operator_sql( 'a.item_id', $filter_array['primary_id'] );
     2008            if ( ! empty( $pid_sql ) ) {
    20042009                $filter_sql[] = $pid_sql;
    2005         }
    2006 
    2007         if ( !empty( $filter_array['secondary_id'] ) ) {
    2008             $sid_sql = BP_Activity_Activity::get_in_operator_sql( 'a.secondary_item_id', $filter_array['secondary_id'] );
    2009             if ( !empty( $sid_sql ) )
     2010            }
     2011        }
     2012
     2013        if ( ! empty( $filter_array['secondary_id'] ) ) {
     2014            $sid_sql = self::get_in_operator_sql( 'a.secondary_item_id', $filter_array['secondary_id'] );
     2015            if ( ! empty( $sid_sql ) ) {
    20102016                $filter_sql[] = $sid_sql;
     2017            }
    20112018        }
    20122019
    20132020        if ( ! empty( $filter_array['offset'] ) ) {
    2014             $sid_sql = absint( $filter_array['offset'] );
     2021            $sid_sql      = absint( $filter_array['offset'] );
    20152022            $filter_sql[] = "a.id >= {$sid_sql}";
    20162023        }
    20172024
    20182025        if ( ! empty( $filter_array['offset_lower'] ) ) {
    2019             $sid_sql = absint( $filter_array['offset_lower'] );
     2026            $sid_sql      = absint( $filter_array['offset_lower'] );
    20202027            $filter_sql[] = "a.id <= {$sid_sql}";
    20212028        }
     
    20302037        }
    20312038
    2032         if ( empty( $filter_sql ) )
     2039        if ( empty( $filter_sql ) ) {
    20332040            return false;
     2041        }
    20342042
    20352043        return join( ' AND ', $filter_sql );
Note: See TracChangeset for help on using the changeset viewer.