<!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>[16868] trunk/wp-admin: Don'
t show search box if there are no items available.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16868">16868</a></dd>
<dt>Author</dt> <dd>scribu</dd>
<dt>Date</dt> <dd>2010-12-10 20:22:34 +0000 (Fri, 10 Dec 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Don't show search box if there are no items available. See <a href="http://trac.wordpress.org/ticket/15353">#15353</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmineditcommentsphp">trunk/wp-admin/edit-comments.php</a></li>
<li><a href="#trunkwpadmineditphp">trunk/wp-admin/edit.php</a></li>
<li><a href="#trunkwpadminlinkmanagerphp">trunk/wp-admin/link-manager.php</a></li>
<li><a href="#trunkwpadminpluginsphp">trunk/wp-admin/plugins.php</a></li>
<li><a href="#trunkwpadminuploadphp">trunk/wp-admin/upload.php</a></li>
<li><a href="#trunkwpadminusersphp">trunk/wp-admin/users.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmineditcommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-comments.php (16867 => 16868)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-comments.php        2010-12-10 20:21:45 UTC (rev 16867)
+++ trunk/wp-admin/edit-comments.php        2010-12-10 20:22:34 UTC (rev 16868)
</span><span class="lines">@@ -220,11 +220,17 @@
</span><span class="cx"> <?php $wp_list_table->views(); ?>
</span><span class="cx">
</span><span class="cx"> <form id="comments-form" action="" method="post">
</span><ins>+
+<?php if ( $wp_list_table->has_items() ) : ?>
+
</ins><span class="cx"> <p class="search-box">
</span><span class="cx">         <label class="screen-reader-text" for="comment-search-input"><?php _e( 'Search Comments' ); ?>:</label>
</span><span class="cx">         <input type="text" id="comment-search-input" name="s" value="<?php _admin_search_query(); ?>" />
</span><span class="cx">         <?php submit_button( __( 'Search Comments' ), 'button', 'submit', false ); ?>
</span><span class="cx"> </p>
</span><ins>+
+<?php endif; ?>
+
</ins><span class="cx"> <?php if ( $post_id ) : ?>
</span><span class="cx"> <input type="hidden" name="p" value="<?php echo esc_attr( intval( $post_id ) ); ?>" />
</span><span class="cx"> <?php endif; ?>
</span></span></pre></div>
<a id="trunkwpadmineditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit.php (16867 => 16868)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit.php        2010-12-10 20:21:45 UTC (rev 16867)
+++ trunk/wp-admin/edit.php        2010-12-10 20:22:34 UTC (rev 16868)
</span><span class="lines">@@ -227,12 +227,17 @@
</span><span class="cx"> <?php $wp_list_table->views(); ?>
</span><span class="cx">
</span><span class="cx"> <form id="posts-filter" action="" method="get">
</span><ins>+
+<?php if ( $wp_list_table->has_items() ) : ?>
+
</ins><span class="cx"> <p class="search-box">
</span><span class="cx">         <label class="screen-reader-text" for="post-search-input"><?php echo $post_type_object->labels->search_items; ?>:</label>
</span><span class="cx">         <input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
</span><span class="cx">         <?php submit_button( $post_type_object->labels->search_items, 'button', 'submit', false ); ?>
</span><span class="cx"> </p>
</span><span class="cx">
</span><ins>+<?php endif; ?>
+
</ins><span class="cx"> <input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>" />
</span><span class="cx"> <input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" />
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminlinkmanagerphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/link-manager.php (16867 => 16868)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/link-manager.php        2010-12-10 20:21:45 UTC (rev 16867)
+++ trunk/wp-admin/link-manager.php        2010-12-10 20:22:34 UTC (rev 16868)
</span><span class="lines">@@ -75,17 +75,20 @@
</span><span class="cx"> }
</span><span class="cx"> ?>
</span><span class="cx">
</span><del>-<form class="search-form" action="" method="get">
</del><ins>+<form id="posts-filter" action="" method="post">
+
+<?php if ( $wp_list_table->has_items() ) : ?>
+
</ins><span class="cx"> <p class="search-box">
</span><span class="cx">         <label class="screen-reader-text" for="link-search-input"><?php _e( 'Search Links' ); ?>:</label>
</span><span class="cx">         <input type="text" id="link-search-input" name="s" value="<?php _admin_search_query(); ?>" />
</span><span class="cx">         <?php submit_button( __( 'Search Links' ), 'button', '', false ); ?>
</span><span class="cx"> </p>
</span><del>-</form>
-<br class="clear" />
</del><span class="cx">
</span><del>-<form id="posts-filter" action="" method="post">
</del><ins>+<?php endif; ?>
+
</ins><span class="cx"> <?php $wp_list_table->display(); ?>
</span><ins>+
</ins><span class="cx"> <div id="ajax-response"></div>
</span><span class="cx"> </form>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminpluginsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/plugins.php (16867 => 16868)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/plugins.php        2010-12-10 20:21:45 UTC (rev 16867)
+++ trunk/wp-admin/plugins.php        2010-12-10 20:22:34 UTC (rev 16868)
</span><span class="lines">@@ -362,19 +362,22 @@
</span><span class="cx"> <?php screen_icon(); ?>
</span><span class="cx"> <h2><?php echo esc_html( $title ); if ( current_user_can('install_plugins') ) { ?> <a href="plugin-install.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'plugin'); ?></a><?php } ?></h2>
</span><span class="cx">
</span><del>-<form method="get" action="">
</del><ins>+<?php do_action( 'pre_current_active_plugins', $plugins['all'] ) ?>
+
+<?php $wp_list_table->views(); ?>
+
+<form method="post" action="">
+
+<?php if ( $wp_list_table->has_items() ) : ?>
+
</ins><span class="cx"> <p class="search-box">
</span><span class="cx">         <label class="screen-reader-text" for="plugin-search-input"><?php _e( 'Search Plugins' ); ?>:</label>
</span><span class="cx">         <input type="text" id="plugin-search-input" name="s" value="<?php _admin_search_query(); ?>" />
</span><span class="cx">         <?php submit_button( __( 'Search Installed Plugins' ), 'button', '', false ); ?>
</span><span class="cx"> </p>
</span><del>-</form>
</del><span class="cx">
</span><del>-<?php do_action( 'pre_current_active_plugins', $plugins['all'] ) ?>
</del><ins>+<?php endif; ?>
</ins><span class="cx">
</span><del>-<?php $wp_list_table->views(); ?>
-
-<form method="post" action="">
</del><span class="cx"> <input type="hidden" name="plugin_status" value="<?php echo esc_attr($status) ?>" />
</span><span class="cx"> <input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminuploadphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/upload.php (16867 => 16868)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/upload.php        2010-12-10 20:21:45 UTC (rev 16867)
+++ trunk/wp-admin/upload.php        2010-12-10 20:22:34 UTC (rev 16868)
</span><span class="lines">@@ -202,16 +202,20 @@
</span><span class="cx">
</span><span class="cx"> <?php $wp_list_table->views(); ?>
</span><span class="cx">
</span><del>-<form class="search-form" action="" method="get">
</del><ins>+<form id="posts-filter" action="" method="post">
+
+<?php if ( $wp_list_table->has_items() ) : ?>
+
</ins><span class="cx"> <p class="search-box">
</span><span class="cx">         <label class="screen-reader-text" for="media-search-input"><?php _e( 'Search Media' ); ?>:</label>
</span><span class="cx">         <input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />
</span><span class="cx">         <?php submit_button( __( 'Search Media' ), 'button', 'submit', false ); ?>
</span><span class="cx"> </p>
</span><del>-</form>
</del><span class="cx">
</span><del>-<form id="posts-filter" action="" method="post">
</del><ins>+<?php endif; ?>
+
</ins><span class="cx"> <?php $wp_list_table->display(); ?>
</span><ins>+
</ins><span class="cx"> <div id="ajax-response"></div>
</span><span class="cx"> <?php find_posts_div(); ?>
</span><span class="cx"> <br class="clear" />
</span></span></pre></div>
<a id="trunkwpadminusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/users.php (16867 => 16868)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/users.php        2010-12-10 20:21:45 UTC (rev 16867)
+++ trunk/wp-admin/users.php        2010-12-10 20:22:34 UTC (rev 16868)
</span><span class="lines">@@ -353,15 +353,18 @@
</span><span class="cx">
</span><span class="cx"> <?php $wp_list_table->views(); ?>
</span><span class="cx">
</span><del>-<form class="search-form" action="" method="get">
</del><ins>+<form action="" method="post">
+
+<?php if ( $wp_list_table->has_items() ) : ?>
+
</ins><span class="cx"> <p class="search-box">
</span><span class="cx">         <label class="screen-reader-text" for="user-search-input"><?php _e( 'Search Users' ); ?>:</label>
</span><span class="cx">         <input type="text" id="user-search-input" name="s" value="<?php echo esc_attr($usersearch); ?>" />
</span><span class="cx">         <?php submit_button( __( 'Search Users' ), 'button', 'submit', false ); ?>
</span><span class="cx"> </p>
</span><del>-</form>
</del><span class="cx">
</span><del>-<form id="posts-filter" action="" method="post">
</del><ins>+<?php endif; ?>
+
</ins><span class="cx"> <?php $wp_list_table->display(); ?>
</span><span class="cx"> </form>
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>