Page MenuHomePhabricator

new Article(Title::newFromText('foo')) broken if &oldid in url
Closed, InvalidPublic

Description

Author: renegadesnares99

Description:
When viewing previous versions of pages (&oldid in url), the PHP code

new Article(Title::newFromText('foo'));

Returns the article you're viewing, not the article 'foo'.

I am using this in my Extension:CustomSideBar


Version: 1.14.x
Severity: normal

Details

Reference
bz19119

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:37 PM
bzimport set Reference to bz19119.
bzimport added a subscriber: Unknown Object (MLST).

This has always been the case. You can use a zero oldid parameter:

$article = new Article( Title::newFromText('foo'), 0 );

Or just avoid using Article.php at all, since it is full of this kind of rubbish.

renegadesnares99 wrote:

thanks :)