Make WordPress Core

Changeset 22013


Ignore:
Timestamp:
09/26/2012 03:13:22 PM (12 years ago)
Author:
koopersmith
Message:

Media JS: Use correct reference to search term in the Attachments model search filter. see #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-models.js

    r22012 r22013  
    374374            // to our server-side searching.
    375375            search: function( attachment ) {
    376                 if ( ! this.searching )
     376                if ( ! this.props.get('search') )
    377377                    return true;
    378378
    379379                return _.any(['title','filename','description','caption','name'], function( key ) {
    380380                    var value = attachment.get( key );
    381                     return value && -1 !== value.search( this.searching );
     381                    return value && -1 !== value.search( this.props.get('search') );
    382382                }, this );
    383383            }
Note: See TracChangeset for help on using the changeset viewer.