$allNames = array();
+ // Give grep a chance to find the usages:
+ // config-type-mysql, config-type-postgres, config-type-oracle, config-type-sqlite
foreach ( self::getDBTypes() as $name ) {
$allNames[] = wfMessage( "config-type-$name" )->text();
}
}
# Try the current value of LANG.
- if ( isset( $candidatesByLocale[ getenv( 'LANG' ) ] ) ) {
+ if ( isset( $candidatesByLocale[getenv( 'LANG' )] ) ) {
$this->setVar( 'wgShellLocale', getenv( 'LANG' ) );
return true;
}
*/
public function findExtensions() {
if( $this->getVar( 'IP' ) === null ) {
- return false;
+ return array();
}
- $exts = array();
$extDir = $this->getVar( 'IP' ) . '/extensions';
- $dh = opendir( $extDir );
+ if ( !is_readable( $extDir ) || !is_dir( $extDir ) ) {
+ return array();
+ }
+ $dh = opendir( $extDir );
+ $exts = array();
while ( ( $file = readdir( $dh ) ) !== false ) {
if( !is_dir( "$extDir/$file" ) ) {
continue;
$exts[] = $file;
}
}
+ closedir( $dh );
natcasesort( $exts );
return $exts;
// then adding any callbacks that wanted to attach after a given step
foreach( $coreInstallSteps as $step ) {
$this->installSteps[] = $step;
- if( isset( $this->extraInstallSteps[ $step['name'] ] ) ) {
+ if( isset( $this->extraInstallSteps[$step['name']] ) ) {
$this->installSteps = array_merge(
$this->installSteps,
- $this->extraInstallSteps[ $step['name'] ]
+ $this->extraInstallSteps[$step['name']]
);
}
}
$status = Status::newGood();
try {
$page = WikiPage::factory( Title::newMainPage() );
- $content = new WikitextContent (
+ $content = new WikitextContent(
wfMessage( 'mainpagetext' )->inContentLanguage()->text() . "\n\n" .
wfMessage( 'mainpagedocfooter' )->inContentLanguage()->text()
);
EDIT_NEW,
false,
User::newFromName( 'MediaWiki default' ) );
- } catch (MWException $e) {
+ } catch ( MWException $e ) {
//using raw, because $wgShowExceptionDetails can not be set yet
$status->fatal( 'config-install-mainpage-failed', $e->getMessage() );
}