(bug 11561) Fix fatal error when calling action=revert to non-image page
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 1 Mar 2008 15:54:07 +0000 (15:54 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 1 Mar 2008 15:54:07 +0000 (15:54 +0000)
RELEASE-NOTES
includes/Article.php

index f419f56..34ba8bc 100644 (file)
@@ -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 ===
 
index cc0e2c5..f915d01 100644 (file)
@@ -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.