Changeset 2946 for trunk/bp-activity/bp-activity-classes.php
- Timestamp:
- 04/21/2010 11:34:12 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-activity/bp-activity-classes.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-classes.php
r2919 r2946 35 35 $this->component = $row->component; 36 36 $this->type = $row->type; 37 $this->action = $row-> type;37 $this->action = $row->action; 38 38 $this->content = $row->content; 39 39 $this->date_recorded = $row->date_recorded; … … 98 98 $where_conditions = array(); 99 99 100 /* Filtering */ 101 if ( $filter && $filter_sql = BP_Activity_Activity::get_filter_sql( $filter ) ) 102 $where_conditions['filter_sql'] = $filter_sql; 103 104 /* Sorting */ 105 if ( $sort != 'ASC' && $sort != 'DESC' ) 106 $sort = 'DESC'; 107 108 /* Hide Hidden Items? */ 109 if ( !$show_hidden ) 110 $where_conditions['hidden_sql'] = "a.hide_sitewide = 0"; 111 112 /* Alter the query based on whether we want to show activity item comments in the stream like normal comments or threaded below the activity */ 113 if ( !$display_comments || 'threaded' == $display_comments ) { 114 $where_conditions[] = "a.type != 'activity_comment'"; 115 } 116 117 $where_sql = 'WHERE ' . join( ' AND ', $where_conditions ); 118 100 119 /* Searching */ 101 120 if ( $search_terms ) { 102 121 $search_terms = $wpdb->escape( $search_terms ); 103 $where_conditions['search_sql'] = "a.content LIKE '%%" . like_escape( $search_terms ) . "%%'"; 104 } 105 106 /* Filtering */ 107 if ( $filter && $filter_sql = BP_Activity_Activity::get_filter_sql( $filter ) ) 108 $where_conditions['filter_sql'] = $filter_sql; 109 110 /* Sorting */ 111 if ( $sort != 'ASC' && $sort != 'DESC' ) 112 $sort = 'DESC'; 113 114 /* Hide Hidden Items? */ 115 if ( !$show_hidden ) 116 $where_conditions['hidden_sql'] = "a.hide_sitewide = 0"; 117 118 /* Alter the query based on whether we want to show activity item comments in the stream like normal comments or threaded below the activity */ 119 if ( !$display_comments || 'threaded' == $display_comments ) { 120 $where_conditions[] = "a.type != 'activity_comment'"; 121 } 122 123 $where_sql = 'WHERE ' . join( ' AND ', $where_conditions ); 122 123 if ( !empty( $filter['user_id'] ) ) 124 $where_sql .= ' OR '; 125 else if ( !empty( $where_conditions ) ) 126 $where_sql .= ' AND '; 127 128 $where_sql .= "a.content LIKE '%%" . like_escape( $search_terms ) . "%%'"; 129 } 124 130 125 131 if ( $per_page && $page ) {
Note: See TracChangeset
for help on using the changeset viewer.