(bug 29558) Add config var to disable update.php. Did this by checking $wgMiserMode...
authorChad Horohoe <demon@users.mediawiki.org>
Wed, 13 Jul 2011 22:14:19 +0000 (22:14 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Wed, 13 Jul 2011 22:14:19 +0000 (22:14 +0000)
RELEASE-NOTES-1.19
maintenance/update.php

index 7345f7e..10332e6 100644 (file)
@@ -73,6 +73,7 @@ production.
 * (bug 15802) An easy way to look up messages: language qqx which returns
   the message keys.
 * (bug 29868) Add support for passing parameters to mw.msg in jquery.localize.
+* (bug 29558) $wgMiserMode now disables update.php by default
 
 === Bug fixes in 1.19 ===
 * (bug 28868) Show total pages in the subtitle of an image on the
index ede6ebe..ef60a77 100644 (file)
@@ -43,6 +43,7 @@ class UpdateMediaWiki extends Maintenance {
                $this->addOption( 'quick', 'Skip 5 second countdown before starting' );
                $this->addOption( 'doshared', 'Also update shared tables' );
                $this->addOption( 'nopurge', 'Do not purge the objectcache table after updates' );
+               $this->addOption( 'iknowwhatimdoing', 'Override when $wgMiserMode disables this script' );
        }
 
        function getDbType() {
@@ -75,7 +76,13 @@ class UpdateMediaWiki extends Maintenance {
        }
 
        function execute() {
-               global $wgVersion, $wgTitle, $wgLang;
+               global $wgVersion, $wgTitle, $wgLang, $wgMiserMode;
+
+               if( $wgMiserMode && !$this->hasOption( 'iknowwhatimdoing' ) ) {
+                       $this->error( "Do not run update.php on this wiki. If you're seeing this you should\n"
+                               . "probably ask for some help in performing your schema updates.\n\n"
+                               . "If you know what you are doing, you can continue with --iknowwhatimdoing", true );
+               }
 
                $wgLang = Language::factory( 'en' );
                $wgTitle = Title::newFromText( "MediaWiki database updater" );