From 655d0c312fbedf77901947b0dfe08db8c49b1257 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sun, 30 Sep 2018 16:57:54 +0200 Subject: [PATCH] Fix caller name in LocalFile::recordUpload2 Seeing {closure} in the logs as caller is not helpful Change-Id: Idbf6ac9606d0f75cae452afffe133c5e3973f334 --- includes/filerepo/file/LocalFile.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index b6c249b4a2..36a44dcf7c 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1696,6 +1696,7 @@ class LocalFile extends File { # Defer purges, page creation, and link updates in case they error out. # The most important thing is that files and the DB registry stay synced. $dbw->endAtomic( __METHOD__ ); + $fname = __METHOD__; # Do some cache purges after final commit so that: # a) Changes are more likely to be seen post-purge @@ -1706,7 +1707,7 @@ class LocalFile extends File { __METHOD__, function () use ( $reupload, $wikiPage, $newPageContent, $comment, $user, - $logEntry, $logId, $descId, $tags + $logEntry, $logId, $descId, $tags, $fname ) { # Update memcache after the commit $this->invalidateCache(); @@ -1758,7 +1759,7 @@ class LocalFile extends File { 'logging', $update, [ 'log_id' => $logId ], - __METHOD__ + $fname ); $this->getRepo()->getMasterDB()->insert( 'log_search', @@ -1767,7 +1768,7 @@ class LocalFile extends File { 'ls_value' => $logEntry->getAssociatedRevId(), 'ls_log_id' => $logId, ], - __METHOD__ + $fname ); # Add change tags, if any -- 2.20.1