* Throw a showstopper exception when a hook function fails to return a value.
[lhc/web/wiklou.git] / includes / filerepo / UnregisteredLocalFile.php
index 72fdc80..ca4dbc4 100644 (file)
 class UnregisteredLocalFile extends File {
        var $title, $path, $mime, $handler, $dims;
 
-       function newFromPath( $path, $mime ) {
+       static function newFromPath( $path, $mime ) {
                return new UnregisteredLocalFile( false, false, $path, $mime );
        }
 
-       function newFromTitle( $title, $repo ) {
+       static function newFromTitle( $title, $repo ) {
                return new UnregisteredLocalFile( $title, $repo, false, false );
        }
 
@@ -92,7 +92,7 @@ class UnregisteredLocalFile extends File {
 
        function getURL() {
                if ( $this->repo ) {
-                       return $this->repo->getZoneUrl( 'public' ) . $this->repo->getHashPath( $this->name ) . urlencode( $this->name );
+                       return $this->repo->getZoneUrl( 'public' ) . '/' . $this->repo->getHashPath( $this->name ) . urlencode( $this->name );
                } else {
                        return false;
                }