Set wpSourceType to file by default for backwards compatibility with user scripts.
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 18 Sep 2009 20:43:12 +0000 (20:43 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 18 Sep 2009 20:43:12 +0000 (20:43 +0000)
includes/upload/UploadBase.php

index 09d0a37..dbbf1e1 100644 (file)
@@ -73,7 +73,7 @@ abstract class UploadBase {
         * Create a form of UploadBase depending on wpSourceType and initializes it
         */
        public static function createFromRequest( &$request, $type = null ) {
-               $type = $type ? $type : $request->getVal( 'wpSourceType' );
+               $type = $type ? $type : $request->getVal( 'wpSourceType', 'File' );
 
                if( !$type )
                        return null;