http://www.mediawiki.org/wiki/Special:Code/MediaWiki/69012

Revision: 69012
Author:   demon
Date:     2010-07-04 19:41:26 +0000 (Sun, 04 Jul 2010)

Log Message:
-----------
Add LocalSettings checker thing. Haven't used it in the UI yet and the 
needsUpgrade() probably doesn't work right yet :)

Modified Paths:
--------------
    trunk/phase3/includes/installer/Installer.php

Modified: trunk/phase3/includes/installer/Installer.php
===================================================================
--- trunk/phase3/includes/installer/Installer.php       2010-07-04 18:55:14 UTC 
(rev 69011)
+++ trunk/phase3/includes/installer/Installer.php       2010-07-04 19:41:26 UTC 
(rev 69012)
@@ -944,6 +944,31 @@
        }
 
        /**
+        * Determine if LocalSettings exists. If it does, return an appropriate
+        * status for whether we should can upgrade or not
+        * @return Status
+        */
+       function getLocalSettingsStatus() {
+               global $IP;
+
+               $status = Status::newGood();
+
+               wfSuppressWarnings();
+               $ls = file_exists( "$IP/LocalSettings.php" );
+               wfRestoreWarnings();
+               
+               if( $ls ) {
+                       if( $this->parent->getDBInstaller()->needsUpgrade() ) {
+                               $status->warning( 
'config-localsettings-upgrade' );
+                       }
+                       else {
+                               $status->fatal( 
'config-localsettings-noupgrade' );
+                       }
+               }
+               return $status;
+       }
+
+       /**
         * On POSIX systems return the primary group of the webserver we're 
running under.
         * On other systems just returns null.
         *



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to