r76803 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76802‎ | r76803 | r76804 >
Date:15:50, 16 November 2010
Author:demon
Status:ok
Tags:
Comment:
Environment checks don't need to be public
Modified paths:
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Installer.php
@@ -361,7 +361,7 @@
362362 /**
363363 * Check if we're installing the latest version.
364364 */
365 - public function envCheckMediaWikiVersion() {
 365+ protected function envCheckMediaWikiVersion() {
366366 global $wgVersion;
367367
368368 if( !$this->getVar( '_ExternalHTTP' ) ) {
@@ -393,7 +393,7 @@
394394 /**
395395 * Environment check for DB types.
396396 */
397 - public function envCheckDB() {
 397+ protected function envCheckDB() {
398398 global $wgLang;
399399
400400 $compiledDBs = array();
@@ -437,7 +437,7 @@
438438 /**
439439 * Environment check for register_globals.
440440 */
441 - public function envCheckRegisterGlobals() {
 441+ protected function envCheckRegisterGlobals() {
442442 if( wfIniGetBool( "magic_quotes_runtime" ) ) {
443443 $this->showMessage( 'config-register-globals' );
444444 }
@@ -446,7 +446,7 @@
447447 /**
448448 * Some versions of libxml+PHP break < and > encoding horribly
449449 */
450 - public function envCheckBrokenXML() {
 450+ protected function envCheckBrokenXML() {
451451 $test = new PhpXmlBugTester();
452452 if ( !$test->ok ) {
453453 $this->showMessage( 'config-brokenlibxml' );
@@ -458,7 +458,7 @@
459459 * Test PHP (probably 5.3.1, but it could regress again) to make sure that
460460 * reference parameters to __call() are not converted to null
461461 */
462 - public function envCheckPHP531() {
 462+ protected function envCheckPHP531() {
463463 $test = new PhpRefCallBugTester;
464464 $test->execute();
465465 if ( !$test->ok ) {
@@ -470,7 +470,7 @@
471471 /**
472472 * Environment check for magic_quotes_runtime.
473473 */
474 - public function envCheckMagicQuotes() {
 474+ protected function envCheckMagicQuotes() {
475475 if( wfIniGetBool( "magic_quotes_runtime" ) ) {
476476 $this->showMessage( 'config-magic-quotes-runtime' );
477477 return false;
@@ -480,7 +480,7 @@
481481 /**
482482 * Environment check for magic_quotes_sybase.
483483 */
484 - public function envCheckMagicSybase() {
 484+ protected function envCheckMagicSybase() {
485485 if ( wfIniGetBool( 'magic_quotes_sybase' ) ) {
486486 $this->showMessage( 'config-magic-quotes-sybase' );
487487 return false;
@@ -490,7 +490,7 @@
491491 /**
492492 * Environment check for mbstring.func_overload.
493493 */
494 - public function envCheckMbstring() {
 494+ protected function envCheckMbstring() {
495495 if ( wfIniGetBool( 'mbstring.func_overload' ) ) {
496496 $this->showMessage( 'config-mbstring' );
497497 return false;
@@ -500,7 +500,7 @@
501501 /**
502502 * Environment check for zend.ze1_compatibility_mode.
503503 */
504 - public function envCheckZE1() {
 504+ protected function envCheckZE1() {
505505 if ( wfIniGetBool( 'zend.ze1_compatibility_mode' ) ) {
506506 $this->showMessage( 'config-ze1' );
507507 return false;
@@ -510,7 +510,7 @@
511511 /**
512512 * Environment check for safe_mode.
513513 */
514 - public function envCheckSafeMode() {
 514+ protected function envCheckSafeMode() {
515515 if ( wfIniGetBool( 'safe_mode' ) ) {
516516 $this->setVar( '_SafeMode', true );
517517 $this->showMessage( 'config-safe-mode' );
@@ -520,7 +520,7 @@
521521 /**
522522 * Environment check for the XML module.
523523 */
524 - public function envCheckXML() {
 524+ protected function envCheckXML() {
525525 if ( !function_exists( "utf8_encode" ) ) {
526526 $this->showMessage( 'config-xml-bad' );
527527 return false;
@@ -531,7 +531,7 @@
532532 /**
533533 * Environment check for the PCRE module.
534534 */
535 - public function envCheckPCRE() {
 535+ protected function envCheckPCRE() {
536536 if ( !function_exists( 'preg_match' ) ) {
537537 $this->showMessage( 'config-pcre' );
538538 return false;
@@ -548,7 +548,7 @@
549549 /**
550550 * Environment check for available memory.
551551 */
552 - public function envCheckMemory() {
 552+ protected function envCheckMemory() {
553553 $limit = ini_get( 'memory_limit' );
554554
555555 if ( !$limit || $limit == -1 ) {
@@ -579,7 +579,7 @@
580580 /**
581581 * Environment check for compiled object cache types.
582582 */
583 - public function envCheckCache() {
 583+ protected function envCheckCache() {
584584 $caches = array();
585585
586586 foreach ( $this->objectCaches as $name => $function ) {
@@ -599,7 +599,7 @@
600600 /**
601601 * Search for GNU diff3.
602602 */
603 - public function envCheckDiff3() {
 603+ protected function envCheckDiff3() {
604604 $names = array( "gdiff3", "diff3", "diff3.exe" );
605605 $versionInfo = array( '$1 --version 2>&1', 'GNU diffutils' );
606606
@@ -617,7 +617,7 @@
618618 /**
619619 * Environment check for ImageMagick and GD.
620620 */
621 - public function envCheckGraphics() {
 621+ protected function envCheckGraphics() {
622622 $names = array( wfIsWindows() ? 'convert.exe' : 'convert' );
623623 $convert = $this->locateExecutableInDefaultPaths( $names, array( '$1 -version', 'ImageMagick' ) );
624624
@@ -636,7 +636,7 @@
637637 /**
638638 * Environment check for setting $IP and $wgScriptPath.
639639 */
640 - public function envCheckPath() {
 640+ protected function envCheckPath() {
641641 global $IP;
642642 $IP = dirname( dirname( dirname( __FILE__ ) ) );
643643
@@ -666,7 +666,7 @@
667667 /**
668668 * Environment check for setting the preferred PHP file extension.
669669 */
670 - public function envCheckExtension() {
 670+ protected function envCheckExtension() {
671671 // FIXME: detect this properly
672672 if ( defined( 'MW_INSTALL_PHP5_EXT' ) ) {
673673 $ext = 'php5';
@@ -681,7 +681,7 @@
682682 /**
683683 * TODO: document
684684 */
685 - public function envCheckShellLocale() {
 685+ protected function envCheckShellLocale() {
686686 $os = php_uname( 's' );
687687 $supported = array( 'Linux', 'SunOS', 'HP-UX', 'Darwin' ); # Tested these
688688
@@ -758,7 +758,7 @@
759759 /**
760760 * TODO: document
761761 */
762 - public function envCheckUploadsDirectory() {
 762+ protected function envCheckUploadsDirectory() {
763763 global $IP, $wgServer;
764764
765765 $dir = $IP . '/images/';
@@ -799,7 +799,7 @@
800800 /**
801801 * Check the libicu version
802802 */
803 - public function envCheckLibicu() {
 803+ protected function envCheckLibicu() {
804804 $utf8 = function_exists( 'utf8_normalize' );
805805 $intl = function_exists( 'normalizer_normalize' );
806806

Status & tagging log