more debug log messages for errors which have to be cryptic (we don't want people...
authorNeil Kandalgaonkar <neilk@users.mediawiki.org>
Wed, 24 Nov 2010 19:05:32 +0000 (19:05 +0000)
committerNeil Kandalgaonkar <neilk@users.mediawiki.org>
Wed, 24 Nov 2010 19:05:32 +0000 (19:05 +0000)
includes/upload/UploadStash.php

index 8184e93..e76c403 100644 (file)
@@ -103,7 +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" );
+                       wfDebug( "UploadStash: tried to stash file at '$path', but it doesn't exist\n" );
                        throw new UploadStashBadPathException( "path doesn't exist" );
                }
                 $fileProps = File::getPropsFromPath( $path );
@@ -188,11 +188,13 @@ class UploadStashFile extends UnregisteredLocalFile {
                $repoTempPath = $repo->getZonePath( 'temp' );
                if ( ( ! $repo->validateFilename( $path ) ) || 
                                ( strpos( $path, $repoTempPath ) !== 0 ) ) {
+                       wfDebug( "UploadStash: tried to construct an UploadStashFile from a file that should already exist at '$path', but path is not valid\n" );
                        throw new UploadStashBadPathException( 'path is not valid' );
                }
 
                // check if path exists! and is a plain file.
                if ( ! $repo->fileExists( $path, FileRepo::FILES_ONLY ) ) {
+                       wfDebug( "UploadStash: tried to construct an UploadStashFile from a file that should already exist at '$path', but path is not found\n" );
                        throw new UploadStashFileNotFoundException( 'cannot find path, or not a plain file' );
                }