r101867 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101866‎ | r101867 | r101868 >
Date:20:15, 3 November 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
*grumble grumble* know it alls think I'm abusing $wgMiserMode. So fine, have a SHINY NEW GLOBAL INSTEAD. bug 32072, r92109, yada-yada.

This is not a "useless" error message, regardless of what the bug claims.
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/maintenance/update.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/update.php
@@ -43,7 +43,7 @@
4444 $this->addOption( 'quick', 'Skip 5 second countdown before starting' );
4545 $this->addOption( 'doshared', 'Also update shared tables' );
4646 $this->addOption( 'nopurge', 'Do not purge the objectcache table after updates' );
47 - $this->addOption( 'force', 'Override when $wgMiserMode disables this script' );
 47+ $this->addOption( 'force', 'Override when $wgAllowSchemaUpdates disables this script' );
4848 }
4949
5050 function getDbType() {
@@ -76,9 +76,9 @@
7777 }
7878
7979 function execute() {
80 - global $wgVersion, $wgTitle, $wgLang, $wgMiserMode;
 80+ global $wgVersion, $wgTitle, $wgLang, $wgAllowSchemaUpdates;
8181
82 - if( $wgMiserMode && !$this->hasOption( 'force' ) ) {
 82+ if( $wgAllowSchemaUpdates && !$this->hasOption( 'force' ) ) {
8383 $this->error( "Do not run update.php on this wiki. If you're seeing this you should\n"
8484 . "probably ask for some help in performing your schema updates.\n\n"
8585 . "If you know what you are doing, you can continue with --force", true );
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1423,6 +1423,8 @@
14241424 $wgWantedPagesThreshold = 1;
14251425 /** Enable slow parser functions */
14261426 $wgAllowSlowParserFunctions = false;
 1427+/** Allow schema updates */
 1428+$wgAllowSchemaUpdates = true;
14271429
14281430 /**
14291431 * Do DELETE/INSERT for link updates instead of incremental

Follow-up revisions

RevisionCommit summaryAuthorDate
r101869Whoops, need a !demon20:17, 3 November 2011
r107907MFT r100348, r100640, r101656, r101867, r101869m r104030reedy17:34, 3 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r92109(bug 29558) Add config var to disable update.php. Did this by checking $wgMis...demon22:14, 13 July 2011

Comments

#Comment by Duplicatebug (talk | contribs)   16:25, 4 November 2011

scaptrap, someone has to set that global on wmf wikis to false.

#Comment by 😂 (talk | contribs)   16:26, 4 November 2011

Not a scaptrap, since shell users should know better anyway. It can be done at any time before or after this is merged+deployed.

#Comment by Dantman (talk | contribs)   22:39, 3 December 2011

This didn't make it into 1.18. Annoying...

Also, isn't the boolean wrong? It looks like this will show the update.php warning when you DO have $wgAllowSchemaUpdates set to true.

#Comment by 😂 (talk | contribs)   19:41, 4 December 2011

Do people need this in 1.18? It was mostly a WMF hack. If you need it, feel free to backport it ;-)

Was already fixed in r101869, forgot to add the followup sorry.

#Comment by Dantman (talk | contribs)   20:14, 4 December 2011

We had a user in #mediawiki who was bit by $wgMiserMode triggering that message. So yeah, I'd say the variable name change should be backported to the next release we make when we do.

#Comment by Hashar (talk | contribs)   12:56, 13 December 2011

Looks good.

Unmarking 1.18 which is for bug fix only now, not new globals/features whatever.

#Comment by Dantman (talk | contribs)   17:46, 13 December 2011

We have people upgrading to 1.18 who are being bit by the fact that this 1/2 of the update.php change never made it in before the release was branched.

Status & tagging log