Make WordPress Core


Ignore:
Timestamp:
02/05/2010 09:49:19 PM (14 years ago)
Author:
ryan
Message:

Introduce get_home_url(), get_site_url(), and get_admin_url() for fetching urls by blog id. see #12119

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/ms-edit.php

    r12946 r12978  
    208208
    209209        if ( $_POST['update_home_url'] == 'update' ) {
    210             if ( get_option( 'siteurl' ) != 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] )
    211                 update_option( 'siteurl', 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] );
    212 
    213             if ( get_option( 'home' ) != 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] )
    214                 update_option( 'home', 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] );
     210            $blog_address = get_blogaddress_by_domain($_POST['blog']['domain'], $_POST['blog']['path']);
     211            if ( get_option( 'siteurl' ) !=  $blog_address )
     212                update_option( 'siteurl', $blog_address);
     213
     214            if ( get_option( 'home' ) != $blog_address )
     215                update_option( 'home', $blog_address );
    215216        }
    216217
Note: See TracChangeset for help on using the changeset viewer.