summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-11-16 10:48:07 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-11-16 10:48:07 +0000
commit32073e7f2d49bed8cd3776f5b257dfaa6ba57f73 (patch)
tree4b4b19ff08ebadbf971be208291d9e60bb932486
parenta58e68f1fc7ee42c416a3fbe72ec32742f28f586 (diff)
downloadwordpress-mu-32073e7f2d49bed8cd3776f5b257dfaa6ba57f73.tar.gz
wordpress-mu-32073e7f2d49bed8cd3776f5b257dfaa6ba57f73.tar.xz
wordpress-mu-32073e7f2d49bed8cd3776f5b257dfaa6ba57f73.zip
Backing out 1144
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1150 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-admin/menu.php9
-rw-r--r--wp-admin/wpmu-blogs.php2
-rw-r--r--wp-login.php4
3 files changed, 6 insertions, 9 deletions
diff --git a/wp-admin/menu.php b/wp-admin/menu.php
index 81ce496..743ea00 100644
--- a/wp-admin/menu.php
+++ b/wp-admin/menu.php
@@ -4,9 +4,6 @@
// Menu item name
// The minimum level the user needs to access the item: between 0 and 10
// The URL of the item's file
-
-$schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
-
$menu[0] = array(__('Dashboard'), 'read', 'index.php');
if (strpos($_SERVER['REQUEST_URI'], 'edit-pages.php') !== false)
@@ -163,19 +160,19 @@ if (! user_can_access_admin_page()) {
$blogs = get_blogs_of_user( $user_ID );
if ( empty($blogs) || $blogs == false ) { // If user haven't any blog
update_usermeta( $user_ID, 'wp_1_capabilities', array('subscriber' => true)); // Add subscriber permission for first blog.
- wp_redirect( $schema . $current_site->domain . $current_site->path. 'wp-admin/' );
+ wp_redirect( 'http://' . $current_site->domain . $current_site->path. 'wp-admin/' );
exit();
}
foreach ( (array) $blogs as $blog ) {
if ( $blog->userblog_id == $newblog->blog_id ) {
- wp_redirect( $schema . $newblog->domain . $newblog->path . 'wp-admin/' );
+ wp_redirect( 'http://' . $newblog->domain . $newblog->path . 'wp-admin/' );
exit();
}
}
$blog = $blogs[0]; // Take the first blog...
- wp_redirect( $schema . $blog->domain . $blog->path. 'wp-admin/' );
+ wp_redirect( 'http://' . $blog->domain . $blog->path. 'wp-admin/' );
exit();
}
}
diff --git a/wp-admin/wpmu-blogs.php b/wp-admin/wpmu-blogs.php
index 56335c0..6cc07e6 100644
--- a/wp-admin/wpmu-blogs.php
+++ b/wp-admin/wpmu-blogs.php
@@ -518,7 +518,7 @@ switch( $_GET['action'] ) {
case 'control_backend':
?>
<td valign="top">
- <?php echo "<a href='". $schema . $blog['domain'] . $blog['path'] . "wp-admin/' class='edit'>" . __('Backend') . "</a>"; ?>
+ <?php echo "<a href='http://" . $blog['domain'] . $blog['path'] . "wp-admin/' class='edit'>" . __('Backend') . "</a>"; ?>
</td>
<?php
break;
diff --git a/wp-login.php b/wp-login.php
index 87f13df..9eacdb0 100644
--- a/wp-login.php
+++ b/wp-login.php
@@ -11,11 +11,11 @@ nocache_headers();
header('Content-Type: '.get_bloginfo('html_type').'; charset='.get_bloginfo('charset'));
-$schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
if ( defined('RELOCATE') ) { // Move flag is set
if ( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != $_SERVER['PHP_SELF']) )
$_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] );
+ $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://';
if ( dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_option('siteurl') )
update_option('siteurl', dirname($schema . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );
}
@@ -270,7 +270,7 @@ default:
login_header(__('Login'));
?>
-<form name="loginform" id="loginform" action="<?php echo $schema . $current_blog->domain . $current_blog->path ?>wp-login.php" method="post">
+<form name="loginform" id="loginform" action="http://<?php echo $current_blog->domain . $current_blog->path ?>wp-login.php" method="post">
<?php if ( !in_array( $_GET['checkemail'], array('confirm', 'newpass') ) ) : ?>
<p>
<label><?php _e('Username:') ?><br />