Formatting cleanups

git-svn-id: http://svn.automattic.com/wordpress/trunk@12760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-01-19 17:01:39 +00:00
parent a7e588ae16
commit a06a4c6b70
5 changed files with 71 additions and 74 deletions

View File

@ -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>

View File

@ -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') ?>" />

View File

@ -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 );
}
}