Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

Re: [MediaWiki-CVS] SVN: [34877] trunk/phase3/includes

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


brion at wikimedia

May 15, 2008, 12:46 PM

Post #1 of 2 (66 views)
Permalink
Re: [MediaWiki-CVS] SVN: [34877] trunk/phase3/includes

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

btongminh[at]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-----

_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


bryan.tongminh at gmail

May 15, 2008, 1:56 PM

Post #2 of 2 (60 views)
Permalink
Re: [MediaWiki-CVS] SVN: [34877] trunk/phase3/includes [In reply to]

On Thu, May 15, 2008 at 9:46 PM, Brion Vibber <brion[at]wikimedia.org> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> btongminh[at]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:
>
I read this after I recommited it using wfExpandUrl. Now recommitted
using your points in r34892.

Bryan

_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.