better conversion/backwards compatibility
authorTim Starling <tstarling@users.mediawiki.org>
Sun, 18 Jan 2004 02:24:12 +0000 (02:24 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sun, 18 Jan 2004 02:24:12 +0000 (02:24 +0000)
includes/RecentChange.php
maintenance/archives/patch-rc_type.sql

index f2138e1..476b45d 100644 (file)
@@ -21,6 +21,7 @@ mAttributes:
        rc_this_oldid   old_id associated with this entry (or zero)
        rc_last_oldid   old_id associated with the entry before this one (or zero)
        rc_bot          is bot, hidden
+       rc_new          obsolete, use rc_type==RC_NEW
 
 mExtra:
        prefixedDBkey   prefixed db key, used by external app via msg queue
@@ -143,7 +144,8 @@ class RecentChange
                        'rc_last_oldid' => $oldId,
                        'rc_bot'        => $user->isBot() ? 1 : 0,
                        'rc_moved_to_ns'        => 0,
-                       'rc_moved_to_title'     => ''
+                       'rc_moved_to_title'     => '',
+                       'rc_new'        => 0 # obsolete
                );
                
                $rc->mExtra =  array(
@@ -173,7 +175,8 @@ class RecentChange
                        'rc_last_oldid' => 0,
                        'rc_bot'        => $user->isBot() ? 1 : 0,
                        'rc_moved_to_ns'        => 0,
-                       'rc_moved_to_title'     => ''
+                       'rc_moved_to_title'     => '',
+                       'rc_new'        => 1 # obsolete
                );
                
                $rc->mExtra =  array(
@@ -202,7 +205,8 @@ class RecentChange
                        'rc_last_oldid' => 0,
                        'rc_bot'        => $user->isBot() ? 1 : 0,
                        'rc_moved_to_ns'        => $newTitle->getNamespace(),
-                       'rc_moved_to_title'     => $newTitle->getDBkey()
+                       'rc_moved_to_title'     => $newTitle->getDBkey(),
+                       'rc_new'        => 0 # obsolete
                );
                
                $rc->mExtra = array(
@@ -233,7 +237,8 @@ class RecentChange
                        'rc_last_oldid' => 0,
                        'rc_bot'        => 0,
                        'rc_moved_to_ns'        => 0,
-                       'rc_moved_to_title'     => ''
+                       'rc_moved_to_title'     => '',
+                       'rc_new'        => 0 # obsolete
                );
                $rc->mExtra =  array(
                        'prefixedDBkey' => $title->getPrefixedDBkey(),
@@ -267,7 +272,8 @@ class RecentChange
                        'rc_last_oldid' => 0,
                        'rc_bot'        => 0,
                        'rc_moved_to_ns'        => 0,
-                       'rc_moved_to_title'     => ''
+                       'rc_moved_to_title'     => '',
+                       'rc_new' => $row->cur_is_new # obsolete
                );
 
                $this->mExtra = array();
index abe11f9..24db10e 100644 (file)
@@ -4,3 +4,6 @@ ALTER TABLE recentchanges
   ADD rc_type tinyint(3) unsigned NOT NULL default '0',
   ADD rc_moved_to_ns tinyint(3) unsigned NOT NULL default '0',
   ADD rc_moved_to_title varchar(255) binary NOT NULL default '';
+
+UPDATE recentchanges SET rc_type=1 WHERE rc_new;
+UPDATE recentchanges SET rc_type=3 WHERE rc_namespace=4 AND (rc_title='Deletion_log' OR rc_title='Upload_log');