Hello all,
The Liquid Threads extension needs several changes to core code in
order to function. None of them overtly mention Liquid Threads; most
of them are just new hooks. They currently live in the liquidthreads
branch, but we would like them to be merged into trunk so that Liquid
Threads can be a pure, easy-to-install extension.
Here's the patch:
http://wikixp.org/lqt-changes-to-trunk-as-of-r26530.txt
Here's a description of the changes, and what they're for. Again,
none of them should have any effect unless Liquid Threads is installed.
Linker.php:
Allow a hook to determine whether a page gets a red link or a blue one.
OutputPage.php:
Accessor method for mRedirect.
SpecialWatchlist.php:
Allow a hook to insert extra SQL into the watchlist query. (We use
this to exclude threads from the watchlist, since we show watched
threads on our own page).
Wiki.php:
Allow a hook to run at the beginning of Mediawiki::performAction().
This is our main entry-point, which we use to display threads and
talkpages specially.
ChangesList.php:
Allow a hook to add extra HTML to RC entries.
Title.php:
Allow a hook to override Title::getRestrictions().
SpecialPage.php:
Normally, the subpage part of a title is stripped out, but we make
this optional, so a special page can receive the information by
setting its mStripSubpages property to false.
EditPage.php:
Several changes:
Added $editFormTextBeforeContent, which works the same way as
$editFormTextTop, etc. It allows us to insert HTML into the edit form
at the appropriate place for a subject field.
Added $didSave, which is set to true when EditPage decides to save an
article, so that appropriate post-save action can be taken (such as
inserting the article into a thread table). Otherwise, there's no way
to see what happened after calling the monolithic edit().
Replaced some instances of $this->mTitle with $this->mArticle()-
getTitle(). EditPage has been using the same mTitle
object (and
occasionally wgTitle, but they're the same object) to refer to two
conceptually separate things: the title indicated by the request URL
(where forms should be posted), and the title of the article being
edited. MW assumes that these are the same title, but Liquid Threads
breaks that assumption, so we need to be able to treat with two
separate title objects. We use $this->mTitle anywhere the web
requests or user-interface is concerned, and $this->mArticle()-
getTitle() when examining or modifying the database.
The value of mArticle and mTitle are both set by EditPage's
constructor: mArticle comes from the method argument, but mTitle is
copied from wgTitle. This means that the two can be set to separate
articles when EditPage is instantiated -- but under normal operation,
they are set to the same article. So EditPage behaves in exactly the
normal way, except when an extension uses this functionality by
passing a different article to the constructor.
That's it. Please review these changes. If I don't hear anything,
I'll commit them into the trunk on Friday. Thanks!
--
David McCabe