Index: trunk/phase3/maintenance/rebuildtextindex.php |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | */ |
114 | 114 | private function dropMysqlTextIndex() { |
115 | 115 | $searchindex = $this->db->tableName( 'searchindex' ); |
116 | | - if ( $this->db->indexExists( 'searchindex', 'si_title' ) ) { |
| 116 | + if ( $this->db->indexExists( 'searchindex', 'si_title', __METHOD__ ) ) { |
117 | 117 | $this->output( "Dropping index...\n" ); |
118 | 118 | $sql = "ALTER TABLE $searchindex DROP INDEX si_title, DROP INDEX si_text"; |
119 | 119 | $this->db->query( $sql, __METHOD__ ); |
Index: trunk/phase3/maintenance/convertUserOptions.php |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | $id = 0; |
39 | 39 | $dbw = wfGetDB( DB_MASTER ); |
40 | 40 | |
41 | | - if ( !$dbw->fieldExists( 'user', 'user_options ' ) ) { |
| 41 | + if ( !$dbw->fieldExists( 'user', 'user_options', __METHOD__ ) ) { |
42 | 42 | $this->output( "No user_options field in the user table. Nothing to migrate..." ); |
43 | 43 | return; |
44 | 44 | } |
Index: trunk/phase3/tests/testHelpers.inc |
— | — | @@ -121,8 +121,8 @@ |
122 | 122 | function start() { |
123 | 123 | parent::start(); |
124 | 124 | |
125 | | - if ( ! $this->db->tableExists( 'testrun' ) |
126 | | - or ! $this->db->tableExists( 'testitem' ) ) |
| 125 | + if ( ! $this->db->tableExists( 'testrun', __METHOD__ ) |
| 126 | + || ! $this->db->tableExists( 'testitem', __METHOD__ ) ) |
127 | 127 | { |
128 | 128 | print "WARNING> `testrun` table not found in database.\n"; |
129 | 129 | $this->prevRun = false; |
— | — | @@ -305,7 +305,7 @@ |
306 | 306 | $this->db->begin(); |
307 | 307 | |
308 | 308 | if ( ! $this->db->tableExists( 'testrun' ) |
309 | | - or ! $this->db->tableExists( 'testitem' ) ) |
| 309 | + || ! $this->db->tableExists( 'testitem' ) ) |
310 | 310 | { |
311 | 311 | print "WARNING> `testrun` table not found in database. Trying to create table.\n"; |
312 | 312 | $this->db->sourceFile( $this->db->patchPath( 'patch-testrun.sql' ) ); |
Index: trunk/phase3/includes/installer/SqliteUpdater.php |
— | — | @@ -73,7 +73,7 @@ |
74 | 74 | |
75 | 75 | protected function sqliteInitialIndexes() { |
76 | 76 | // initial-indexes.sql fails if the indexes are already present, so we perform a quick check if our database is newer. |
77 | | - if ( $this->updateRowExists( 'initial_indexes' ) || $this->db->indexExists( 'user', 'user_name' ) ) { |
| 77 | + if ( $this->updateRowExists( 'initial_indexes' ) || $this->db->indexExists( 'user', 'user_name', __METHOD__ ) ) { |
78 | 78 | $this->output( "...have initial indexes\n" ); |
79 | 79 | return; |
80 | 80 | } |
Index: trunk/phase3/includes/installer/DatabaseUpdater.php |
— | — | @@ -316,7 +316,7 @@ |
317 | 317 | */ |
318 | 318 | protected function canUseNewUpdatelog() { |
319 | 319 | return $this->db->tableExists( 'updatelog', __METHOD__ ) && |
320 | | - $this->db->fieldExists( 'updatelog', 'ul_value' ); |
| 320 | + $this->db->fieldExists( 'updatelog', 'ul_value', __METHOD__ ); |
321 | 321 | } |
322 | 322 | |
323 | 323 | /** |
— | — | @@ -418,7 +418,7 @@ |
419 | 419 | protected function addField( $table, $field, $patch, $fullpath = false ) { |
420 | 420 | if ( !$this->db->tableExists( $table, __METHOD__ ) ) { |
421 | 421 | $this->output( "...$table table does not exist, skipping new field patch\n" ); |
422 | | - } elseif ( $this->db->fieldExists( $table, $field ) ) { |
| 422 | + } elseif ( $this->db->fieldExists( $table, $field, __METHOD__ ) ) { |
423 | 423 | $this->output( "...have $field field in $table table.\n" ); |
424 | 424 | } else { |
425 | 425 | $this->output( "Adding $field field to table $table..." ); |
— | — | @@ -435,7 +435,7 @@ |
436 | 436 | * @param $fullpath Boolean Whether to treat $patch path as a relative or not |
437 | 437 | */ |
438 | 438 | protected function addIndex( $table, $index, $patch, $fullpath = false ) { |
439 | | - if ( $this->db->indexExists( $table, $index ) ) { |
| 439 | + if ( $this->db->indexExists( $table, $index, __METHOD__ ) ) { |
440 | 440 | $this->output( "...$index key already set on $table table.\n" ); |
441 | 441 | } else { |
442 | 442 | $this->output( "Adding $index key to table $table... " ); |
— | — | @@ -453,7 +453,7 @@ |
454 | 454 | * @param $fullpath Boolean Whether to treat $patch path as a relative or not |
455 | 455 | */ |
456 | 456 | protected function dropField( $table, $field, $patch, $fullpath = false ) { |
457 | | - if ( $this->db->fieldExists( $table, $field ) ) { |
| 457 | + if ( $this->db->fieldExists( $table, $field, __METHOD__ ) ) { |
458 | 458 | $this->output( "Table $table contains $field field. Dropping... " ); |
459 | 459 | $this->applyPatch( $patch, $fullpath ); |
460 | 460 | $this->output( "ok\n" ); |
— | — | @@ -471,7 +471,7 @@ |
472 | 472 | * @param $fullpath Boolean: Whether to treat $patch path as a relative or not |
473 | 473 | */ |
474 | 474 | protected function dropIndex( $table, $index, $patch, $fullpath = false ) { |
475 | | - if ( $this->db->indexExists( $table, $index ) ) { |
| 475 | + if ( $this->db->indexExists( $table, $index, __METHOD__ ) ) { |
476 | 476 | $this->output( "Dropping $index key from table $table... " ); |
477 | 477 | $this->applyPatch( $patch, $fullpath ); |
478 | 478 | $this->output( "ok\n" ); |
— | — | @@ -507,7 +507,7 @@ |
508 | 508 | $updateKey = "$table-$field-$patch"; |
509 | 509 | if ( !$this->db->tableExists( $table, __METHOD__ ) ) { |
510 | 510 | $this->output( "...$table table does not exist, skipping modify field patch\n" ); |
511 | | - } elseif ( !$this->db->fieldExists( $table, $field ) ) { |
| 511 | + } elseif ( !$this->db->fieldExists( $table, $field, __METHOD__ ) ) { |
512 | 512 | $this->output( "...$field field does not exist in $table table, skipping modify field patch\n" ); |
513 | 513 | } elseif( $this->updateRowExists( $updateKey ) ) { |
514 | 514 | $this->output( "...$field in table $table already modified by patch $patch\n" ); |
Index: trunk/phase3/includes/installer/MysqlUpdater.php |
— | — | @@ -583,7 +583,7 @@ |
584 | 584 | $this->output( "ok\n" ); |
585 | 585 | |
586 | 586 | if ( !$this->db->tableExists( 'user_rights', __METHOD__ ) ) { |
587 | | - if ( $this->db->fieldExists( 'user', 'user_rights' ) ) { |
| 587 | + if ( $this->db->fieldExists( 'user', 'user_rights', __METHOD__ ) ) { |
588 | 588 | $this->output( "Upgrading from a 1.3 or older database? Breaking out user_rights for conversion..." ); |
589 | 589 | $this->db->applyPatch( 'patch-user_rights.sql' ); |
590 | 590 | $this->output( "ok\n" ); |
— | — | @@ -762,7 +762,7 @@ |
763 | 763 | protected function doMaybeProfilingMemoryUpdate() { |
764 | 764 | if ( !$this->db->tableExists( 'profiling', __METHOD__ ) ) { |
765 | 765 | // Simply ignore |
766 | | - } elseif ( $this->db->fieldExists( 'profiling', 'pf_memory' ) ) { |
| 766 | + } elseif ( $this->db->fieldExists( 'profiling', 'pf_memory', __METHOD__ ) ) { |
767 | 767 | $this->output( "...profiling table has pf_memory field.\n" ); |
768 | 768 | } else { |
769 | 769 | $this->output( "Adding pf_memory field to table profiling..." ); |
— | — | @@ -793,7 +793,7 @@ |
794 | 794 | } |
795 | 795 | |
796 | 796 | protected function renameEuWikiId() { |
797 | | - if ( $this->db->fieldExists( 'external_user', 'eu_local_id' ) ) { |
| 797 | + if ( $this->db->fieldExists( 'external_user', 'eu_local_id', __METHOD__ ) ) { |
798 | 798 | $this->output( "...eu_wiki_id already renamed to eu_local_id.\n" ); |
799 | 799 | return; |
800 | 800 | } |