From 765b31828386a01d7a5224c3e960649f1b2a2a5e Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 18 Jan 2012 21:27:28 +0000 Subject: [PATCH] Add __METHOD__ to begin/commit Improve error message from r109433 --- includes/upload/UploadStash.php | 4 ++-- maintenance/cleanupUploadStash.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index 19114ab8ee..aca2c5b561 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -331,13 +331,13 @@ class UploadStash { $dbw = $this->repo->getMasterDb(); // this gets its own transaction since it's called serially by the cleanupUploadStash maintenance script - $dbw->begin(); + $dbw->begin( __METHOD__ ); $dbw->delete( 'uploadstash', array( 'us_key' => $key ), __METHOD__ ); - $dbw->commit(); + $dbw->commit( __METHOD__ ); // TODO: look into UnregisteredLocalFile and find out why the rv here is sometimes wrong (false when file was removed) // for now, ignore. diff --git a/maintenance/cleanupUploadStash.php b/maintenance/cleanupUploadStash.php index e46b85350b..098a4b4c13 100644 --- a/maintenance/cleanupUploadStash.php +++ b/maintenance/cleanupUploadStash.php @@ -73,7 +73,7 @@ class UploadStashCleanup extends Maintenance { $stash->getFile( $key, true ); $stash->removeFileNoAuth( $key ); } catch ( UploadStashBadPathException $ex ) { - $this->output( 'Failed removing stashed upload with key:' . $key ); + $this->output( "Failed removing stashed upload with key: $key\n" ); continue; } } -- 2.20.1