Rename PROT_* constants to PROTO_*
authorPlatonides <platonides@users.mediawiki.org>
Wed, 27 Jul 2011 14:06:43 +0000 (14:06 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Wed, 27 Jul 2011 14:06:43 +0000 (14:06 +0000)
Follow up r93258

includes/GlobalFunctions.php
tests/phpunit/includes/GlobalFunctions/wfExpandUrl.php

index 3c893b0..51861e3 100644 (file)
@@ -428,10 +428,10 @@ function wfAppendQuery( $url, $query ) {
        return $url;
 }
 
-define( 'PROT_HTTP', 'http://' );
-define( 'PROT_HTTPS', 'https://' );
-define( 'PROT_RELATIVE', '//' );
-define( 'PROT_CURRENT', null );
+define( 'PROTO_HTTP', 'http://' );
+define( 'PROTO_HTTPS', 'https://' );
+define( 'PROTO_RELATIVE', '//' );
+define( 'PROTO_CURRENT', null );
 
 /**
  * Expand a potentially local URL to a fully-qualified URL.  Assumes $wgServer
@@ -447,12 +447,12 @@ define( 'PROT_CURRENT', null );
  * like "subdir/foo.html", etc.
  *
  * @param $url String: either fully-qualified or a local path + query
- * @param $defaultProto Mixed: one of the PROT_* constants. Determines the protocol to use if $url or $wgServer is protocol-relative
+ * @param $defaultProto Mixed: one of the PROTO_* constants. Determines the protocol to use if $url or $wgServer is protocol-relative
  * @return string Fully-qualified URL
  */
-function wfExpandUrl( $url, $defaultProto = PROT_CURRENT ) {
+function wfExpandUrl( $url, $defaultProto = PROTO_CURRENT ) {
        global $wgServer;
-       if ( $defaultProto === PROT_CURRENT ) {
+       if ( $defaultProto === PROTO_CURRENT ) {
                $defaultProto = WebRequest::detectProtocol() . '://';
        }
        
index fe60bdc..f71ace6 100644 (file)
@@ -32,7 +32,7 @@ class wfExpandUrl extends MediaWikiTestCase {
        public function provideExpandableUrls() {
                $modes = array( 'http', 'https' );
                $servers = array( 'http' => 'http://example.com', 'https' => 'https://example.com', 'protocol-relative' => '//example.com' );
-               $defaultProtos = array( 'http' => PROT_HTTP, 'https' => PROT_HTTPS, 'protocol-relative' => PROT_RELATIVE, 'current' => PROT_CURRENT );
+               $defaultProtos = array( 'http' => PROTO_HTTP, 'https' => PROTO_HTTPS, 'protocol-relative' => PROTO_RELATIVE, 'current' => PROTO_CURRENT );
                
                $retval = array();
                foreach ( $modes as $mode ) {