generate debug messages, trying to fix a problem on testwiki
authorNeil Kandalgaonkar <neilk@users.mediawiki.org>
Wed, 24 Nov 2010 18:59:16 +0000 (18:59 +0000)
committerNeil Kandalgaonkar <neilk@users.mediawiki.org>
Wed, 24 Nov 2010 18:59:16 +0000 (18:59 +0000)
includes/upload/UploadStash.php

index 5a66144..8184e93 100644 (file)
@@ -103,6 +103,7 @@ class UploadStash {
         */
        public function stashFile( $path, $data = array(), $key = null ) {
                if ( ! file_exists( $path ) ) {
+                       wfDebug( "UploadStash: tried to stash file at '$path', but it doesn't exist" );
                        throw new UploadStashBadPathException( "path doesn't exist" );
                }
                 $fileProps = File::getPropsFromPath( $path );
@@ -372,6 +373,8 @@ class UploadStashFile extends UnregisteredLocalFile {
 
                // returns a ThumbnailImage object containing the url and path. Note. NOT A FILE OBJECT.
                $thumb = parent::transform( $params, $flags );
+               wfDebug( "UploadStash: generating thumbnail\n" );
+               wfDebug( print_r( $thumb, 1 ) );
                $key = $this->thumbName($params);
 
                // remove extension, so it's stored in the session under '120px-123456'