Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ciencia/b62f7ca1f6c21d9acc39def2eb10c6fd to your computer and use it in GitHub Desktop.
Save ciencia/b62f7ca1f6c21d9acc39def2eb10c6fd to your computer and use it in GitHub Desktop.
patch MediaWiki core T272386 MW1.34
diff --git a/includes/MovePage.php b/includes/MovePage.php
index a5d0af4..7c4c3d4 100644
--- a/includes/MovePage.php
+++ b/includes/MovePage.php
@@ -216,7 +216,9 @@
if ( $this->oldTitle->equals( $this->newTitle ) ) {
$status->fatal( 'selfmove' );
- } elseif ( $this->newTitle->getArticleID() && !$this->isValidMoveTarget() ) {
+ } elseif ( $this->newTitle->getArticleID( Title::READ_LATEST /* T272386 */ )
+ && !$this->isValidMoveTarget()
+ ) {
// The move is allowed only if (1) the target doesn't exist, or (2) the target is a
// redirect to the source, and has no history (so we can undo bad moves right after
// they're done).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment