Attach Media: Display the correct error message when search result is empty.

fixes #29093.
Built from https://develop.svn.wordpress.org/trunk@29356


git-svn-id: http://core.svn.wordpress.org/trunk@29132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2014-08-02 14:24:15 +00:00
parent 8ea68677f3
commit 608d505b24

View File

@ -1637,8 +1637,9 @@ function wp_ajax_find_posts() {
$posts = get_posts( $args );
if ( ! $posts )
wp_die( __('No items found.') );
if ( ! $posts ) {
wp_send_json_error( __( 'No items found.' ) );
}
$html = '<table class="widefat"><thead><tr><th class="found-radio"><br /></th><th>'.__('Title').'</th><th class="no-break">'.__('Type').'</th><th class="no-break">'.__('Date').'</th><th class="no-break">'.__('Status').'</th></tr></thead><tbody>';
$alt = '';