Title::moveTo()'s search index updates are bogus at the moment; it's using
uninitialized page id vars. Should be easy to fix, but don't forget.
Version: 1.5.x
Severity: normal
• brion | |
May 31 2005, 1:37 PM |
F2080: 2275.patch | |
Nov 21 2014, 8:32 PM |
Title::moveTo()'s search index updates are bogus at the moment; it's using
uninitialized page id vars. Should be easy to fix, but don't forget.
Version: 1.5.x
Severity: normal
dbenbenn wrote:
patch to initialize those variables
Later in the same function, the calls to
new SearchUpdate( $oldid, $nt->getPrefixedDBkey() );
and
new SearchUpdate( $newid, $this->getPrefixedDBkey(), '' );
look backwards. Why is the new article title ($nt) used with the old ID?
Attached:
The variable names were poorly chosen which made this more confusing than it should be. :)
I've changed them to $pageid and $redirid, and moved the getArticleId()s around so it
picks up the right values.
When a page is renamed, its page_id stays constant while its page_namespace and page_title
fields change. A new page is created which redirects to it; this new page carries the old
page_namespace and page_title values, but has a different page_id.