Suppress warnings on reading interwiki.list in case permissions or something else makes it not work.

Tweak message since we no longer read the .sql file.
This commit is contained in:
Chad Horohoe 2011-02-04 21:10:02 +00:00
parent dbca2e1954
commit 31b0483aa6
2 changed files with 4 additions and 2 deletions

View file

@ -547,11 +547,13 @@ abstract class DatabaseInstaller {
return $status;
}
global $IP;
wfSuppressWarnings();
$rows = file( "$IP/maintenance/interwiki.list",
FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES );
wfRestoreWarnings();
$interwikis = array();
if ( !$rows ) {
return Status::newFatal( 'config-install-interwiki-sql' );
return Status::newFatal( 'config-install-interwiki-list' );
}
foreach( $rows as $row ) {
$row = preg_replace( '/^\s*([^#]*?)\s*(#.*)?$/', '\\1', $row ); // strip comments - whee

View file

@ -457,7 +457,7 @@ Make sure that the user "$1" can write to the schema "$2".',
Skipping creation.",
'config-install-tables-failed' => "'''Error''': Table creation failed with the following error: $1",
'config-install-interwiki' => 'Populating default interwiki table',
'config-install-interwiki-sql' => 'Could not find file <code>interwiki.sql</code>.',
'config-install-interwiki-list' => 'Could not read file <code>interwiki.list</code>.',
'config-install-interwiki-exists' => "'''Warning''': The interwiki table seems to already have entries.
Skipping default list.",
'config-install-stats' => 'Initializing statistics',