<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12782] trunk/wp-admin: Clear some warnings.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12782">12782</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-01-20 23:01:09 +0000 (Wed, 20 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Clear some warnings. see <a href="http://trac.wordpress.org/ticket/11644">#11644</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesmsphp">trunk/wp-admin/includes/ms.php</a></li>
<li><a href="#trunkwpadminmsadminphp">trunk/wp-admin/ms-admin.php</a></li>
<li><a href="#trunkwpadminmssitesphp">trunk/wp-admin/ms-sites.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesmsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ms.php (12781 => 12782)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ms.php        2010-01-20 22:35:21 UTC (rev 12781)
+++ trunk/wp-admin/includes/ms.php        2010-01-20 23:01:09 UTC (rev 12782)
</span><span class="lines">@@ -1218,7 +1218,7 @@
</span><span class="cx">                 return;
</span><span class="cx">         }
</span><span class="cx">         $mu_media_buttons = get_site_option( 'mu_media_buttons', array() );
</span><del>-        if ( !$mu_media_buttons[ 'image' ] && current_theme_supports( 'post-thumbnails' ) ) {
</del><ins>+        if ( empty($mu_media_buttons[ 'image' ]) && current_theme_supports( 'post-thumbnails' ) ) {
</ins><span class="cx">                 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>";
</span><span class="cx">         }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkwpadminmsadminphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-admin.php (12781 => 12782)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-admin.php        2010-01-20 22:35:21 UTC (rev 12781)
+++ trunk/wp-admin/ms-admin.php        2010-01-20 23:01:09 UTC (rev 12782)
</span><span class="lines">@@ -21,8 +21,8 @@
</span><span class="cx"> $c_users = $wpdb->get_var("SELECT COUNT(id) FROM {$wpdb->users}");
</span><span class="cx"> $c_blogs = $wpdb->get_var("SELECT COUNT(blog_id) FROM {$wpdb->blogs}");
</span><span class="cx">
</span><del>-$user_text = sprintf( __ngettext( '%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 ) );
</del><ins>+$user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) );
+$blog_text = sprintf( _n( '%s blog', '%s blogs', $c_blogs ), number_format_i18n( $c_blogs ) );
</ins><span class="cx">
</span><span class="cx"> $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text );
</span><span class="cx"> $title = __( 'Site Admin' );
</span></span></pre></div>
<a id="trunkwpadminmssitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-sites.php (12781 => 12782)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-sites.php        2010-01-20 22:35:21 UTC (rev 12781)
+++ trunk/wp-admin/ms-sites.php        2010-01-20 23:01:09 UTC (rev 12782)
</span><span class="lines">@@ -14,10 +14,10 @@
</span><span class="cx"> if ( !is_super_admin() )
</span><span class="cx">         wp_die( __('You do not have permission to access this page.') );
</span><span class="cx">
</span><del>-$id = intval( $_GET['id'] );
</del><ins>+$id = isset($_GET['id']) ? intval( $_GET['id'] ) : 0;
</ins><span class="cx"> $protocol = is_ssl() ? 'https://' : 'http://';
</span><span class="cx">
</span><del>-if ( $_GET['updated'] == 'true' ) {
</del><ins>+if ( isset($_GET['updated']) && $_GET['updated'] == 'true' ) {
</ins><span class="cx">         ?>
</span><span class="cx">         <div id="message" class="updated fade"><p>
</span><span class="cx">                 <?php
</span><span class="lines">@@ -70,7 +70,9 @@
</span><span class="cx">         <?php
</span><span class="cx"> }
</span><span class="cx">
</span><del>-switch ( $_GET['action'] ) {
</del><ins>+$action = isset($_GET['action']) ? $_GET['action'] : 'list';
+
+switch ( $action ) {
</ins><span class="cx">         // Edit blog
</span><span class="cx">         case "editblog":
</span><span class="cx">                 $blog_prefix = $wpdb->get_blog_prefix( $id );
</span><span class="lines">@@ -309,6 +311,7 @@
</span><span class="cx">         break;
</span><span class="cx">
</span><span class="cx">         // List blogs
</span><ins>+        case 'list':
</ins><span class="cx">         default:
</span><span class="cx">                 $apage = ( isset($_GET['apage'] ) && intval( $_GET['apage'] ) ) ? absint( $_GET['apage'] ) : 1;
</span><span class="cx">                 $num = ( isset($_GET['num'] ) && intval( $_GET['num'] ) ) ? absint( $_GET['num'] ) : 15;
</span></span></pre>
</div>
</div>
</body>
</html>