Support protocol relative and https URLs

Bug: T94591
Change-Id: I42c6ed218293fdd86495a54b1b1828cc68d474ae
This commit is contained in:
Marius Hoch 2015-06-16 01:33:58 +02:00
parent c5e5c1743b
commit 496508099f

View file

@ -265,7 +265,7 @@ abstract class BaseBlacklist {
$matches = array();
if ( preg_match( '/^DB: ([\w-]*) (.*)$/', $fileName, $matches ) ) {
$text = $this->getArticleText( $matches[1], $matches[2] );
} elseif ( preg_match( '/^http:\/\//', $fileName ) ) {
} elseif ( preg_match( '/^(https?:)?\/\//', $fileName ) ) {
$text = $this->getHttpText( $fileName );
} else {
$text = file_get_contents( $fileName );