r77242 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77241‎ | r77242 | r77243 >
Date:19:18, 24 November 2010
Author:catrope
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.16wmf4/includes/upload (modified) (history)
  • /branches/wmf/1.16wmf4/includes/upload/UploadBase.php (modified) (history)
  • /branches/wmf/1.16wmf4/includes/upload/UploadFromFile.php (modified) (history)
  • /branches/wmf/1.16wmf4/includes/upload/UploadStash.php (modified) (history)

Diff [purge]

Property changes on: branches/wmf/1.16wmf4/includes/upload/UploadBase.php
___________________________________________________________________
Modified: svn:mergeinfo
11 Merged /trunk/phase3/includes/upload/UploadBase.php:r77239-77240
Index: branches/wmf/1.16wmf4/includes/upload/UploadStash.php
@@ -101,6 +101,7 @@
102102 */
103103 public function stashFile( $path, $data = array(), $key = null ) {
104104 if ( ! file_exists( $path ) ) {
 105+ wfDebug( "UploadStash: tried to stash file at '$path', but it doesn't exist\n" );
105106 throw new UploadStashBadPathException( "path doesn't exist" );
106107 }
107108 $fileProps = File::getPropsFromPath( $path );
@@ -184,11 +185,13 @@
185186 $repoTempPath = $repo->getZonePath( 'temp' );
186187 if ( ( ! $repo->validateFilename( $path ) ) ||
187188 ( strpos( $path, $repoTempPath ) !== 0 ) ) {
 189+ wfDebug( "UploadStash: tried to construct an UploadStashFile from a file that should already exist at '$path', but path is not valid\n" );
188190 throw new UploadStashBadPathException( 'path is not valid' );
189191 }
190192
191193 // check if path exists! and is a plain file.
192194 if ( ! $repo->fileExists( $path, FileRepo::FILES_ONLY ) ) {
 195+ wfDebug( "UploadStash: tried to construct an UploadStashFile from a file that should already exist at '$path', but path is not found\n" );
193196 throw new UploadStashFileNotFoundException( 'cannot find path, or not a plain file' );
194197 }
195198
@@ -365,6 +368,8 @@
366369
367370 // returns a ThumbnailImage object containing the url and path. Note. NOT A FILE OBJECT.
368371 $thumb = parent::transform( $params, $flags );
 372+ wfDebug( "UploadStash: generating thumbnail\n" );
 373+ wfDebug( print_r( $thumb, 1 ) );
369374 $key = $this->thumbName($params);
370375
371376 // remove extension, so it's stored in the session under '120px-123456'
Property changes on: branches/wmf/1.16wmf4/includes/upload/UploadStash.php
___________________________________________________________________
Modified: svn:mergeinfo
372377 Merged /trunk/phase3/includes/upload/UploadStash.php:r77239-77240
Property changes on: branches/wmf/1.16wmf4/includes/upload/UploadFromFile.php
___________________________________________________________________
Modified: svn:mergeinfo
373378 Merged /trunk/phase3/includes/upload/UploadFromFile.php:r77239-77240
Property changes on: branches/wmf/1.16wmf4/includes/upload
___________________________________________________________________
Added: svn:mergeinfo
374379 Merged /branches/sqlite/includes/upload:r58211-58321
375380 Merged /trunk/phase3/includes/upload:r63549,63764,63897-63901,64113,64509,65387,65391,65555,65590,65650,65816,71059,71098,71942,72024,72120,72525,77239-77240
376381 Merged /branches/wmf-deployment/includes/upload:r53381,60970
377382 Merged /branches/REL1_15/phase3/includes/upload:r51646

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r77239generate debug messages, trying to fix a problem on testwikineilk18:59, 24 November 2010
r77240more debug log messages for errors which have to be cryptic (we don't want pe...neilk19:05, 24 November 2010

Status & tagging log