diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-06-27 14:45:13 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-06-27 14:45:13 +0000 |
commit | f15216f53efcacc3d93636c3c5a7601af7bff4be (patch) | |
tree | 1ad4ff5d11911fd7cb3dfb0d847cb7b8a9824c45 /wp-includes/wpmu-functions.php | |
parent | bc96ad1ac715d2db115b24880fef67aae6b3903b (diff) | |
download | wordpress-mu-f15216f53efcacc3d93636c3c5a7601af7bff4be.tar.gz wordpress-mu-f15216f53efcacc3d93636c3c5a7601af7bff4be.tar.xz wordpress-mu-f15216f53efcacc3d93636c3c5a7601af7bff4be.zip |
Applied redirection patch from bug #27.
In blogs display, use $path if using subdirs
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@604 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/wpmu-functions.php')
-rw-r--r-- | wp-includes/wpmu-functions.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php index c85d654..376b9fc 100644 --- a/wp-includes/wpmu-functions.php +++ b/wp-includes/wpmu-functions.php @@ -780,25 +780,25 @@ function wpmu_get_cache( $key, $path ) { // wpmu admin functions function wpmu_admin_do_redirect( $url = '' ) { + $url = wpmu_admin_redirect_add_updated_param( $url ); if( isset( $_GET[ 'redirect' ] ) ) { if( substr( $_GET[ 'redirect' ], 0, 2 ) == 's_' ) { - header( "Location: {$url}?updated=true&action=blogs&s=". wp_specialchars( substr( $_GET[ 'redirect' ], 2 ) ) ); - die(); + $url .= "&action=blogs&s=". wp_specialchars( substr( $_GET[ 'redirect' ], 2 ) ); } } elseif( isset( $_POST[ 'redirect' ] ) ) { - $url = $_POST[ 'redirect' ]; - if( strpos( $url, 'updated=true' ) === false ) { - if( strpos( $url, '?' ) === true ) { - $url .= '&updated=true'; - } else { - $url .= '?updated=true'; - } + $url = wpmu_admin_redirect_add_updated_param( $_POST[ 'redirect' ] ); + } + header( "Location: {$url}" ); + die(); +} +function wpmu_admin_redirect_add_updated_param( $url = '' ) { + if( strpos( $url, 'updated=true' ) === false ) { + if( strpos( $url, '?' ) === false ) { + return $url . '?updated=true'; + } else { + return $url . '&updated=true'; } - header( "Location: {$url}" ); - die(); - } else { - header( "Location: {$url}?updated=true" ); - die(); + return $url; } } |