From: Michael Dale Date: Wed, 4 Nov 2009 02:03:02 +0000 (+0000) Subject: opps followup to 58512 X-Git-Tag: 1.31.0-rc.0~38985 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=318010e5f08e67be5a1f5e72fcbb8e0c6ccb5c01;p=lhc%2Fweb%2Fwiklou.git opps followup to 58512 --- diff --git a/js2/mwEmbed/libAddMedia/remoteSearchDriver.js b/js2/mwEmbed/libAddMedia/remoteSearchDriver.js index 6e0931bedf..2df54909a4 100644 --- a/js2/mwEmbed/libAddMedia/remoteSearchDriver.js +++ b/js2/mwEmbed/libAddMedia/remoteSearchDriver.js @@ -262,17 +262,21 @@ remoteSearchDriver.prototype = { _this.getTexboxSelection(); //modify the content provider config based on options: - for(var i in this.content_providers){ - if( $j.inArray(i, _this.enabled_cps) != -1 ){ - //if no default display set to first enabled cp: - if( !this.disp_item ) - this.disp_item = i; - this.content_providers[i].enabled = true; + for(var i in this.content_providers){ + if( _this.enabled_cps == 'all' && !this.disp_item ){ + this.disp_item = i; }else{ - if( _this.enabled_cps != 'all' ){ - this.content_providers[i].enabled = false; - } - } + if( $j.inArray(i, _this.enabled_cps) != -1 ){ + //if no default display set to first enabled cp: + if( !this.disp_item ) + this.disp_item = i; + this.content_providers[i].enabled = true; + }else{ + if( _this.enabled_cps != 'all' ){ + this.content_providers[i].enabled = false; + } + } + } } //set the upload target name if unset