From: Sam Reed Date: Wed, 18 Jan 2012 21:27:28 +0000 (+0000) Subject: Add __METHOD__ to begin/commit X-Git-Tag: 1.31.0-rc.0~25199 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=765b31828386a01d7a5224c3e960649f1b2a2a5e;p=lhc%2Fweb%2Fwiklou.git Add __METHOD__ to begin/commit Improve error message from r109433 --- 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; } }