Index: trunk/phase3/includes/Title.php |
— | — | @@ -990,8 +990,9 @@ |
991 | 991 | * @return String the URL |
992 | 992 | */ |
993 | 993 | public function getInternalURL( $query = '', $variant = false ) { |
994 | | - global $wgInternalServer; |
995 | | - $url = $wgInternalServer . $this->getLocalURL( $query, $variant ); |
| 994 | + global $wgInternalServer, $wgServer; |
| 995 | + $server = $wgInternalServer !== false ? $wgInternalServer : $wgServer; |
| 996 | + $url = $server . $this->getLocalURL( $query, $variant ); |
996 | 997 | wfRunHooks( 'GetInternalURL', array( &$this, &$url, $query ) ); |
997 | 998 | return $url; |
998 | 999 | } |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -1768,7 +1768,7 @@ |
1769 | 1769 | * $wgInternalServer = 'http://yourinternal.tld:8000'; |
1770 | 1770 | * </code> |
1771 | 1771 | */ |
1772 | | -$wgInternalServer = $wgServer; |
| 1772 | +$wgInternalServer = false; |
1773 | 1773 | |
1774 | 1774 | /** |
1775 | 1775 | * Cache timeout for the squid, will be sent as s-maxage (without ESI) or |
Index: trunk/phase3/includes/SquidUpdate.php |
— | — | @@ -193,9 +193,10 @@ |
194 | 194 | * @return string |
195 | 195 | */ |
196 | 196 | static function expand( $url ) { |
197 | | - global $wgInternalServer; |
198 | | - if( $url != '' && $url{0} == '/' ) { |
199 | | - return $wgInternalServer . $url; |
| 197 | + global $wgInternalServer, $wgServer; |
| 198 | + $server = $wgInternalServer !== false ? $wgInternalServer : $wgServer; |
| 199 | + if( $url !== '' && $url[0] == '/' ) { |
| 200 | + return $server . $url; |
200 | 201 | } |
201 | 202 | return $url; |
202 | 203 | } |