From bbc8f405753d71cfd389da1e7fd574ef1a42c12a Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 11 Nov 2015 19:36:13 -0800 Subject: [PATCH] Move down $logEntry publish() call in recordUpload2() This was moved before the defered doEditContent() call for new pages by mistake. Bug: T118433 Change-Id: I007acf82622ec6d68c007921f632793392025f40 --- includes/filerepo/file/LocalFile.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 1a335386c2..c2bbb4eae4 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -1404,8 +1404,6 @@ class LocalFile extends File { ) { # Update memcache after the commit $that->invalidateCache(); - # Page exists, do RC entry now (otherwise we wait for later) - $logEntry->publish( $logId ); if ( $newPageContent ) { # New file page; create the description page. @@ -1419,7 +1417,6 @@ class LocalFile extends File { $user ); - // Now that the page exists, make an RC entry. // This relies on the resetArticleID() call in WikiPage::insertOn(), // which is triggered on $descTitle by doEditContent() above. if ( isset( $status->value['revision'] ) ) { @@ -1438,6 +1435,8 @@ class LocalFile extends File { $wikiPage->getTitle()->purgeSquid(); } + # Now that the page exists, make an RC entry. + $logEntry->publish( $logId ); # Run hook for other updates (typically more cache purging) Hooks::run( 'FileUpload', array( $that, $reupload, !$newPageContent ) ); -- 2.20.1