Index: trunk/phase3/includes/installer/Installer.php |
— | — | @@ -944,6 +944,31 @@ |
945 | 945 | } |
946 | 946 | |
947 | 947 | /** |
| 948 | + * Determine if LocalSettings exists. If it does, return an appropriate |
| 949 | + * status for whether we should can upgrade or not |
| 950 | + * @return Status |
| 951 | + */ |
| 952 | + function getLocalSettingsStatus() { |
| 953 | + global $IP; |
| 954 | + |
| 955 | + $status = Status::newGood(); |
| 956 | + |
| 957 | + wfSuppressWarnings(); |
| 958 | + $ls = file_exists( "$IP/LocalSettings.php" ); |
| 959 | + wfRestoreWarnings(); |
| 960 | + |
| 961 | + if( $ls ) { |
| 962 | + if( $this->parent->getDBInstaller()->needsUpgrade() ) { |
| 963 | + $status->warning( 'config-localsettings-upgrade' ); |
| 964 | + } |
| 965 | + else { |
| 966 | + $status->fatal( 'config-localsettings-noupgrade' ); |
| 967 | + } |
| 968 | + } |
| 969 | + return $status; |
| 970 | + } |
| 971 | + |
| 972 | + /** |
948 | 973 | * On POSIX systems return the primary group of the webserver we're running under. |
949 | 974 | * On other systems just returns null. |
950 | 975 | * |