Changeset 2865 for trunk/bp-core/bp-core-catchuri.php
- Timestamp:
- 03/22/2010 12:28:41 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r2863 r2865 147 147 148 148 /* Remove everything from the URI up to the offset and take it from there. */ 149 for ( $i = 0; $i < $uri_offset; $i++ ) {149 for ( $i = 0; $i < $uri_offset; $i++ ) 150 150 unset( $bp_uri[$i] ); 151 }152 151 153 152 $current_component = $bp_uri[$uri_offset]; … … 209 208 */ 210 209 function bp_core_load_template( $templates ) { 211 global $ bp, $wpdb, $wp_query, $bp_unfiltered_uri, $bp_unfiltered_uri_offset;212 213 /* Determine if the root object WP page exists for this request ( is there an API function for this?)*/210 global $post, $bp, $wpdb, $wp_query, $bp_unfiltered_uri, $bp_unfiltered_uri_offset; 211 212 /* Determine if the root object WP page exists for this request (TODO: is there an API function for this?) */ 214 213 if ( !$page_exists = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_name = %s", $bp_unfiltered_uri[$bp_unfiltered_uri_offset] ) ) ) 215 214 return false; … … 221 220 } 222 221 223 $wp_query->queried_object = &get_post( $object_id ); 224 $wp_query->queried_object_id = $object_id; 222 /* Make the queried/post object an actual valid page */ 223 if ( !empty( $object_id ) ) { 224 $wp_query->queried_object = &get_post( $object_id ); 225 $wp_query->queried_object_id = $object_id; 226 227 $post = $wp_query->queried_object; 228 } 225 229 226 230 /* Fetch each template and add the php suffix */
Note: See TracChangeset
for help on using the changeset viewer.