Formatting cleanups
git-svn-id: https://develop.svn.wordpress.org/trunk@12760 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
179e1c6d15
commit
59d31d8c5e
|
@ -29,7 +29,7 @@ $title = __( 'Site Admin' );
|
|||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<h2><?php echo wp_specialchars( $title ); ?></h2>
|
||||
<h2><?php echo esc_html( $title ); ?></h2>
|
||||
|
||||
<ul class="subsubsub">
|
||||
<li><a href="ms-sites.php#form-add-blog" class="rbutton"><strong><?php _e('Create a New Blog'); ?></strong></a> | </li>
|
||||
|
|
|
@ -373,7 +373,7 @@ switch( $_GET['action'] ) {
|
|||
|
||||
<form action="ms-sites.php" method="get" id="ms-search">
|
||||
<input type="hidden" name="action" value="blogs" />
|
||||
<input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes( esc_attr( $s, 1 ) ); ?>" size="17" />
|
||||
<input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes( esc_attr( $s ) ); ?>" size="17" />
|
||||
<input type="submit" class="button" name="blog_name" value="<?php esc_attr_e('Search blogs by name') ?>" />
|
||||
<input type="submit" class="button" name="blog_id" value="<?php esc_attr_e('by blog ID') ?>" />
|
||||
<input type="submit" class="button" name="blog_ip" value="<?php esc_attr_e('by IP address') ?>" />
|
||||
|
|
|
@ -135,11 +135,10 @@ if( is_subdomain_install() ) {
|
|||
if ( $current_blog )
|
||||
wp_cache_set( 'current_blog_' . $domain, $current_blog, 'site-options' );
|
||||
}
|
||||
if( $current_blog != null && $current_blog->site_id != $current_site->id ) {
|
||||
if ( $current_blog != null && $current_blog->site_id != $current_site->id )
|
||||
$current_site = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->site WHERE id = %d", $current_blog->site_id) );
|
||||
} else {
|
||||
else
|
||||
$blogname = substr( $domain, 0, strpos( $domain, '.' ) );
|
||||
}
|
||||
} else {
|
||||
$blogname = htmlspecialchars( substr( $_SERVER[ 'REQUEST_URI' ], strlen( $path ) ) );
|
||||
if ( strpos( $blogname, '/' ) )
|
||||
|
@ -147,9 +146,8 @@ if( is_subdomain_install() ) {
|
|||
if ( strpos( " ".$blogname, '?' ) )
|
||||
$blogname = substr( $blogname, 0, strpos( $blogname, '?' ) );
|
||||
$reserved_blognames = array( 'page', 'comments', 'blog', 'wp-admin', 'wp-includes', 'wp-content', 'files', 'feed' );
|
||||
if ( $blogname != '' && !in_array( $blogname, $reserved_blognames ) && !is_file( $blogname ) ) {
|
||||
if ( $blogname != '' && !in_array( $blogname, $reserved_blognames ) && !is_file( $blogname ) )
|
||||
$path = $path . $blogname . '/';
|
||||
}
|
||||
$current_blog = wp_cache_get( 'current_blog_' . $domain . $path, 'site-options' );
|
||||
if ( !$current_blog ) {
|
||||
$current_blog = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->blogs WHERE domain = %s AND path = %s", $domain, $path) );
|
||||
|
@ -209,11 +207,10 @@ if( $blog_id == false ) {
|
|||
$current_blog->blog_id = $blog_id;
|
||||
} else {
|
||||
$check = $wpdb->get_results( "SELECT * FROM $wpdb->site" );
|
||||
if( $check == false ) {
|
||||
if ( $check == false )
|
||||
$msg = ': DB Tables Missing';
|
||||
} else {
|
||||
else
|
||||
$msg = '';
|
||||
}
|
||||
die( "No Blog by that name on this system." . $msg );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue