From: Ori Livneh Date: Sat, 3 May 2014 21:55:04 +0000 (-0700) Subject: Improve in-line documentation of $wgUrlProtocols; add 'redis://' X-Git-Tag: 1.31.0-rc.0~15902^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=62b1fbd5f42818d492bd086cfa68e01dca317c64;p=lhc%2Fweb%2Fwiklou.git Improve in-line documentation of $wgUrlProtocols; add 'redis://' * RedisPubSubFeedEngine uses 'redis://' URLs. So does redis-py and many other client libraries. It should be recognized by MediaWiki. So add it. * Remove in-line comments justifying each individual URL scheme. DefaultSettings.php is long enough; it doesn't need to moonlight as the annals of the history of MediaWiki development. * Make the documentation of $wgUrlProtocols a bit more useful. Change-Id: I4c2de67cc4e243659b0bed674e0ccd48221c57f3 --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 8c96727a8f..0ca35f0203 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3716,36 +3716,14 @@ $wgMaxTemplateDepth = 40; $wgMaxPPExpandDepth = 40; /** - * The external URL protocols + * URL schemes that should be recognized as valid by wfParseUrl(). + * @see wfParseUrl */ $wgUrlProtocols = array( - 'http://', - 'https://', - 'ftp://', - 'ftps://', // If we allow ftp:// we should allow the secure version. - 'ssh://', - 'sftp://', // SFTP > FTP - 'irc://', - 'ircs://', // @bug 28503 - 'xmpp:', // Another open communication protocol - 'sip:', - 'sips:', - 'gopher://', - 'telnet://', // Well if we're going to support the above.. -ævar - 'nntp://', // @bug 3808 RFC 1738 - 'worldwind://', - 'mailto:', - 'tel:', // If we can make emails linkable, why not phone numbers? - 'sms:', // Likewise this is standardized too - 'news:', - 'svn://', - 'git://', - 'mms://', - 'bitcoin:', // Even registerProtocolHandler whitelists this along with mailto: - 'magnet:', // No reason to reject torrents over magnet: when they're allowed over http:// - 'urn:', // Allow URNs to be used in Microdata/RDFa s - 'geo:', // urls define geo locations, they're useful in Microdata/RDFa and for coordinates - '//', // for protocol-relative URLs + 'bitcoin:', 'ftp://', 'ftps://', 'geo:', 'git://', 'gopher://', 'http://', + 'https://', 'irc://', 'ircs://', 'magnet:', 'mailto:', 'mms://', 'news:', + 'nntp://', 'redis://', 'sftp://', 'sip:', 'sips:', 'sms:', 'ssh://', + 'svn://', 'tel:', 'telnet://', 'urn:', 'worldwind://', 'xmpp:', '//' ); /**