Page MenuHomePhabricator

Make Flow use Article::newFromTitle
Closed, ResolvedPublic2 Estimated Story Points

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 18 2020, 10:23 PM
Restricted Application added a project: Growth-Team. · View Herald TranscriptMar 18 2020, 10:27 PM
Art-Baltai updated the task description. (Show Details)Mar 19 2020, 3:01 AM
Aklapper renamed this task from Flow with Article::newFromTitle to Make Flow use Article::newFromTitle.Mar 19 2020, 10:37 AM
Art-Baltai removed Art-Baltai as the assignee of this task.Mar 23 2020, 2:59 PM
Helga_sf set the point value for this task to 2.Apr 30 2020, 2:50 PM

I don't think this is much of an improvement - with all the trouble of updating all the extension, we could probably do a more proper solution, like ArticleFactory interface with some MW service implementing it. However, I am not sure we're ready to be doing something like this, and in general untrue of the future of the Article class.

Change 594820 had a related patch set uploaded (by Art-Baltai; owner: Art-Baltai):
[mediawiki/extensions/Flow@master] OccupationController::ensureFlowRevision Use WikiPage instead of Article

https://gerrit.wikimedia.org/r/594820

FlaggedRevs: Only one "new Article" call exist at \FlaggablePageView::getEditNotices
but

		// HACK fake EditPage
		$editPage = new EditPage( new Article( $title, $oldid ) );
		$editPage->oldid = $oldid;

change to

		// HACK fake EditPage
		$article = Article::newFromTitle( $title, RequestContext::getMain() );
		$article->mOldId = $oldid;
		$editPage = new EditPage( $article );
		$editPage->oldid = $oldid;

is not useful.
$article->mOldId really used

probably a new factory is needed

Change 594820 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] OccupationController::ensureFlowRevision Use WikiPage instead of Article

https://gerrit.wikimedia.org/r/594820

Naike closed this task as Resolved.May 22 2020, 7:11 AM