* Security fix for Special:Upload license selection list
* Don't override edit conflict suppression on section edits; section merging
should provide the expected transparency here and fits usage patterns better.
+* (bug 3292) Fix move-over-redirect test when current entries are not plaintext
=== Caveats ===
# Is it a redirect?
$id = $nt->getArticleID();
$obj = $dbw->selectRow( array( 'page', 'revision', 'text'),
- array( 'page_is_redirect','old_text' ),
+ array( 'page_is_redirect','old_text','old_flags' ),
array( 'page_id' => $id, 'page_latest=rev_id', 'rev_text_id=old_id' ),
$fname, 'FOR UPDATE' );
# Not a redirect
return false;
}
+ $text = Revision::getRevisionText( $obj );
# Does the redirect point to the source?
- if ( preg_match( "/\\[\\[\\s*([^\\]\\|]*)]]/", $obj->old_text, $m ) ) {
+ if ( preg_match( "/\\[\\[\\s*([^\\]\\|]*)]]/", $text, $m ) ) {
$redirTitle = Title::newFromText( $m[1] );
if( !is_object( $redirTitle ) ||
$redirTitle->getPrefixedDBkey() != $this->getPrefixedDBkey() ) {
return false;
}
+ } else {
+ # Fail safe
+ return false;
}
# Does the article have a history?