From dbda2933a5601c7bdb1e143e0cdbae39f1acbe8d Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 1 Mar 2008 15:54:07 +0000 Subject: [PATCH] (bug 11561) Fix fatal error when calling action=revert to non-image page --- RELEASE-NOTES | 1 + includes/Article.php | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f419f5694b..34ba8bc716 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -61,6 +61,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 13174) __HIDDENCAT__ now applies only to category pages * (bug 13031) Add links to user pages in e-mail form * (bug 13147) Description for categoriespagetext (used in Special:Categories) reworded +* (bug 11561) Fix fatal error when calling action=revert to non-image page === API changes in 1.13 === diff --git a/includes/Article.php b/includes/Article.php index cc0e2c5d9d..f915d01dca 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2949,6 +2949,15 @@ class Article { /**#@-*/ + /** + * Overriden by ImagePage class, only present here to avoid a fatal error + * Called for ?action=revert + */ + public function revert(){ + global $wgOut; + $wgOut->showErrorPage( 'nosuchaction', 'nosuchactiontext' ); + } + /** * Info about this page * Called for ?action=info when $wgAllowPageInfo is on. -- 2.20.1