Index: trunk/phase3/maintenance/updaters.inc |
— | — | @@ -135,7 +135,7 @@ |
136 | 136 | |
137 | 137 | function do_interwiki_update() { |
138 | 138 | # Check that interwiki table exists; if it doesn't source it |
139 | | - global $wgDatabase; |
| 139 | + global $wgDatabase, $IP; |
140 | 140 | if( $wgDatabase->tableExists( "interwiki" ) ) { |
141 | 141 | echo "...already have interwiki table\n"; |
142 | 142 | return true; |
— | — | @@ -144,7 +144,7 @@ |
145 | 145 | dbsource( archive("patch-interwiki.sql") ); |
146 | 146 | echo "ok\n"; |
147 | 147 | echo "Adding default interwiki definitions: "; |
148 | | - dbsource( "maintenance/interwiki.sql" ); |
| 148 | + dbsource( "$IP/maintenance/interwiki.sql" ); |
149 | 149 | echo "ok\n"; |
150 | 150 | } |
151 | 151 | |
— | — | @@ -207,7 +207,7 @@ |
208 | 208 | } else { |
209 | 209 | echo "Adding wl_notificationtimestamp field for email notification management."; |
210 | 210 | /* ALTER TABLE watchlist ADD (wl_notificationtimestamp varchar(14) binary NOT NULL default '0'); */ |
211 | | - dbsource( "maintenance/archives/patch-email-notification.sql", $wgDatabase ); |
| 211 | + dbsource( archive( 'patch-email-notification.sql' ), $wgDatabase ); |
212 | 212 | echo "ok\n"; |
213 | 213 | } |
214 | 214 | # Check if we need to add talk page rows to the watchlist |
— | — | @@ -273,7 +273,7 @@ |
274 | 274 | global $wgDatabase; |
275 | 275 | if( $wgDatabase->fieldExists( 'user', 'user_emailauthenticationtimestamp' ) ) { |
276 | 276 | echo "User table contains old email authentication field. Dropping... "; |
277 | | - dbsource( "maintenance/archives/patch-email-authentication.sql", $wgDatabase ); |
| 277 | + dbsource( archive( 'patch-email-authentication.sql' ), $wgDatabase ); |
278 | 278 | echo "ok\n"; |
279 | 279 | } else { |
280 | 280 | echo "...user table does not contain old email authentication field.\n"; |
— | — | @@ -297,7 +297,7 @@ |
298 | 298 | echo "Logging table has correct title encoding.\n"; |
299 | 299 | } else { |
300 | 300 | echo "Fixing title encoding on logging table... "; |
301 | | - dbsource( 'maintenance/archives/patch-logging-title.sql', $wgDatabase ); |
| 301 | + dbsource( archive( 'patch-logging-title.sql' ), $wgDatabase ); |
302 | 302 | echo "ok\n"; |
303 | 303 | } |
304 | 304 | } |
— | — | @@ -472,7 +472,7 @@ |
473 | 473 | $fname="do_schema_restructuring"; |
474 | 474 | if( $wgDatabase->fieldExists( 'revision', 'inverse_timestamp' ) ) { |
475 | 475 | echo "Removing revision.inverse_timestamp and fixing indexes... "; |
476 | | - dbsource( 'maintenance/archives/patch-inverse_timestamp.sql', $wgDatabase ); |
| 476 | + dbsource( archive( 'patch-inverse_timestamp.sql' ), $wgDatabase ); |
477 | 477 | echo "ok\n"; |
478 | 478 | } else { |
479 | 479 | echo "revision timestamp indexes already up to 2005-03-13\n"; |
— | — | @@ -485,7 +485,7 @@ |
486 | 486 | echo "...rev_text_id already in place.\n"; |
487 | 487 | } else { |
488 | 488 | echo "Adding rev_text_id field... "; |
489 | | - dbsource( 'maintenance/archives/patch-rev_text_id.sql', $wgDatabase ); |
| 489 | + dbsource( archive( 'patch-rev_text_id.sql' ), $wgDatabase ); |
490 | 490 | echo "ok\n"; |
491 | 491 | } |
492 | 492 | } |
— | — | @@ -534,7 +534,7 @@ |
535 | 535 | echo "...already have pagelinks table.\n"; |
536 | 536 | } else { |
537 | 537 | echo "Converting links and brokenlinks tables to pagelinks... "; |
538 | | - dbsource( "maintenance/archives/patch-pagelinks.sql", $wgDatabase ); |
| 538 | + dbsource( archive( 'patch-pagelinks.sql' ), $wgDatabase ); |
539 | 539 | echo "ok\n"; |
540 | 540 | flush(); |
541 | 541 | |
— | — | @@ -573,7 +573,7 @@ |
574 | 574 | |
575 | 575 | if( $wgDatabase->fieldExists( 'image', 'img_type' ) ) { |
576 | 576 | echo "Dropping unused img_type field in image table... "; |
577 | | - dbsource( "maintenance/archives/patch-drop_img_type.sql", $wgDatabase ); |
| 577 | + dbsource( archive( 'patch-drop_img_type.sql' ), $wgDatabase ); |
578 | 578 | echo "ok\n"; |
579 | 579 | } else { |
580 | 580 | echo "No img_type field in image table; Good.\n"; |
— | — | @@ -599,7 +599,7 @@ |
600 | 600 | echo "WARNING: This next step will probably fail due to unfixed duplicates...\n"; |
601 | 601 | } |
602 | 602 | echo "Adding unique index on user_name... "; |
603 | | - dbsource( 'maintenance/archives/patch-user_nameindex.sql', $wgDatabase ); |
| 603 | + dbsource( archive( 'patch-user_nameindex.sql' ), $wgDatabase ); |
604 | 604 | echo "ok\n"; |
605 | 605 | } |
606 | 606 | } |
— | — | @@ -614,13 +614,13 @@ |
615 | 615 | } |
616 | 616 | |
617 | 617 | echo "Adding user_groups table... "; |
618 | | - dbsource( 'maintenance/archives/patch-user_groups.sql', $wgDatabase ); |
| 618 | + dbsource( archive( 'patch-user_groups.sql' ), $wgDatabase ); |
619 | 619 | echo "ok\n"; |
620 | 620 | |
621 | 621 | if( !$wgDatabase->tableExists( 'user_rights' ) ) { |
622 | 622 | if( $wgDatabase->fieldExists( 'user', 'user_rights' ) ) { |
623 | 623 | echo "Upgrading from a 1.3 or older database? Breaking out user_rights for conversion..."; |
624 | | - dbsource( 'maintenance/archives/patch-user_rights.sql', $wgDatabase ); |
| 624 | + dbsource( archive( 'patch-user_rights.sql' ), $wgDatabase ); |
625 | 625 | echo "ok\n"; |
626 | 626 | } else { |
627 | 627 | echo "*** WARNING: couldn't locate user_rights table or field for upgrade.\n"; |
— | — | @@ -666,7 +666,7 @@ |
667 | 667 | echo "ok\n"; |
668 | 668 | |
669 | 669 | echo "Re-adding fresh user_groups table... "; |
670 | | - dbsource( 'maintenance/archives/patch-user_groups.sql', $wgDatabase ); |
| 670 | + dbsource( archive( 'patch-user_groups.sql' ), $wgDatabase ); |
671 | 671 | echo "ok\n"; |
672 | 672 | |
673 | 673 | echo "***\n"; |