Index: trunk/phase3/includes/installer/OracleUpdater.php |
— | — | @@ -20,6 +20,7 @@ |
21 | 21 | array( 'doFKRenameDeferr' ), |
22 | 22 | array( 'doFunctions17' ), |
23 | 23 | array( 'doSchemaUpgrade17' ), |
| 24 | + array( 'doInserPage0' ), |
24 | 25 | ); |
25 | 26 | } |
26 | 27 | |
— | — | @@ -72,7 +73,7 @@ |
73 | 74 | protected function doSchemaUpgrade17() { |
74 | 75 | $this->output( "Updating schema to 17 ... " ); |
75 | 76 | // 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' ) ) ) { |
77 | 78 | $this->output( "schema seem to be up to date.\n" ); |
78 | 79 | return; |
79 | 80 | } |
— | — | @@ -80,6 +81,24 @@ |
81 | 82 | $this->output( "ok\n" ); |
82 | 83 | } |
83 | 84 | |
| 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 | + |
84 | 103 | /** |
85 | 104 | * Overload: after this action field info table has to be rebuilt |
86 | 105 | */ |