Changeset 1715 for trunk/bp-core/bp-core-catchuri.php
- Timestamp:
- 08/27/2009 07:48:54 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r1714 r1715 38 38 return false; 39 39 } 40 40 41 41 if ( strpos( $_SERVER['REQUEST_URI'], 'wp-load.php' ) ) 42 42 $path = bp_core_referrer(); … … 50 50 $noget = substr( $path, 0, strpos( $path, '?' ) ); 51 51 if ( $noget != '' ) $path = $noget; 52 52 53 53 /* Fetch the current URI and explode each part seperated by '/' into an array */ 54 54 $bp_uri = explode( "/", $path ); 55 56 if ( defined( 'BP_ENABLE_MULTIBLOG' ) ) { 55 56 /* Loop and remove empties */ 57 for ( $i = 0; $i <= count( $bp_uri ); $i++ ) 58 if ( empty( $bp_uri[$i] ) ) unset( $bp_uri[$i] ); 59 60 if ( defined( 'BP_ENABLE_MULTIBLOG' ) || 1 != BP_ROOT_BLOG ) { 57 61 /* If we are running BuddyPress on any blog, not just a root blog, we need to first 58 62 shift off the blog name if we are running a subdirectory install of WPMU. */ … … 60 64 array_shift( $bp_uri ); 61 65 } 62 63 /* Take empties off the end of complete URI */ 64 if ( empty( $bp_uri[count($bp_uri) - 1] ) ) 65 array_pop( $bp_uri ); 66 67 /* Take empties off the start of complete URI */ 68 if ( empty( $bp_uri[0] ) ) 69 array_shift( $bp_uri ); 70 66 71 67 /* Get total URI segment count */ 72 68 $bp_uri_count = count( $bp_uri ) - 1; … … 152 148 $action_variables = array_merge( array(), $action_variables ); 153 149 154 //var_dump($current_component, $current_action, $action_variables); 150 //var_dump($current_component, $current_action, $action_variables); die; 155 151 } 156 152 add_action( 'plugins_loaded', 'bp_core_set_uri_globals', 3 ); … … 175 171 176 172 $bp_path = $pages; 177 173 178 174 if ( !bp_is_blog_page() ) { 179 175 remove_action( 'template_redirect', 'redirect_canonical' );
Note: See TracChangeset
for help on using the changeset viewer.