Add __METHOD__ to begin/commit
authorSam Reed <reedy@users.mediawiki.org>
Wed, 18 Jan 2012 21:27:28 +0000 (21:27 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 18 Jan 2012 21:27:28 +0000 (21:27 +0000)
Improve error message from r109433

includes/upload/UploadStash.php
maintenance/cleanupUploadStash.php

index 19114ab..aca2c5b 100644 (file)
@@ -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.
index e46b853..098a4b4 100644 (file)
@@ -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;
                        }
                }