From: Umherirrender Date: Sun, 30 Sep 2018 14:57:54 +0000 (+0200) Subject: Fix caller name in LocalFile::recordUpload2 X-Git-Tag: 1.34.0-rc.0~3950 X-Git-Url: https://git.cyclocoop.org/admin/%7B%7Blocalurl:Special:UserLogin%7D%7D?a=commitdiff_plain;h=655d0c312fbedf77901947b0dfe08db8c49b1257;p=lhc%2Fweb%2Fwiklou.git Fix caller name in LocalFile::recordUpload2 Seeing {closure} in the logs as caller is not helpful Change-Id: Idbf6ac9606d0f75cae452afffe133c5e3973f334 --- 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