LiquidThreads code quality, bug fixes and cleanup:
authorAndrew Garrett <werdna@users.mediawiki.org>
Fri, 31 Jul 2009 10:59:11 +0000 (10:59 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Fri, 31 Jul 2009 10:59:11 +0000 (10:59 +0000)
* Remove large swathes of dead code, hooks that have never existed, and dormant methods.
* Remove the TalkpageArchiveView, which has been inaccessible from the UI for ages.
* Break most miscellaneous hooks out into their own file, classes/Hooks.php
* Float the reply link on the RHS.
* Organise the hooks section of LiquidThreads.php somewhat.
* Remove deprecated =& syntax in some places.
* Move scratchTitle and related methods into Threads class instead of View class.
* Kill home-grown revision insertion code from leaveTrace, and rewrite it to use Article::doEdit
* Internal documentation, variable naming as appropriate.
* Remove special-case handling for links, unnecessary now.
* Fix customizeOldChangesList, it looks like it was never properly tested. Even if it had worked, it would have put (not by the author) on every edit to a post.
* Fail fast when trying to move a non-toplevel thread.
* Add rollback, extra links to the end of new-thread recentchanges entries.

includes/ChangesList.php

index cf6db5b..b51b166 100644 (file)
@@ -398,7 +398,7 @@ class ChangesList {
        }
        
        /** Inserts a rollback link */
-       protected function insertRollback( &$s, &$rc ) {
+       public function insertRollback( &$s, &$rc ) {
                global $wgUser;
                if( !$rc->mAttribs['rc_new'] && $rc->mAttribs['rc_this_oldid'] && $rc->mAttribs['rc_cur_id'] ) {
                        $page = $rc->getTitle();
@@ -418,7 +418,7 @@ class ChangesList {
                }
        }
 
-       protected function insertTags( &$s, &$rc, &$classes ) {
+       public function insertTags( &$s, &$rc, &$classes ) {
                if ( empty($rc->mAttribs['ts_tags']) )
                        return;
                        
@@ -427,7 +427,7 @@ class ChangesList {
                $s .= ' ' . $tagSummary;
        }
 
-       protected function insertExtra( &$s, &$rc, &$classes ) {
+       public function insertExtra( &$s, &$rc, &$classes ) {
                ## Empty, used for subclassers to add anything special.
        }
 }