}
return false;
}
-
- /*
- * Return the full url of something relative to $wgScriptPath or root
- */
- static function makeFullURL( $url ) {
- global $wgServer, $wgScriptPath;
-
- // This is a full url
- if ( strpos( $url, '://' ) !== false ) return $url;
-
- // This is a relative path
- if ( substr( $url, 0, 1 ) != '/' )
- $url = $wgScriptPath.'/'.$url;
-
- return $wgServer.$url;
- }
}
} else {
$file = wfFindFile( $title );
if ( $file && $file->exists() ) {
- // Force a real 30x so the real url is always exposed
- $wgOut->redirect( Http::makeFullURL( $file->getURL() ) );
+ $wgOut->redirect( $file->getURL() );
} else {
$wgOut->setStatusCode( 404 );
$cform = new FilepathForm( $title );
$thumb = $f->getThumbnail($this->urlwidth, $this->urlheight);
if($thumb)
{
- $vals['thumburl'] = Http::makeFullUrl( $thumb->getURL() );
+ $vals['thumburl'] = $thumb->getURL();
$vals['thumbwidth'] = $thumb->getWidth();
$vals['thumbheight'] = $thumb->getHeight();
}
}
- $vals['url'] = Http::makeFullUrl( $f->getURL() );
+ $vals['url'] = $f->getURL();
}
if($this->fld_comment)
$vals['comment'] = $f->getDescription();