logging table added columns, fixed cat_id sequence generation in Article and Category
authorJure Kajzer <freakolowsky@users.mediawiki.org>
Wed, 30 Sep 2009 13:38:07 +0000 (13:38 +0000)
committerJure Kajzer <freakolowsky@users.mediawiki.org>
Wed, 30 Sep 2009 13:38:07 +0000 (13:38 +0000)
includes/Article.php
includes/Category.php
maintenance/ora/tables.sql

index 8287682..da033f2 100644 (file)
@@ -4072,7 +4072,8 @@ class Article {
                }
                $insertRows = array();
                foreach( $insertCats as $cat ) {
-                       $insertRows[] = array( 'cat_title' => $cat );
+                       $insertRows[] = array(  'cat_id' => $dbw->nextSequenceValue( 'category_cat_id_val' ),
+                                                                                                                       'cat_title' => $cat );
                }
                $dbw->insert( 'category', $insertRows, __METHOD__, 'IGNORE' );
 
index 611d087..b63685e 100644 (file)
@@ -246,9 +246,11 @@ class Category {
                } else {
                        # Let's be sure that the row exists in the table.  We don't need to
                        # do this if we got the row from the table in initialization!
+                       $seqVal = $dbw->nextSequenceValue( 'category_cat_id_val' );
                        $dbw->insert(
                                'category',
-                               array( 'cat_title' => $this->mName ),
+                               array(  'cat_id' => $seqVal, 
+                                                               'cat_title' => $this->mName ),
                                __METHOD__,
                                'IGNORE'
                        );
index 66fc60a..20ae33a 100644 (file)
@@ -416,8 +416,10 @@ CREATE TABLE &mw_prefix.logging (
   log_action      VARCHAR2(10)         NOT NULL,
   log_timestamp   TIMESTAMP(6) WITH TIME ZONE  NOT NULL,
   log_user        NUMBER                REFERENCES &mw_prefix.mwuser(user_id) ON DELETE SET NULL,
+  log_user_text        VARCHAR2(255),
   log_namespace   NUMBER     NOT NULL,
   log_title       VARCHAR2(255)         NOT NULL,
+       log_page                                NUMBER,
   log_comment     VARCHAR2(255),
   log_params      CLOB,
   log_deleted     NUMBER      DEFAULT '0' NOT NULL