HomePhabricator

Refactor code to allow board creation

Description

Refactor code to allow board creation

Terminology was confusing to say the least: isCreationAllowed not only checked,
but actually marked it as "this one can be created".

However, it did so by making sure isTalkpageOccupied would return true for that
particular title. isTalkpageOccupied should not be used to determine if a board
page can be created, it should only be used to see if it exists!
I've split those up.
The problem with the former solution: isTalkpageOccupied (without checking the
stored content model) is also used to figure out the default content model for
the page. If a page is magically injected in there (the isCreationAllowed hack),
it is considered the default content model & the content model isn't stored to
DB, assuming whatever makes it default to flow_board will pick that up again
later.
Later (e.g. when restoring a deleted page), the isCreationAllowed hack would not
be called, and it could not be recognized as flow_board.

Bug: T90972
Change-Id: I3497b869b8995074bd3a1c4cf265cd23b6e60be5

Details

Provenance
matthiasmullieAuthored on
EBernhardsonCommitted on Mar 23 2015, 4:49 PM
Parents
rEFLWf39c02c610ec: Merge "Remove ext.flow ResourceLoader group."
Branches
Unknown
Tags
Unknown
References
refs/changes/40/197640/3
ChangeId
I3497b869b8995074bd3a1c4cf265cd23b6e60be5