if ( !preg_match( '!^https?://!', $url ) ) {
$url = 'http://unused' . $url;
}
- MediaWiki\suppressWarnings();
+ Wikimedia\suppressWarnings();
$a = parse_url( $url );
- MediaWiki\restoreWarnings();
+ Wikimedia\restoreWarnings();
if ( $a ) {
$path = isset( $a['path'] ) ? $a['path'] : '';
$host = $parts[0];
if ( $wgAssumeProxiesUseDefaultProtocolPorts && isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) ) {
- // Bug 70021: Assume that upstream proxy is running on the default
+ // T72021: Assume that upstream proxy is running on the default
// port based on the protocol. We have no reliable way to determine
// the actual port in use upstream.
$port = $stdPort;
* available variant URLs.
*/
public function interpolateTitle() {
- // bug 16019: title interpolation on API queries is useless and sometimes harmful
+ // T18019: title interpolation on API queries is useless and sometimes harmful
if ( defined( 'MW_API' ) ) {
return;
}
*
* @since 1.28
* @param string $name
- * @param string|null $default Optional default
+ * @param string|null $default
* @return string|null
*/
public function getRawVal( $name, $default = null ) {
public function response() {
/* Lazy initialization of response object for this request */
if ( !is_object( $this->response ) ) {
- $class = ( $this instanceof FauxRequest ) ? 'FauxResponse' : 'WebResponse';
+ $class = ( $this instanceof FauxRequest ) ? FauxResponse::class : WebResponse::class;
$this->response = new $class();
}
return $this->response;
if (
IP::isPublic( $ipchain[$i + 1] ) ||
$wgUsePrivateIPs ||
- $proxyLookup->isConfiguredProxy( $curIP ) // bug 48919; treat IP as sane
+ $proxyLookup->isConfiguredProxy( $curIP ) // T50919; treat IP as sane
) {
// Follow the next IP according to the proxy
$nextIP = IP::canonicalize( $ipchain[$i + 1] );