Changeset 1144 for trunk/wp-admin

Show
Ignore:
Timestamp:
11/14/07 18:04:31 (1 year ago)
Author:
donncha
Message:

Allow login via a secure login form

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/menu.php

    r1139 r1144  
    55// The minimum level the user needs to access the item: between 0 and 10 
    66// The URL of the item's file 
     7 
     8$schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 
     9 
    710$menu[0] = array(__('Dashboard'), 'read', 'index.php'); 
    811 
     
    161164                        if ( empty($blogs) || $blogs == false ) { // If user haven't any blog 
    162165                                update_usermeta( $user_ID, 'wp_1_capabilities', array('subscriber' => true)); // Add subscriber permission for first blog. 
    163                                 wp_redirect( 'http://'.$current_site->domain . $current_site->path. 'wp-admin/' ); 
     166                                wp_redirect( $schema . $current_site->domain . $current_site->path. 'wp-admin/' ); 
    164167                                exit(); 
    165168                        } 
     
    167170                        foreach ( (array) $blogs as $blog ) { 
    168171                                if ( $blog->userblog_id == $newblog->blog_id ) { 
    169                                         wp_redirect( 'http://'.$newblog->domain . $newblog->path . 'wp-admin/' ); 
     172                                        wp_redirect( $schema . $newblog->domain . $newblog->path . 'wp-admin/' ); 
    170173                                        exit(); 
    171174                                } 
     
    173176                         
    174177                        $blog = $blogs[0]; // Take the first blog... 
    175                         wp_redirect( 'http://'.$blog->domain . $blog->path. 'wp-admin/' ); 
     178                        wp_redirect( $schema . $blog->domain . $blog->path. 'wp-admin/' ); 
    176179                        exit(); 
    177180                } 
  • trunk/wp-admin/wpmu-blogs.php

    r1134 r1144  
    66wp_enqueue_script( 'listman' ); 
    77require_once('admin-header.php'); 
    8  
    98if( is_site_admin() == false ) { 
    109    wp_die( __('<p>You do not have permission to access this page.</p>') ); 
     
    520519                                                        ?> 
    521520                                                                <td valign="top"> 
    522                                                                         <?php echo "<a href='http://" . $blog['domain'] . $blog['path'] . "wp-admin/' class='edit'>" . __('Backend') . "</a>"; ?> 
     521                                                                        <?php echo "<a href='". $schema . $blog['domain'] . $blog['path'] . "wp-admin/' class='edit'>" . __('Backend') . "</a>"; ?> 
    523522                                                                </td> 
    524523                                                        <?php