Index: trunk/phase3/tests/phpunit/includes/GlobalFunctions/wfExpandUrl.php |
— | — | @@ -32,7 +32,7 @@ |
33 | 33 | public function provideExpandableUrls() { |
34 | 34 | $modes = array( 'http', 'https' ); |
35 | 35 | $servers = array( 'http' => 'http://example.com', 'https' => 'https://example.com', 'protocol-relative' => '//example.com' ); |
36 | | - $defaultProtos = array( 'http' => PROT_HTTP, 'https' => PROT_HTTPS, 'protocol-relative' => PROT_RELATIVE, 'current' => PROT_CURRENT ); |
| 36 | + $defaultProtos = array( 'http' => PROTO_HTTP, 'https' => PROTO_HTTPS, 'protocol-relative' => PROTO_RELATIVE, 'current' => PROTO_CURRENT ); |
37 | 37 | |
38 | 38 | $retval = array(); |
39 | 39 | foreach ( $modes as $mode ) { |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -428,10 +428,10 @@ |
429 | 429 | return $url; |
430 | 430 | } |
431 | 431 | |
432 | | -define( 'PROT_HTTP', 'http://' ); |
433 | | -define( 'PROT_HTTPS', 'https://' ); |
434 | | -define( 'PROT_RELATIVE', '//' ); |
435 | | -define( 'PROT_CURRENT', null ); |
| 432 | +define( 'PROTO_HTTP', 'http://' ); |
| 433 | +define( 'PROTO_HTTPS', 'https://' ); |
| 434 | +define( 'PROTO_RELATIVE', '//' ); |
| 435 | +define( 'PROTO_CURRENT', null ); |
436 | 436 | |
437 | 437 | /** |
438 | 438 | * Expand a potentially local URL to a fully-qualified URL. Assumes $wgServer |
— | — | @@ -447,12 +447,12 @@ |
448 | 448 | * like "subdir/foo.html", etc. |
449 | 449 | * |
450 | 450 | * @param $url String: either fully-qualified or a local path + query |
451 | | - * @param $defaultProto Mixed: one of the PROT_* constants. Determines the protocol to use if $url or $wgServer is protocol-relative |
| 451 | + * @param $defaultProto Mixed: one of the PROTO_* constants. Determines the protocol to use if $url or $wgServer is protocol-relative |
452 | 452 | * @return string Fully-qualified URL |
453 | 453 | */ |
454 | | -function wfExpandUrl( $url, $defaultProto = PROT_CURRENT ) { |
| 454 | +function wfExpandUrl( $url, $defaultProto = PROTO_CURRENT ) { |
455 | 455 | global $wgServer; |
456 | | - if ( $defaultProto === PROT_CURRENT ) { |
| 456 | + if ( $defaultProto === PROTO_CURRENT ) { |
457 | 457 | $defaultProto = WebRequest::detectProtocol() . '://'; |
458 | 458 | } |
459 | 459 | |