* (bug 24089) Logevents causes PHP Notice if leprop=title isn't supplied
[lhc/web/wiklou.git] / includes / Wiki.php
index 8fb75ce..cb0ef8b 100644 (file)
@@ -207,6 +207,7 @@ class MediaWiki {
                                $output->redirect( $url );
                        } else {
                                $title = SpecialPage::getTitleFor( 'Badtitle' );
+                               $output->setTitle( $title ); // bug 21456
                                wfProfileOut( __METHOD__ );
                                throw new ErrorPageError( 'badtitle', 'badtitletext' );
                        }
@@ -319,6 +320,7 @@ class MediaWiki {
                $file = ($title->getNamespace() == NS_FILE) ? $article->getFile() : null;
                if( ( $action == 'view' || $action == 'render' )        // ... for actions that show content
                        && !$request->getVal( 'oldid' ) &&    // ... and are not old revisions
+                       !$request->getVal( 'diff' ) &&    // ... and not when showing diff
                        $request->getVal( 'redirect' ) != 'no' &&       // ... unless explicitly told not to
                        // ... and the article is not a non-redirect image page with associated file
                        !( is_object( $file ) && $file->exists() && !$file->getRedirected() ) )
@@ -486,6 +488,8 @@ class MediaWiki {
                if ( $action === 'historysubmit' ) {
                        if ( $request->getBool( 'revisiondelete' ) ) {
                                $action = 'revisiondelete';
+                       } elseif ( $request->getBool( 'revisionmove' ) ) {
+                               $action = 'revisionmove';
                        } else {
                                $action = 'view';
                        }
@@ -574,6 +578,11 @@ class MediaWiki {
                                $special = SpecialPage::getPage( 'Revisiondelete' );
                                $special->execute( '' );
                                break;
+                       case 'revisionmove':
+                               # For revision move submission from history page
+                               $special = SpecialPage::getPage( 'RevisionMove' );
+                               $special->execute( '' );
+                               break;
                        default:
                                if( wfRunHooks( 'UnknownAction', array( $action, $article ) ) ) {
                                        $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' );