From: Brion Vibber Date: Mon, 25 Jul 2005 13:38:54 +0000 (+0000) Subject: * Spelling fix: $wgUrlProtcols -> $wgUrlProtocols X-Git-Tag: 1.5.0beta4~28 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=9d4ad0468a5b1a8b9c57e840dae40716d35f6c86;p=lhc%2Fweb%2Fwiklou.git * Spelling fix: $wgUrlProtcols -> $wgUrlProtocols --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 60baf2cd46..145bfb51fd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -609,6 +609,7 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new. * (bug 2958) Rollback and delete auto-summary should be in the project's content language * Removed useless protectreason message +* Spelling fix: $wgUrlProtcols -> $wgUrlProtocols === Caveats === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index f2f4836a37..9121bb0b5a 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -124,7 +124,7 @@ $wgUploadBaseUrl = ""; /** * The external URL protocols (regexp) */ -$wgUrlProtcols = 'http:\/\/|https:\/\/|ftp:\/\/|irc:\/\/|gopher:\/\/|news:|mailto:'; +$wgUrlProtocols = 'http:\/\/|https:\/\/|ftp:\/\/|irc:\/\/|gopher:\/\/|news:|mailto:'; /** internal name of virus scanner. This servers as a key to the $wgAntivirusSetup array. * Set this to NULL to disable virus scanning. If not null, every file uploaded will be scanned for viruses. diff --git a/includes/Parser.php b/includes/Parser.php index 280e5afdb6..60627967c7 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -54,7 +54,7 @@ define( 'EXT_LINK_URL_CLASS', '[^]<>"\\x00-\\x20\\x7F]' ); define( 'EXT_LINK_TEXT_CLASS', '[^\]\\x00-\\x1F\\x7F]' ); define( 'EXT_IMAGE_FNAME_CLASS', '[A-Za-z0-9_.,~%\\-+&;#*?!=()@\\x80-\\xFF]' ); define( 'EXT_IMAGE_EXTENSIONS', 'gif|png|jpg|jpeg' ); -define( 'EXT_LINK_BRACKETED', '/\[(\b('.$wgUrlProtcols.')'.EXT_LINK_URL_CLASS.'+) *('.EXT_LINK_TEXT_CLASS.'*?)\]/S' ); +define( 'EXT_LINK_BRACKETED', '/\[(\b('.$wgUrlProtocols.')'.EXT_LINK_URL_CLASS.'+) *('.EXT_LINK_TEXT_CLASS.'*?)\]/S' ); define( 'EXT_IMAGE_REGEX', '/^('.HTTP_PROTOCOLS.')'. # Protocol '('.EXT_LINK_URL_CLASS.'+)\\/'. # Hostname and path @@ -1104,12 +1104,12 @@ class Parser * @access private */ function replaceFreeExternalLinks( $text ) { - global $wgUrlProtcols; + global $wgUrlProtocols; global $wgContLang; $fname = 'Parser::replaceFreeExternalLinks'; wfProfileIn( $fname ); - $bits = preg_split( '/(\b(?:'.$wgUrlProtcols.'))/S', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); + $bits = preg_split( '/(\b(?:'.$wgUrlProtocols.'))/S', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); $s = array_shift( $bits ); $i = 0; @@ -1187,7 +1187,7 @@ class Parser * @access private */ function replaceInternalLinks( $s ) { - global $wgContLang, $wgLinkCache, $wgUrlProtcols; + global $wgContLang, $wgLinkCache, $wgUrlProtocols; static $fname = 'Parser::replaceInternalLinks' ; wfProfileIn( $fname ); @@ -1290,7 +1290,7 @@ class Parser # Don't allow internal links to pages containing # PROTO: where PROTO is a valid URL protocol; these # should be external links. - if (preg_match('/^(\b(?:'.$wgUrlProtcols.'))/', $m[1])) { + if (preg_match('/^(\b(?:'.$wgUrlProtocols.'))/', $m[1])) { $s .= $prefix . '[[' . $line ; continue; } diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 88cc440bd0..b9b3b50212 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -525,7 +525,7 @@ class Sanitizer { * @todo Check for unique id attribute :P */ function fixTagAttributes( $text, $element ) { - global $wgUrlProtcols; + global $wgUrlProtocols; if( trim( $text ) == '' ) { return ''; } @@ -572,7 +572,7 @@ class Sanitizer { 'PMID' => 'PMID', ) ); $value = preg_replace( - '/(' . $wgUrlProtcols . '):/', + '/(' . $wgUrlProtocols . '):/', '\\1:', $value ); // If this attribute was previously set, override it. diff --git a/includes/Skin.php b/includes/Skin.php index 929df08c4a..dc1fa4a6bc 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1257,8 +1257,8 @@ END; # If url string starts with http, consider as external URL, else # internal /*static*/ function makeInternalOrExternalUrl( $name ) { - global $wgUrlProtcols; - if ( preg_match( '/^(?:' . $wgUrlProtcols . ')/', $name ) ) { + global $wgUrlProtocols; + if ( preg_match( '/^(?:' . $wgUrlProtocols . ')/', $name ) ) { return $name; } else { return $this->makeUrl( $name );