WordPress.org

Plugin Directory

Changeset 661430


Ignore:
Timestamp:
01/30/13 23:16:25 (15 months ago)
Author:
wpmuguru
Message:

fix warnings & mixed protocols warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wordpress-mu-domain-mapping/trunk/domain_mapping.php

    r595484 r661430  
    140140    } 
    141141 
    142     switch( $_POST[ 'action' ] ) { 
    143         default: 
    144     } 
    145142    echo '<h2>' . __( 'Domain Mapping: Domains', 'wordpress-mu-domain-mapping' ) . '</h2>'; 
    146143    if ( !empty( $_POST[ 'action' ] ) ) { 
     
    304301            else 
    305302                update_site_option( 'dm_cname', '' ); 
    306             update_site_option( 'dm_301_redirect', intval( $_POST[ 'permanent_redirect' ] ) ); 
    307             update_site_option( 'dm_redirect_admin', intval( $_POST[ 'always_redirect_admin' ] ) ); 
    308             update_site_option( 'dm_user_settings', intval( $_POST[ 'dm_user_settings' ] ) ); 
    309             update_site_option( 'dm_no_primary_domain', intval( $_POST[ 'dm_no_primary_domain' ] ) ); 
     303            update_site_option( 'dm_301_redirect', isset( $_POST[ 'permanent_redirect' ] ) ? intval( $_POST[ 'permanent_redirect' ] ) : 0 ); 
     304            update_site_option( 'dm_redirect_admin', isset( $_POST[ 'always_redirect_admin' ] ) ? intval( $_POST[ 'always_redirect_admin' ] ) : 0 ); 
     305            update_site_option( 'dm_user_settings', isset( $_POST[ 'dm_user_settings' ] ) ? intval( $_POST[ 'dm_user_settings' ] ) : 0 ); 
     306            update_site_option( 'dm_no_primary_domain', isset( $_POST[ 'dm_no_primary_domain' ] ) ? intval( $_POST[ 'dm_no_primary_domain' ] ) : 0 ); 
    310307        } 
    311308    } 
     
    800797    $protocol = ( 'on' == strtolower( $_SERVER[ 'HTTPS' ] ) ) ? 'https://' : 'http://'; 
    801798    $hash = get_dm_hash(); 
    802     echo "<script src='{$protocol}{$current_site->domain}{$current_site->path}?dm={$hash}&amp;action=load&amp;blogid={$current_blog->blog_id}&amp;siteid={$current_blog->site_id}&amp;t=" . mt_rand() . "&amp;back=" . urlencode( $protocol . $current_blog->domain . $_SERVER[ 'REQUEST_URI' ] ) . "' type='text/javascript'></script>"; 
     799    echo "<script src='//{$current_site->domain}{$current_site->path}?dm={$hash}&amp;action=load&amp;blogid={$current_blog->blog_id}&amp;siteid={$current_blog->site_id}&amp;t=" . mt_rand() . "&amp;back=" . urlencode( $protocol . $current_blog->domain . $_SERVER[ 'REQUEST_URI' ] ) . "' type='text/javascript'></script>"; 
    803800} 
    804801 
Note: See TracChangeset for help on using the changeset viewer.