Fixing a bug in my last commit to make it also work on related changes.
authorLeon Weber <leon@users.mediawiki.org>
Sat, 9 Dec 2006 12:28:02 +0000 (12:28 +0000)
committerLeon Weber <leon@users.mediawiki.org>
Sat, 9 Dec 2006 12:28:02 +0000 (12:28 +0000)
includes/RecentChange.php
includes/SpecialRecentchangeslinked.php

index 781d74c..38ae322 100644 (file)
@@ -341,7 +341,9 @@ class RecentChange
                        'rc_moved_to_title'     => $newTitle->getDBkey(),
                        'rc_ip'         => $ip,
                        'rc_new'        => 0, # obsolete
-                       'rc_patrolled' => 1
+                       'rc_patrolled'  => 1,
+                       'rc_old_len'    => 0,
+                       'rc_new_len'    => 0,
                );
 
                $rc->mExtra = array(
@@ -391,7 +393,9 @@ class RecentChange
                        'rc_moved_to_title'     => '',
                        'rc_ip' => $ip,
                        'rc_patrolled' => 1,
-                       'rc_new'        => 0 # obsolete
+                       'rc_new'        => 0, # obsolete
+                       'rc_old_len'    => 0,
+                       'rc_new_len'    => 0,
                );
                $rc->mExtra =  array(
                        'prefixedDBkey' => $title->getPrefixedDBkey(),
@@ -435,7 +439,9 @@ class RecentChange
                        'rc_ip' => '',
                        'rc_id' => $row->rc_id,
                        'rc_patrolled' => $row->rc_patrolled,
-                       'rc_new' => $row->page_is_new # obsolete
+                       'rc_new' => $row->page_is_new, # obsolete
+                       'rc_old_len' => 0, # we can't get the text lengts from a cur row
+                       'rc_new_len' => 0,
                );
 
                $this->mExtra = array();
index c1c0240..487cdae 100644 (file)
@@ -98,7 +98,9 @@ function wfSpecialRecentchangeslinked( $par = NULL ) {
                                rc_bot,
                                rc_new,
                                rc_patrolled,
-                               rc_type
+                               rc_type,
+                               rc_old_len,
+                               rc_new_len
 " . ($uid ? ",wl_user" : "") . "
            FROM $categorylinks, $recentchanges
 " . ($uid ? "LEFT OUTER JOIN $watchlist ON wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace " : "") . "
@@ -125,7 +127,9 @@ $GROUPBY
                        rc_bot,
                        rc_new,
                        rc_patrolled,
-                       rc_type
+                       rc_type,
+                       rc_old_len,
+                       rc_new_len
 " . ($uid ? ",wl_user" : "") . "
    FROM $pagelinks, $recentchanges
 " . ($uid ? " LEFT OUTER JOIN $watchlist ON wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace " : "") . "