User:Werdna/LQT Updates

From MediaWiki.org
Jump to navigation Jump to search
  • Finished splitting classes out into their own files to ease maintainability.
  • Fix weird design choice, instead of storing the page a thread was associated with, LQT was storing the subject page of that page.
  • Wrote a maintenance script to ease migration from before this change was made.
  • Implement per-page LiquidThreads control, for an orderly roll-out on Wikimedia.
  • Fixed inconsistency between storage and retrieval of top-level threads, resulting in fatal errors on RecentChanges for wikis with LiquidThreads installed.
  • Refactored code to prevent deleted threads from appearing in the TOC -- the code was filtering the threads out at the display level rather than at the retrieval level.
  • Fixed some E_NOTICE in various special page.
  • Added convenience links for thread deletion to various places.
  • Replaced fatal errors with graceful failure in some cases, like clicking a link to an invalid thread, renaming a thread, trying to set a thread subject to a string invalid as a title.
  • Totally reimplemented Special:MoveThread, fixing two or three bugs, and using the cleaner HTMLForm interface which I wrote for my preferences work.
  • Replaced silent failure with an error message (and disabling the field) when a user unable to move pages attempts to change a thread's subject.
  • Fixes for Special:NewMessages associated with the new storage.
  • I've been doing a general code quality review of LiquidThreads, which is partially done. This is one of the priorities that I'll be moving forward with. Generally, I've been making the following changes:
  • Replaced inline <<HEREDOC HTML with properly generated HTML from the Xml:: classes and the Skin object. I've fixed two or three potential (I don't think they were exploitable, though) cross-site scripting bugs here.
  • Improved internal and intrinsic documentation by adding appropriate comments, renaming variables from two letter names to more descriptive names.
  • Replaced internal functions with MediaWiki global functions where appropriate.
  • Fixed invalid XHTML.
  • Fixed potential bugs and logic errors.
  • At the suggestion of Parul (who was kind enough to do a quick interface review), rewrote the TOC generation code to be more useful, putting a whole bunch of pertinent information into a table rather than a tall, thin list that looked like a quoted email.
  • Also at Parul's suggestion, I removed the colouring of usernames, which looked weird, and did a bit more re-jigging to generally prettify the interface.
  • Fixed logging of thread moves from "moved Thread:X to Thread:X" to "moved Thread:X from Talk:Y to Talk:Z".
  • Implemented e-mail notification of new threads and replies. If you're watching either the thread or the talk page and your preferences are set to receive notification for LiquidThreads, you get an email (TODO include the content of the thread/reply in the mail). Also, uses the existing preference for watching messages left on your talk page.
  • Rewrote the method for tracking new messages, as it was doing all kinds of weird stuff. In particular, I rewrote the SQL stuff to pre-generate what was necessary with the Database object, rather than hard-coded SQL which doesn't respect table prefixes or storage engines other than MySQL. I've also consolidated some of the queries to streamline and simplify its approach as "Pull data, push data to database, notify by email". There's scope to easily relegate processing of notifications to the job queue, if need be.
  • Consolidated new messages queries.
  • Disabled new message handling for edits to talk page headers, which don't really classify as 'new messages'.
  • Added quoting functionality to the reply system.
  • Allowed summary prompt cutoff to be modified per-article with a parser function.
  • Totally rewrote almost all user-facing code to automatically generate HTML instead of hard-coding it.
  • Fixed at least two verified cross-site scripting vulnerabilities, with many other possible vectors plugged.
  • General code quality, fixed issues like indentation, internal documentation, variable naming, line breaking.
  • Changed to the strategy of "build HTML, then push it out" rather than pushing it to OutputPage line-by-line. This makes the code more modular, and makes it much easier to use the appropriate Xml functions for HTML generation.
  • Reimplemented ThreadHistoryListingView and TalkpageArchiveView to use the appropriate subclasses of Pager (ReverseChronologicalPager and TablePager) instead of home-grown solutions.
  • Fix a bug in NewMessages which was causing double-notification for edits to a user's talk page.
  • Implement function for Article which grabs the article text, using caches where appropriate, without all the associated cruft in Article::view.
  • Replace some functions defined in LiquidThreads which already exist in core (such as wfArrayToCGi and its reverse).
  • Complete interface redesign, designed to mimic comment threads and forums.
  • Fix, and write backwards-compatibility code for a database corruption issue.
  • Moved some critical information such as subject and authorship information into the thread table, wrote backwards-compatibility code.
  • Fixed context links to point to the thread you're currently viewing in its wider context.
  • Made summarizing available at all times, not just after 14 days.
  • Displayed edit status more prominently in a post header.
  • Rewrote talk-page display to display a paged model, rather than an 'archive' model. This way, threads will simply drop off the bottom of a page, rather than being archived.
  • Fixed double-submission of threads by adding a hidden field with a nonce to the editing form, only allowing one save per nonce.
  • Repointed red links to talk pages to the talk page itself, rather than to the edit page for it.
  • Removed large amounts of cruft, old and overly specific code (Date and QueryGroup classes).
  • Removed unnecessary subqueries, which aren't compatible with MySQL 4.
  • Consolidated queries for talk page views, trying to not do 5 queries per post per talkpage view.
  • Added an icon, and emphasised 'Reply' button.
  • Fixed tab-index issue.