As per mailing list: $wgOut->redirect auto expands; File::getFullUrl exists.
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Thu, 15 May 2008 20:55:09 +0000 (20:55 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Thu, 15 May 2008 20:55:09 +0000 (20:55 +0000)
includes/SpecialFilepath.php
includes/api/ApiQueryImageInfo.php

index 37703df..84412ab 100644 (file)
@@ -13,7 +13,7 @@ function wfSpecialFilepath( $par ) {
        } else {
                $file = wfFindFile( $title );
                if ( $file && $file->exists() ) {
-                       $wgOut->redirect( wfExpandUrl( $file->getURL() ) );
+                       $wgOut->redirect( $file->getURL() );
                } else {
                        $wgOut->setStatusCode( 404 );
                        $cform = new FilepathForm( $title );
index b0d8289..bf59b44 100644 (file)
@@ -134,7 +134,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                                        $vals['thumbheight'] = $thumb->getHeight();
                                }
                        }
-                       $vals['url'] = wfExpandUrl( $f->getURL() );
+                       $vals['url'] = $f->getFullURL();
                }
                if($this->fld_comment)
                        $vals['comment'] = $f->getDescription();