r77999 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77998‎ | r77999 | r78000 >
Date:18:29, 7 December 2010
Author:demon
Status:ok (Comments)
Tags:
Comment:
Remove various "success" messages from Welcome screen on installer, no need to confuse the user with extra info :) Now we only show warnings and failures
Modified paths:
  • /trunk/phase3/includes/installer/Installer.i18n.php (modified) (history)
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Installer.php
@@ -388,16 +388,13 @@
389389 return false;
390390 }
391391
392 - $this->showMessage( 'config-have-db', $wgLang->listToText( $goodNames ), count( $goodNames ) );
393 -
394392 // Check for FTS3 full-text search module
395393 $sqlite = $this->getDBInstaller( 'sqlite' );
396394 if ( $sqlite->isCompiled() ) {
397395 $db = new DatabaseSqliteStandalone( ':memory:' );
398 - $this->showMessage( $db->getFulltextSearchModule() == 'FTS3'
399 - ? 'config-have-fts3'
400 - : 'config-no-fts3'
401 - );
 396+ if( $db->getFulltextSearchModule() == 'FTS3' ) {
 397+ $this->showMessage( 'config-no-fts3' );
 398+ }
402399 }
403400 }
404401
@@ -492,7 +489,6 @@
493490 $this->showMessage( 'config-xml-bad' );
494491 return false;
495492 }
496 - $this->showMessage( 'config-xml-good' );
497493 }
498494
499495 /**
@@ -519,7 +515,6 @@
520516 $limit = ini_get( 'memory_limit' );
521517
522518 if ( !$limit || $limit == -1 ) {
523 - $this->showMessage( 'config-memory-none' );
524519 return true;
525520 }
526521
@@ -539,7 +534,7 @@
540535 $this->setVar( '_RaiseMemory', true );
541536 }
542537 } else {
543 - $this->showMessage( 'config-memory-ok', $limit );
 538+ return true;
544539 }
545540 }
546541
@@ -547,12 +542,10 @@
548543 * Environment check for compiled object cache types.
549544 */
550545 protected function envCheckCache() {
551 - $caches = array();
552 -
 546+ $caches = false;
553547 foreach ( $this->objectCaches as $name => $function ) {
554548 if ( function_exists( $function ) ) {
555549 $caches[$name] = true;
556 - $this->showMessage( 'config-' . $name );
557550 }
558551 }
559552
@@ -573,7 +566,6 @@
574567 $diff3 = $this->locateExecutableInDefaultPaths( $names, $versionInfo );
575568
576569 if ( $diff3 ) {
577 - $this->showMessage( 'config-diff3-good', $diff3 );
578570 $this->setVar( 'wgDiff3', $diff3 );
579571 } else {
580572 $this->setVar( 'wgDiff3', false );
@@ -608,7 +600,6 @@
609601 $IP = dirname( dirname( dirname( __FILE__ ) ) );
610602
611603 $this->setVar( 'IP', $IP );
612 - $this->showMessage( 'config-dir', $IP );
613604
614605 // PHP_SELF isn't available sometimes, such as when PHP is CGI but
615606 // cgi.fix_pathinfo is disabled. In that case, fall back to SCRIPT_NAME
@@ -627,7 +618,6 @@
628619
629620 $uri = preg_replace( '{^(.*)/config.*$}', '$1', $path );
630621 $this->setVar( 'wgScriptPath', $uri );
631 - $this->showMessage( 'config-uri', $uri );
632622 }
633623
634624 /**
@@ -640,9 +630,7 @@
641631 } else {
642632 $ext = 'php';
643633 }
644 -
645634 $this->setVar( 'wgScriptExtension', ".$ext" );
646 - $this->showMessage( 'config-file-extension', $ext );
647635 }
648636
649637 /**
@@ -686,7 +674,6 @@
687675 # Try the current value of LANG.
688676 if ( isset( $candidatesByLocale[ getenv( 'LANG' ) ] ) ) {
689677 $this->setVar( 'wgShellLocale', getenv( 'LANG' ) );
690 - $this->showMessage( 'config-shell-locale', getenv( 'LANG' ) );
691678 return true;
692679 }
693680
@@ -695,7 +682,6 @@
696683 foreach ( $commonLocales as $commonLocale ) {
697684 if ( isset( $candidatesByLocale[$commonLocale] ) ) {
698685 $this->setVar( 'wgShellLocale', $commonLocale );
699 - $this->showMessage( 'config-shell-locale', $commonLocale );
700686 return true;
701687 }
702688 }
@@ -706,7 +692,6 @@
707693 if ( isset( $candidatesByLang[$wikiLang] ) ) {
708694 $m = reset( $candidatesByLang[$wikiLang] );
709695 $this->setVar( 'wgShellLocale', $m[0] );
710 - $this->showMessage( 'config-shell-locale', $m[0] );
711696 return true;
712697 }
713698
@@ -714,7 +699,6 @@
715700 if ( count( $candidatesByLocale ) ) {
716701 $m = reset( $candidatesByLocale );
717702 $this->setVar( 'wgShellLocale', $m[0] );
718 - $this->showMessage( 'config-shell-locale', $m[0] );
719703 return true;
720704 }
721705
@@ -733,7 +717,7 @@
734718 $safe = !$this->dirIsExecutable( $dir, $url );
735719
736720 if ( $safe ) {
737 - $this->showMessage( 'config-uploads-safe' );
 721+ return true;
738722 } else {
739723 $this->showMessage( 'config-uploads-not-safe', $dir );
740724 }
Index: trunk/phase3/includes/installer/Installer.i18n.php
@@ -89,8 +89,6 @@
9090 If you are on shared hosting, ask your hosting provider to install a suitable database driver.
9191 If you compiled PHP yourself, reconfigure it with a database client enabled, for example using <code>./configure --with-mysql</code>.
9292 If you installed PHP from a Debian or Ubuntu package, then you also need install the php5-mysql module.',
93 - 'config-have-db' => 'Found database {{PLURAL:$2|driver|drivers}}: $1.',
94 - 'config-have-fts3' => 'SQLite is compiled with the [http://sqlite.org/fts3.html FTS3 module], search features will be available on this backend.',
9593 'config-no-fts3' => "'''Warning''': SQLite is compiled without the [http://sqlite.org/fts3.html FTS3 module], search features will be unavailable on this backend.",
9694 'config-register-globals' => "'''Warning: PHP's <code>[http://php.net/register_globals register_globals]</code> option is enabled.'''
9795 '''Disable it if you can.'''
@@ -109,7 +107,6 @@
110108 You cannot install or use MediaWiki unless this option is disabled.",
111109 'config-safe-mode' => "'''Warning:''' PHP's [http://www.php.net/features.safe-mode safe mode] is active.
112110 It may cause problems, particularly if using file uploads and <code>math</code> support.",
113 - 'config-xml-good' => 'Have XML / Latin1-UTF-8 conversion support.',
114111 'config-xml-bad' => "PHP's XML module is missing.
115112 MediaWiki requires functions in this module and will not work in this configuration.
116113 If you're running Mandrake, install the php-xml package.",
@@ -117,9 +114,6 @@
118115 MediaWiki requires the Perl-compatible regular expression functions to work.',
119116 'config-pcre-no-utf8' => "'''Fatal''': PHP's PCRE module seems to be compiled without PCRE_UTF8 support.
120117 MediaWiki requires UTF-8 support to function correctly.",
121 - 'config-memory-none' => 'PHP is configured with no <code>memory_limit</code>',
122 - 'config-memory-ok' => "PHP's <code>memory_limit</code> is $1.
123 -OK.",
124118 'config-memory-raised' => "PHP's <code>memory_limit</code> is $1, raised to $2.",
125119 'config-memory-bad' => "'''Warning:''' PHP's <code>memory_limit</code> is $1.
126120 This is probably too low.
@@ -130,7 +124,6 @@
131125 'config-wincache' => '[http://www.iis.net/download/WinCacheForPhp WinCache] is installed',
132126 'config-no-cache' => "'''Warning:''' Could not find [http://eaccelerator.sourceforge.net eAccelerator], [http://www.php.net/apc APC], [http://trac.lighttpd.net/xcache/ XCache] or [http://www.iis.net/download/WinCacheForPhp WinCache].
133127 Object caching is not enabled.",
134 - 'config-diff3-good' => 'Found GNU diff3: <code>$1</code>.',
135128 'config-diff3-bad' => 'GNU diff3 not found.',
136129 'config-imagemagick' => 'Found ImageMagick: <code>$1</code>.
137130 Image thumbnailing will be enabled if you enable uploads.',
@@ -138,13 +131,8 @@
139132 Image thumbnailing will be enabled if you enable uploads.',
140133 'config-no-scaling' => 'Could not find GD library or ImageMagick.
141134 Image thumbnailing will be disabled.',
142 - 'config-dir' => 'Installation directory: <code>$1</code>.',
143 - 'config-uri' => 'Script URI path: <code>$1</code>.',
144135 'config-no-uri' => "'''Error:''' Could not determine the current URI.
145136 Installation aborted.",
146 - 'config-file-extension' => 'Installing MediaWiki with <code>$1</code> file extensions.',
147 - 'config-shell-locale' => 'Detected shell locale "$1"',
148 - 'config-uploads-safe' => 'The default directory for uploads is safe from arbitrary scripts execution.',
149137 'config-uploads-not-safe' => "'''Warning:''' Your default directory for uploads <code>$1</code> is vulnerable to arbitrary scripts execution.
150138 Although MediaWiki checks all uploaded files for security threats, it is highly recommended to [http://www.mediawiki.org/wiki/Manual:Security#Upload_security close this security vulnerability] before enabling uploads.",
151139 'config-brokenlibxml' => 'Your system has a combination of PHP and libxml2 versions which is buggy and can cause hidden data corruption in MediaWiki and other web applications.

Follow-up revisions

RevisionCommit summaryAuthorDate
r78006Logic error from r77999demon20:03, 7 December 2010
r78012Typofix r77999demon21:08, 7 December 2010
r780961.17: Merge recent fixes tagged on CodeReview, except for problematic revisio...catrope21:17, 8 December 2010

Comments

#Comment by Siebrand (talk | contribs)   20:00, 7 December 2010

Yay for clutter removal.

#Comment by Catrope (talk | contribs)   20:53, 7 December 2010
-		$caches = array();
-
+		$caches = false;
[...]
 				$caches[$name] = true;

Uh...

Status & tagging log