http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95011
Revision: 95011
Author: catrope
Date: 2011-08-19 15:56:59 +0000 (Fri, 19 Aug 2011)
Log Message:
-----------
Use wfParseUrl() instead of parse_url() in interwiki search code: the latter
can throw PHP warnings and is totally broken for protocol-relative URLs. Also
remove the last usage in core of key_exists(), a deprecated alias for
array_key_exists()
Modified Paths:
--------------
trunk/phase3/includes/specials/SpecialSearch.php
Modified: trunk/phase3/includes/specials/SpecialSearch.php
===================================================================
--- trunk/phase3/includes/specials/SpecialSearch.php 2011-08-19 15:46:08 UTC
(rev 95010)
+++ trunk/phase3/includes/specials/SpecialSearch.php 2011-08-19 15:56:59 UTC
(rev 95011)
@@ -775,13 +775,13 @@
$out = "";
// display project name
if(is_null($lastInterwiki) || $lastInterwiki !=
$t->getInterwiki()) {
- if( key_exists($t->getInterwiki(),$customCaptions) ) {
+ if(
array_key_exists($t->getInterwiki(),$customCaptions) ) {
// captions from 'search-interwiki-custom'
$caption = $customCaptions[$t->getInterwiki()];
} else {
// default is to show the hostname of the other
wiki which might suck
// if there are many wikis on one hostname
- $parsed = parse_url($t->getFullURL());
+ $parsed = wfParseUrl( $t->getFullURL() );
$caption = wfMsg('search-interwiki-default',
$parsed['host']);
}
// "more results" link (special page stuff could be
localized, but we might not know target lang)
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs