Clear some warnings. see #11644

git-svn-id: http://svn.automattic.com/wordpress/trunk@12782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-01-20 23:01:09 +00:00
parent 4ef834c4b1
commit 74a86506f6
3 changed files with 9 additions and 6 deletions

View File

@ -1218,7 +1218,7 @@ function show_post_thumbnail_warning() {
return; return;
} }
$mu_media_buttons = get_site_option( 'mu_media_buttons', array() ); $mu_media_buttons = get_site_option( 'mu_media_buttons', array() );
if ( !$mu_media_buttons[ 'image' ] && current_theme_supports( 'post-thumbnails' ) ) { if ( empty($mu_media_buttons[ 'image' ]) && current_theme_supports( 'post-thumbnails' ) ) {
echo "<div id='update-nag'>" . sprintf( __( "Warning! The current theme supports post thumbnails. You must enable image uploads on <a href='%s'>the options page</a> for it to work." ), admin_url( 'ms-options.php' ) ) . "</div>"; echo "<div id='update-nag'>" . sprintf( __( "Warning! The current theme supports post thumbnails. You must enable image uploads on <a href='%s'>the options page</a> for it to work." ), admin_url( 'ms-options.php' ) ) . "</div>";
} }
} }

View File

@ -21,8 +21,8 @@ global $wpdb;
$c_users = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->users}"); $c_users = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->users}");
$c_blogs = $wpdb->get_var("SELECT COUNT(blog_id) FROM {$wpdb->blogs}"); $c_blogs = $wpdb->get_var("SELECT COUNT(blog_id) FROM {$wpdb->blogs}");
$user_text = sprintf( __ngettext( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) ); $user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) );
$blog_text = sprintf( __ngettext( '%s blog', '%s blogs', $c_blogs ), number_format_i18n( $c_blogs ) ); $blog_text = sprintf( _n( '%s blog', '%s blogs', $c_blogs ), number_format_i18n( $c_blogs ) );
$sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text ); $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text );
$title = __( 'Site Admin' ); $title = __( 'Site Admin' );

View File

@ -14,10 +14,10 @@ require_once('admin-header.php');
if ( !is_super_admin() ) if ( !is_super_admin() )
wp_die( __('You do not have permission to access this page.') ); wp_die( __('You do not have permission to access this page.') );
$id = intval( $_GET['id'] ); $id = isset($_GET['id']) ? intval( $_GET['id'] ) : 0;
$protocol = is_ssl() ? 'https://' : 'http://'; $protocol = is_ssl() ? 'https://' : 'http://';
if ( $_GET['updated'] == 'true' ) { if ( isset($_GET['updated']) && $_GET['updated'] == 'true' ) {
?> ?>
<div id="message" class="updated fade"><p> <div id="message" class="updated fade"><p>
<?php <?php
@ -70,7 +70,9 @@ if ( $_GET['updated'] == 'true' ) {
<?php <?php
} }
switch ( $_GET['action'] ) { $action = isset($_GET['action']) ? $_GET['action'] : 'list';
switch ( $action ) {
// Edit blog // Edit blog
case "editblog": case "editblog":
$blog_prefix = $wpdb->get_blog_prefix( $id ); $blog_prefix = $wpdb->get_blog_prefix( $id );
@ -309,6 +311,7 @@ switch ( $_GET['action'] ) {
break; break;
// List blogs // List blogs
case 'list':
default: default:
$apage = ( isset($_GET['apage'] ) && intval( $_GET['apage'] ) ) ? absint( $_GET['apage'] ) : 1; $apage = ( isset($_GET['apage'] ) && intval( $_GET['apage'] ) ) ? absint( $_GET['apage'] ) : 1;
$num = ( isset($_GET['num'] ) && intval( $_GET['num'] ) ) ? absint( $_GET['num'] ) : 15; $num = ( isset($_GET['num'] ) && intval( $_GET['num'] ) ) ? absint( $_GET['num'] ) : 15;