-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
btongminh(a)svn.wikimedia.org wrote:
Revision: 34877
Author: btongminh
Date: 2008-05-15 18:33:12 +0000 (Thu, 15 May 2008)
Log Message:
-----------
Force output of a full URL in Special:Filepath and ApiQueryImageInfo in case the wiki
images are not configured to full urls.
I've reverted this, see notes:
+ /*
+ * Return the full url of something relative to $wgScriptPath or root
+ */
+ static function makeFullURL( $url ) {
This is a duplicate of wfExpandUrl().
- $wgOut->redirect( $file->getURL() );
+ // Force a real 30x so the real url is always exposed
+ $wgOut->redirect( Http::makeFullURL( $file->getURL() ) );
OutputPage::redirect() already provides this expansion.
- $vals['thumburl'] =
$thumb->getURL();
+ $vals['thumburl'] = Http::makeFullUrl( $thumb->getURL() );
...
- $vals['url'] = $f->getURL();
+ $vals['url'] = Http::makeFullUrl( $f->getURL() );
There should be a nice handy $f->getFullURL() method there ready to use,
IIRC.
- -- brion vibber (brion @
wikimedia.org)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAkgskwAACgkQwRnhpk1wk44LAgCgoNEOcEnusrCsEV8zhdesg2mL
O84AniUf4l31EniUK9cly+1FirsqJvqH
=lyZh
-----END PGP SIGNATURE-----