r89429 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89428‎ | r89429 | r89430 >
Date:18:39, 3 June 2011
Author:brion
Status:ok
Tags:
Comment:
Revert r89409: provided a default Database->listTables() implementation that didn't actually check the database, thus missing extension tables, any custom tables, any other tables being managed deliberately, and would be missing a matching table prefix if any.
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -2445,12 +2445,7 @@
24462446 * @param $fname String: calling function name
24472447 */
24482448 function listTables( $prefix = null, $fname = 'DatabaseBase::listTables' ) {
2449 - global $IP;
2450 - //throw new MWException( 'DatabaseBase::listTables is not implemented in descendant class' );
2451 - $tables = file_get_contents( "$IP/maintenance/tables.sql" );
2452 - preg_match_all('/create table \/\*_\*\/([a-z0-9_]*)/i', $tables, $matches, PREG_PATTERN_ORDER);
2453 -
2454 - return $matches[1];
 2449+ throw new MWException( 'DatabaseBase::listTables is not implemented in descendant class' );
24552450 }
24562451
24572452 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r89409* suggestion for using tables.sql parsing instead of database query for table...freakolowsky11:43, 3 June 2011

Status & tagging log