Commit graph

774 commits

Author SHA1 Message Date
Roan Kattouw
ae7d7676fb Fix r93820: PROT_ -> PROTO_ 2011-08-03 13:11:42 +00:00
Roan Kattouw
6adb2e86a5 Some random URL protocol forcing for protocol-relative URLs 2011-08-03 12:58:21 +00:00
Roan Kattouw
f450e4eb8c Revert r93237 ("use User::getBlock() accessor rather than accessing $mBlock directly ..."): breaks a test (specifically TitlePermissionTest::testUserBlock()). From what I can tell it looks like the test case is expecting the text of the infinite-block message, but got a Message object instead 2011-07-27 22:28:59 +00:00
Happy-melon
bd8da57b32 Follow-up r93234: use User::getBlock() accessor rather than accessing $mBlock directly. Also fixes r85951 CR, and remove code duplication in Title::checkUserBlock(). 2011-07-26 19:58:26 +00:00
Happy-melon
323fee7cce Implement an accessor for User->mBlock. Doing this separately as it would be nice to backport this to 1.18 for the purposes of updating extensions for 1.19. 2011-07-26 19:27:14 +00:00
Aaron Schulz
11417dd6c3 decodeOptions() used by GlobalAuth - made it public 2011-07-21 17:22:01 +00:00
Ryan Schmidt
a9a452980b * $wgDnsBlacklistUrls now accepts an array with url and key as the elements to work with DNSBLs that require keys, such as Project Honeypot. 2011-07-20 20:12:48 +00:00
Sam Reed
1116a5fcd1 It seems people don't either pay attention to code comments, or those comments lie
r92461
2011-07-18 22:01:40 +00:00
Aaron Schulz
d4fda64542 Refactored new getAutomaticGroups() function out of getEffectiveGroups() 2011-07-18 20:44:51 +00:00
Sam Reed
a1a33c5ed8 Documentation updates
Add a couple of missing explicit class variables
2011-07-18 20:11:53 +00:00
Sam Reed
9a715c3355 Set explicit public modifier
Swap @private to private
2011-07-18 19:56:16 +00:00
Bryan Tong Minh
1fb5d73612 First steps for bug 14801: add backend support for per-namespace permissions to core. This extends $wgGroupPermissions syntax from $wgGroupPermissions[$group][$right] = bool to $wgGroupPermissions[$group][$right] = array( NS_X => bool ). This is safely backwards compatible; the booleans are still fully supported, and any unset namespace will default to false.
* User::getRights(), User::isAllowed() and User::getGroupPermissions now optionally accept a namespace parameter. If not set, it will check whether the user has the right for all namespaces.
* Anything that uses Title::getUserPermissionsErrorsInternal() automatically supports per-namespace permissions. This includes Title::getUserPermissionsErrors and Title::(quick)UserCan.
* Fix tests that set User::mRights

The next step would be to change all User::isAllowed() to Title::quickUserCan or pass the namespace to User::isAllowed().
2011-07-16 16:09:00 +00:00
Aaron Schulz
b7dfb404ed Added $wgAutopromoteOnceLogInRC variable (bug 29655) 2011-07-12 00:09:37 +00:00
Alexandre Emsenhuber
419021ebf0 Removed some error suppression operators 2011-07-08 18:17:02 +00:00
Alexandre Emsenhuber
efc5144e7a * Pass the WebRequest object to User::newFromSession() and use it instead of $wgRequest (will still fall back to $wgRequest if not passed or another method to get an User object)
* Always call User::newFromSession(), not only when not in CLI mode
* Removed User::$mSkin, unused and not set
2011-07-06 16:42:16 +00:00
Robin Pepermans
81446abcdc (see bug 29712) Removing the defaultUserOptionOverrides in MessagesXx.php because it is broken (and has been for a long time) and secondly, it is only used for things that can be done otherwise:
* 'editfont' => 'sans-serif'; -> trivial (can be set in CSS)
* 'underline' => 0; by languages written in scripts that are hard to read with underlines -> now set in shared.css, which makes it work also when they are used as interface language (note that [lang="xx"] is not yet present on wikitext content by default but will be soon as part of my work on RTL improvements)
* 'quickbar' => 2; by RTL languages. For this, I introduced a new option (5) that sets left/right according to the directionality of your interface language (and automatic is better than setting it in MessagesXx files!). Note that the broken feature was in this case "corrected" by CSS flipping, causing preferences to say "left" while it was actually "right". This commit fixes that bug as well.
Third, it actually would have made more sense to have it them load for wgLang instead of wgContLang, but that's not possible because wgLang is itself dependent on preferences
2011-07-05 01:26:49 +00:00
Sam Reed
7d6d29cb7a Followup r91168, fix last usage of $currentUser which was undefined 2011-07-01 01:30:26 +00:00
Alexandre Emsenhuber
c758679f6d Much, much easier to call Linker::link() statically instead of grabbing a Skin from $wgUser 2011-06-30 14:53:37 +00:00
Alexandre Emsenhuber
b9f3c44797 Use the current instance instead of messing with $wgUser 2011-06-30 14:49:12 +00:00
Alexandre Emsenhuber
208eccd1d8 And I forgot to commit this file in r91074 2011-06-30 13:56:45 +00:00
Alexandre Emsenhuber
e7eaf43077 Added some GPL headers 2011-06-28 18:21:59 +00:00
Happy-melon
f26f0a13ae Follow-up r84475 CR; and also documentation fixes; PhpStorm 2.1 is *even more* fussy about documentation format... :D 2011-06-26 23:01:29 +00:00
Aaron Schulz
6f8addb365 Follow-up r90749: use a new 'autopromote' action for the autopromote rights log entries. Removed the 'rightsautocomment' msg. 2011-06-26 21:44:55 +00:00
Sam Reed
6bc9679307 Update calls to deprecated User::isValidEmailAddr
Fix trailing whitespace

Some minor documentation fixes
2011-06-26 19:16:04 +00:00
Aaron Schulz
c78fa7d720 * Core:
** Made addAutopromoteOnceGroups() put in a user rights log entry
** Added APCOND_ISBOT cond to autopromote and updated some docs
* FlaggedRevs:
** (bug 24948) Made $wgFlaggedRevsAutopromote a wrapper around $wgAutopromoteOnce and removed maybeMakeEditor()/recordDemote() (uses r90749)
** Split off new efSetFlaggedRevsOldAutopromoteConfig function
** Removed calls to FlaggedRevs class in setup function to avoid overhead
** Made cache keys in checkAutoPromoteCond() properly unique
** Made wasPreviouslyBlocked() protected and tweaked editSpacingCheck() param order
2011-06-26 04:12:05 +00:00
Aaron Schulz
16eb5f6e41 * Follow-up r90749
** Tweaked addAutopromoteOnceGroups() calls for performance
** Some doc tweaks and fixes
* Added NS_SPECIAL short-circuit on $wgTitle for file cache and removed unnecessary "is null" check
* Pushed "$action != 'raw'" check into HTMLFileCache
* Removed useless return value from performRequest()
* Added type hint to performAction()
2011-06-25 17:59:42 +00:00
Aaron Schulz
04d79f7eeb Follow-up r90749: pushed down accessing of $wgAutopromoteOnce to getAutopromoteOnceGroups() 2011-06-25 05:21:53 +00:00
Aaron Schulz
a44e63967d Follow-up r90749:
* Removed clunky autopromoteOnceHook function and added $wgAutopromoteOnce. It currently supports edit or view based triggering. This makes configuration much simpler.
* Added short-circuit to addAutopromoteOnceGroups() by checking if $criteria is empty
* Spacing tweaks and typo fixes.
2011-06-25 04:58:48 +00:00
Aaron Schulz
cb6b72cef7 Added one-time promote support via Autopromote::autopromoteOnceHook function. This is still a bit rough on the edges. This uses a hook since extension may want to control when it's called for performance reasons. Patch by lampak. (for bug 24948) 2011-06-25 02:52:30 +00:00
Alexandre Emsenhuber
e663f9bce6 Moved wfIsLocallyBlockedProxy() to User::isLocallyBlockedProxy() to put it near other proxy checks. No other call to that function in core or extension.
Also added a check to not execute a part of User::getBlockedStatus() if $ip is null.
2011-06-19 12:57:31 +00:00
Sam Reed
8bfd19b451 Swap else if for elseif
Trimming trailing whitespace also

Doing in 3 commits (3/3), so hopefully reviewable in CR...
2011-06-17 16:05:35 +00:00
Mark A. Hershberger
643c030bcd follow up r84134 — removing passing $this by reference 2011-06-16 23:36:41 +00:00
Mark A. Hershberger
3dd09a4a46 stray tab removal 2011-06-16 23:35:23 +00:00
Platonides
c6050ea46e Document from r87129 summary 2011-06-15 21:23:47 +00:00
Chad Horohoe
c954cb7a4c * Remove @static from the last few places it's left in core. Please don't use this silly annotation anymore, that's what the static keyword is for.
* Enforce protected on SpecialAllPages::getNamespaceKeyAndText(), it's not @private like the comment implies
* Drop User::getMaxID(), nothing uses it
2011-06-14 01:56:55 +00:00
Mark A. Hershberger
45073fb2e3 Revert r89374, r88936 backports. 2011-06-08 20:04:45 +00:00
Sam Reed
3296605ef2 Revert r87292 2011-06-07 21:28:47 +00:00
Krinkle
7459814ff1 Fixing fixme in r87164 (wrong if check) 2011-06-04 14:04:33 +00:00
Mark A. Hershberger
f8aec598e0 Fix for bug #28172 (“wfGetDB called when it shouldn't be”).
forward ported from r88936 and r89374.
2011-06-03 01:06:07 +00:00
Sam Reed
14f6598a95 'unblockself' right was never added to User::$mCoreRights
Noticed while poking bug 27514
2011-06-01 21:44:16 +00:00
Sam Reed
0d47a2ae90 More parameter documentation!! 2011-05-28 14:52:55 +00:00
Alexandre Emsenhuber
92dfa87364 Simplify message existence checks by using wfMessage() instead of wfEmptyMsg() 2011-05-24 17:28:21 +00:00
Sam Reed
33ad682ab0 Add/remove/tweak method documentation 2011-05-19 00:03:31 +00:00
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Siebrand Mazeland
e065a453f8 Make @deprecated documentation more consistent (see: http://svn.wikimedia.org/doc/deprecated.html). 2011-05-17 08:46:29 +00:00
Aaron Schulz
ca25c69e61 Marked some _Newtalk functions protected 2011-05-15 06:32:26 +00:00
Sam Reed
33749b0cad Kill $wgRateLimitsExcludedGroups which was deprecated in 1.13 2011-05-06 21:57:55 +00:00
Tim Starling
1db9197660 * Fix for bug 28534: IE 6 content type detection again
* Fix for bug 28639: user object instance cache pollution
* Release notes formatting tweak.
2011-05-05 05:29:50 +00:00
Sam Reed
9a9c22ea07 * (bug 20468) User::invalidateCache throws 1205: Lock wait timeout exceeded
Severly limit the number of calls that actually update the database (for no gain!). Leaving stuff that needs to update memcached

Still, there's probably quite a lot of these calls which are still superfluous
2011-05-02 20:29:44 +00:00
Alexandre Emsenhuber
ca7bcb1fac Recommit r87129 and follow-ups but with a fix for the bug Brion found (sorry) 2011-04-30 14:08:12 +00:00