From 669b4b3a6dedfcc1c5d39fd5ea02a599a4f1f397 Mon Sep 17 00:00:00 2001 From: Daryl Koopersmith Date: Wed, 26 Sep 2012 15:13:22 +0000 Subject: [PATCH] Media JS: Use correct reference to search term in the Attachments model search filter. see #21390. git-svn-id: http://core.svn.wordpress.org/trunk@22013 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/media-models.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/js/media-models.js b/wp-includes/js/media-models.js index 8f5a412a6a..7cb9a4d227 100644 --- a/wp-includes/js/media-models.js +++ b/wp-includes/js/media-models.js @@ -373,12 +373,12 @@ if ( typeof wp === 'undefined' ) // Note that this client-side searching is *not* equivalent // to our server-side searching. search: function( attachment ) { - if ( ! this.searching ) + if ( ! this.props.get('search') ) return true; return _.any(['title','filename','description','caption','name'], function( key ) { var value = attachment.get( key ); - return value && -1 !== value.search( this.searching ); + return value && -1 !== value.search( this.props.get('search') ); }, this ); } }