* Added rev_sha1 and ar_sha1 columns to revision/archive tables (useful for bug 25312)
[lhc/web/wiklou.git] / maintenance / renameDbPrefix.php
index adeb540..289e747 100644 (file)
@@ -65,7 +65,7 @@ class RenameDbPrefix extends Maintenance {
                $count = 0;
 
                $dbw = wfGetDB( DB_MASTER );
-               $res = $dbw->query( "SHOW TABLES LIKE '" . $dbw->escapeLike( $old ) . "%'" );
+               $res = $dbw->query( "SHOW TABLES " . $dbw->buildLike( $old, $dbw->anyString() ) );
                foreach ( $res as $row ) {
                        // XXX: odd syntax. MySQL outputs an oddly cased "Tables of X"
                        // sort of message. Best not to try $row->x stuff...
@@ -84,4 +84,4 @@ class RenameDbPrefix extends Maintenance {
 }
 
 $maintClass = "RenameDbPrefix";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );