r41403 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41402‎ | r41403 | r41404 >
Date:23:16, 29 September 2008
Author:mattj
Status:old (Comments)
Tags:
Comment:
Fix r41248 (bug 8440) - Default should be 1 to allow for previous behaviour to continue.
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)
  • /trunk/phase3/maintenance/archives/patch-ipb_allow_usertalk.sql (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/archives/patch-ipb_allow_usertalk.sql
@@ -1,3 +1,3 @@
22 -- Adding ipb_allow_usertalk for blocks
33 ALTER TABLE /*$wgDBprefix*/ipblocks
4 - ADD ipb_allow_usertalk bool NOT NULL default 0;
 4+ ADD ipb_allow_usertalk bool NOT NULL default 1;
Index: trunk/phase3/includes/User.php
@@ -1273,8 +1273,9 @@
12741274
12751275 wfDebug( __METHOD__.": asking isBlocked()\n" );
12761276 $blocked = $this->isBlocked( $bFromSlave );
 1277+ $allowUsertalk = ($wgBlockAllowsUTEdit ? $this->mAllowUsertalk : false);
12771278 # If a user's name is suppressed, they cannot make edits anywhere
1278 - if ( !$this->mHideName && $this->mAllowUsertalk && $title->getText() === $this->getName() &&
 1279+ if ( !$this->mHideName && $allowUsertalk && $title->getText() === $this->getName() &&
12791280 $title->getNamespace() == NS_USER_TALK ) {
12801281 $blocked = false;
12811282 wfDebug( __METHOD__.": self-talk page, ignoring any blocks\n" );

Follow-up revisions

RevisionCommit summaryAuthorDate
r41533(bug 8440) Fix ipblocklist to show new allow usertalk flag.mattj08:41, 2 October 2008
r41536(bug 8440) Add API support for new blocking flag, also fix defaults so anywhe...mattj09:34, 2 October 2008

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r41248(bug 8440) Allow preventing blocked users from editing their talk pages...mattj11:45, 25 September 2008

Comments

#Comment by Brion VIBBER (talk | contribs)   20:33, 30 September 2008

Hmm no wait, I didn't revert this. Just marked it as suspicious, I think. :D Needs a schema change and minor applications.

#Comment by TheFearow (talk | contribs)   08:40, 1 October 2008

It should need an UPDATE query run on the existing wiki's which have been patched, Wikimedia at least. Do you think a script put into the updater to do it is necessary, or will having it manually done for those who updated between the two commits be sufficient?

#Comment by Ilmari Karonen (talk | contribs)   02:22, 5 October 2008

Having this column default to 0 appears to be the cause of bugzilla:15812. Someone really needs to run "ALTER TABLE /*$wgDBprefix*/ipblocks ALTER COLUMN ipb_allow_usertalk SET DEFAULT 1" pronto.

#Comment by TheFearow (talk | contribs)   04:56, 5 October 2008

This update query is already run on Wikimedia - the default doesnt matter except retroactively as it is always set when a block is inserted.

Status & tagging log