r86708 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86707‎ | r86708 | r86709 >
Date:14:23, 22 April 2011
Author:freakolowsky
Status:resolved (Comments)
Tags:
Comment:
* insert page 0 (for FK) if updating
Modified paths:
  • /trunk/phase3/includes/installer/OracleUpdater.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/OracleUpdater.php
@@ -20,6 +20,7 @@
2121 array( 'doFKRenameDeferr' ),
2222 array( 'doFunctions17' ),
2323 array( 'doSchemaUpgrade17' ),
 24+ array( 'doInserPage0' ),
2425 );
2526 }
2627
@@ -72,7 +73,7 @@
7374 protected function doSchemaUpgrade17() {
7475 $this->output( "Updating schema to 17 ... " );
7576 // check if iwlinks table exists which was added in 1.17
76 - if ( $this->db->tableExists( trim( $this->db->tableName( 'iwlinks' ) ) ) ) {
 77+ if ( $this->db->tableExists( $this->db->tableName( 'iwlinks' ) ) ) {
7778 $this->output( "schema seem to be up to date.\n" );
7879 return;
7980 }
@@ -80,6 +81,24 @@
8182 $this->output( "ok\n" );
8283 }
8384
 85+ protected function doInserPage0() {
 86+ $this->output( "Inserting page 0 if missing ... " );
 87+ $row = array(
 88+ 'page_id' => 0,
 89+ 'page_namespace' => 0,
 90+ 'page_title' => ' ',
 91+ 'page_counter' => 0,
 92+ 'page_is_redirect' => 0,
 93+ 'page_is_new' => 0,
 94+ 'page_random' => 0,
 95+ 'page_touched' => $this->db->timestamp(),
 96+ 'page_latest' => 0,
 97+ 'page_len' => 0
 98+ );
 99+ $this->db->insert( 'page', $row, 'OracleUpdater:doInserPage0', array( 'IGNORE' ) );
 100+ $this->output( "ok\n" );
 101+ }
 102+
84103 /**
85104 * Overload: after this action field info table has to be rebuilt
86105 */

Follow-up revisions

RevisionCommit summaryAuthorDate
r86710* merge of r86708.freakolowsky14:26, 22 April 2011
r86929* typo from r86708freakolowsky07:17, 26 April 2011
r86930* merge of r86929 (typo from r86708)freakolowsky07:18, 26 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86701* begin, commit, rollback functions updated...freakolowsky11:31, 22 April 2011

Comments

#Comment by Nikerabbit (talk | contribs)   16:21, 22 April 2011

doInsertPage?

Status & tagging log