From: Michael Dale Date: Wed, 4 Nov 2009 01:58:31 +0000 (+0000) Subject: ( bug 21374 ) fixed default search repository X-Git-Tag: 1.31.0-rc.0~38986 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=dac53eae5efa48dc085e34ae8c5921b11e91f3b4;p=lhc%2Fweb%2Fwiklou.git ( bug 21374 ) fixed default search repository --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 16921ce894..a728c5d038 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1606,7 +1606,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches do not keep obsolete copies of global * styles. */ -$wgStyleVersion = '250'; +$wgStyleVersion = '251'; # Server-side caching: diff --git a/js2/mwEmbed/libAddMedia/remoteSearchDriver.js b/js2/mwEmbed/libAddMedia/remoteSearchDriver.js index f6a94a5ce8..6e0931bedf 100644 --- a/js2/mwEmbed/libAddMedia/remoteSearchDriver.js +++ b/js2/mwEmbed/libAddMedia/remoteSearchDriver.js @@ -92,7 +92,7 @@ var default_remote_search_options = { 'enabled_cps':'all', //can be keyword 'all' or an array of enabled content provider keys - 'disp_item':'flickr' //sets the default display item: + 'disp_item':null //sets the default display item: } if(typeof wgServer == 'undefined') @@ -261,16 +261,20 @@ remoteSearchDriver.prototype = { if(_this.target_textbox) _this.getTexboxSelection(); - //modify the content provider config based on options: - if(_this.enabled_cps != 'all'){ - for(var i in this.content_providers){ - if( $j.inArray(i, _this.enabled_cps) != -1 ){ - this.content_providers[i].enabled = true; - }else{ + //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; + }else{ + if( _this.enabled_cps != 'all' ){ this.content_providers[i].enabled = false; } - } - } + } + } + //set the upload target name if unset if( _this.upload_api_target == 'local' && ! _this.upload_api_name && typeof wgSiteName != 'undefined') _this.upload_api_name = wgSiteName;