saper has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/312561

Change subject: action=history should return 404 if no such page
......................................................................

action=history should return 404 if no such page

Bug: T146496
Change-Id: I158aae3633db56d432f772ee0aa22c39fd6dc7e5
---
M includes/actions/HistoryAction.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/61/312561/1

diff --git a/includes/actions/HistoryAction.php 
b/includes/actions/HistoryAction.php
index f3ef3b3..50415b2 100644
--- a/includes/actions/HistoryAction.php
+++ b/includes/actions/HistoryAction.php
@@ -139,6 +139,7 @@
 
                // Fail nicely if article doesn't exist.
                if ( !$this->page->exists() ) {
+                       $out->setStatusCode( 404 );
                        $out->addWikiMsg( 'nohistory' );
                        # show deletion/move log if there is an entry
                        LogEventsList::showLogExtract(

-- 
To view, visit https://gerrit.wikimedia.org/r/312561
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I158aae3633db56d432f772ee0aa22c39fd6dc7e5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: saper <sa...@saper.info>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to