Last modified: 2010-05-15 15:41:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T9526, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 7526 - $wgDefaultUserOptions['editsection'] = 0 does not work
$wgDefaultUserOptions['editsection'] = 0 does not work
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.7.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-09 06:45 UTC by Heinz-Josef Lücking
Modified: 2010-05-15 15:41 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Heinz-Josef Lücking 2006-10-09 06:45:44 UTC
MediaWiki 1.71
Function initialiseFromUser( &$userInput ) {
Line 4591

     $this->mEditSection = true;

meaning imho that by default the possibility to edit section is set to 
true. I think this is a reason why in LocalSettings.php

     $wgDefaultUserOptions['editsection'] = 0

does'nt work (It did not in my wiki).


In MediaWiki 1.46 you can find the line.

     $this->mEditSection = $user->getOption( 'editsection' );

Here the possibility to edit section is defined by LocalSettings.php.

I used this lines for my purpose

    if ($user->getID()) {
       $this->mEditSection = $user->getOption( 'editsection' );
    } else {
       $this->mEditSection = 0;
    }

by Zigger, from (http): 
mail.wikipedia.org/pipermail/mediawiki-l/2004-November/002099.html


HeinzJ
Comment 1 Dan Li 2006-10-09 06:48:39 UTC
By the way, this does not affect 1.8, AFAIK.
Comment 2 Brion Vibber 2006-10-09 08:19:46 UTC
$wgDefaultUserOptions appears to be used anywhere by MediaWiki, which
would explain why it doesn't work. :)

Fixed in r16884.
Comment 3 Dan Li 2006-10-10 03:37:55 UTC
Sweet, I don't need to use an extension function to set defaults any more (since
the advertised UserDefaultOptions hook didn't exist either o_O).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links