Commit graph

188 commits

Author SHA1 Message Date
awjrichards
c29fd59775 Big oops - merged to wrong branch.
Revert "Revert to arbitrarily old point before initial remote branch creation to help clean up"

This reverts commit ee0d3d330f
2012-06-05 22:58:54 +00:00
awjrichards
ee0d3d330f Revert to arbitrarily old point before initial remote branch creation to help clean up
Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
2012-06-02 08:43:04 -07:00
Liangent
ce62df7bef Use message 'parentheses' in prefs-changeemail.
Change-Id: Iba4498b93e3ae45be84b6716bd6764ddfab7c113
2012-05-29 13:35:33 +08:00
Alexandre Emsenhuber
d1f8640a3b Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ia45d0756cd84138da267bf1cbd1a58be7f28c6d1
2012-05-11 10:34:29 +02:00
Alexandre Emsenhuber
5fc4d3739c Per Siebrand, follow-up I55939bb5295e73594c3fdf7287dddbc16a233ce4 (r4099):
* Add message documentation
* Changed 'emaildisabled' wording for better understandability
* Added @since comment in User::setEmailWithConfirmation() and @deprecated in Preferences::trySetUserEmail()

Change-Id: I73c4b82ff2493a26ffbab426f30cd9af5680e503
2012-04-03 18:44:06 +02:00
Alexandre Emsenhuber
eb6df43f2e Moved Preferences::trySetUserEmail() to User::setEmailWithConfirmation()
* Much more easier to find it in the User class than in Preferences and it's general enough to be in that class.
* Rewrote the function for better readbility
* It now always return a Status object so that it's easier to interpret its result.
* Update the only caller in core (in Special:ChangeEmail) and moved the PrefsEmailAdit hook there

Change-Id: I55939bb5295e73594c3fdf7287dddbc16a233ce4
2012-04-03 10:50:34 +02:00
Daniel Friesen
e2ee009e5c Commit the cryptrand project worked on in git:
- MWCryptRand: A new api for generating cryptographic randomness for security tokens. Uses whatever cryptographic source is available and if not falls back to using random state and clock drift.
- wfRandomString - A simple non-cryptographic pesudo-random string generation function to replace wfGenerateToken which was written pretending to be secure when it's really not.
- Core updates to use MWCryptRand in various places:
-- user_token generation (to do this we stop generating user_token implicitly and only generate it when needed to avoid depleting the system's entropy pool by reading random data we'll never use)
-- email confirmation token generation
-- password salt generation
-- temporary password generation
-- Generation of the automatic watchlist token
-- login and create user tokens
-- session ids when php's entropy sources are not set
-- the installer when generating wgSecretKey and the upgrade key
2012-03-20 05:17:40 +00:00
Alexandre Emsenhuber
8e5ba63af7 * (bug 35152) Fix for r92924: help message for e-mail was removed from user preferences 2012-03-13 07:39:33 +00:00
Antoine Musso
160a471957 (bug 34302) Add CSS classes to email fields in user preferences
Patch by Nischay Nahata whom I have mentored earlier this week.
2012-03-07 09:56:24 +00:00
Robin Pepermans
44d2c73bf5 Combine getLanguageNames and getTranslatedLanguageNames into one function which is much easier and more logical to use. Does not contain any actual changes yet in what the function does.
* Reduces the overly long code in r107002, and reduces code for {{#language:}}
* Fixes the language list in Special:Translate which contained languages that gave "invalid code" when selecting
2012-02-27 11:59:24 +00:00
Derk-Jan Hartman
c78f613b38 Bug 27619: Remove the option to show broken links as: link?
Being bold here, but otherwise it will still be there in 2016
2012-02-19 13:06:18 +00:00
Sam Reed
c8eb4467f1 Fix user related direct member variable access 2012-02-16 00:54:34 +00:00
Antoine Musso
d5d1585900 revert r111234 (deprecated methods removal)
Reasons invoked by Rob Lanphier are:
* ongoing code slush
* backwards compatilibility issues
2012-02-12 19:25:28 +00:00
Alexandre Emsenhuber
435c7eb616 Remove some methods marked for removal in 1.20 and update FakeTitle accordingly.
No more callers in core or extensions.
2012-02-11 14:36:36 +00:00
Benny Situ
978f299e03 Revert from 107187 to 107186 for bug24430 patch, it causes layout issue 2012-01-25 18:26:46 +00:00
Alexandre Emsenhuber
7134e2c654 * Inlinise Preferences::loadOldSearchNs() in SearchEngine::userNamespaces(); the latter is the only caller of the former
* Made code clearer and removed duplication
* Marked Preferences::loadOldSearchNs() as deprecated
2012-01-20 16:12:34 +00:00
Sam Reed
c8737e4ef9 Partial revert ContextSource changes from r108785, r108786 2012-01-13 02:40:09 +00:00
Sam Reed
51cf68ff28 A couple more for r108785
More doucmentations
2012-01-13 02:30:51 +00:00
Sam Reed
383ec85043 Documentation
As we're using stuff from ContextSource everwhere, limiting stuff to a type hint of IContextSource isn't much use
2012-01-13 02:27:44 +00:00
Aaron Schulz
5a6559d8b1 Reverted r108743 per CR comment. This should at least be discussed first. 2012-01-12 19:41:18 +00:00
Sam Reed
a5c200a25b Kill "* @return void" 2012-01-12 19:12:24 +00:00
Benny Situ
937563b444 bug24430 - patch from Chinchin, remove number of column for edit field in preference 2011-12-23 22:47:10 +00:00
Benny Situ
a7da936d27 Bugzilla bug11612 - Make watchlist max days preference setting reflect the max days in Recent Changes 2011-12-23 18:55:04 +00:00
Alexandre Emsenhuber
bb91f74ad2 * Use Language::userTimeAndDate() and related instead of Language::timeanddate() when using user preferences to display dates
* Use local variables instead of calling some methods three times
* Fixed casing of remaining Language::timeanddate() call
2011-12-19 18:19:03 +00:00
Sam Reed
b5f11fa813 * (bug 32960) remove EmailAuthenticationTimestamp from database when a
email address is removed

In Preferences::trySetUserEmail no point trying to reset the users email if it's the same

Same for User::setEmail

After setting the email though, invalidate email auth tokens
2011-12-11 15:31:17 +00:00
Chad Horohoe
a1f5c6ce73 Minor tweaks to cleanSig(inSig)
* Make cleanSig public, since it's a declared entry point per class docs
* Make cleanSigInSig public static, added 2 more test cases for it
2011-12-06 23:07:13 +00:00
John Du Hart
216d661d3b Bug 29524 - Rename RequestContext::getLang to getLanguage
I'll be amazed if this doens't break any tests.
2011-11-21 16:13:21 +00:00
Alexandre Emsenhuber
8758594579 * Removed Preferences::validateEmail() to that e-mail address modification is in another special page, no callers
* Added $form parameter to Preferences::cleanSignature() and Preferences::validateSignature(), they are passed to the functions since r102879
* Use local context to get messages
2011-11-17 10:06:56 +00:00
Roan Kattouw
386a2658fd On the preferences form, make preferences and other items at the top level of a section (e.g. with 'section' => 'foo') appear above rather than below subsections (e.g. stuff with 'section' => 'foo/bar'). This seems like natural behavior to me, but for some reason HTMLForm had it the other way around. I left the default behavior unchanged in HTMLForm and changed it only in PreferencesForm.
This change is needed for my work on the Gadgets extension in the RL2 branch (one example is adding text on top of a preferences section using a dummy type=>'info' preference, you want that to show up on top, not after all the subsections). The targeted use case (sections that contain both subsections and form elements) does not occur for core preferences, and is very uncommon in extensions. I managed to find such uses in only 3 of them: CreateAPage (in unreachable code), Tasks and EditSimilar add preferences to core sections that also contain subsections.
2011-10-31 14:41:02 +00:00
Roan Kattouw
a0a775a9b4 Followup r101354: pass $this to the PreferencesGetLegend hook so the callee will have a ContextSource to work with 2011-10-31 13:19:38 +00:00
Roan Kattouw
b2b8ea70db Introduce the PreferencesGetLegend hook. I need this to customize the labels of <fieldset>s in the preferences for the Gadgets extension in the RL2 branch and I can't think of a cleaner way to do this. 2011-10-31 12:36:51 +00:00
Sam Reed
96641da58e Add, update, tweak documentation
Fix document comment blocks

Tweak some returns
2011-10-26 03:44:47 +00:00
Alexandre Emsenhuber
bd548f36e9 * Changed ParserOptions to store a Language object instead of only a string, avoids object -> string -> object conversion
* ParserOptions::getUserLang() will still return a string for compatibility, added ParserOptions::getUserLangObj() to get the object
* Added ParserOptions::newFromUserAndLang() and ParserOptions::newFromContext() to easily get a ParserOptions object when a context is available or when someone wants to force the language
* Updated OutputPage and Preferences to use newFromContext() and WikiPage to use newFromUserAndLang()
* ParserOptions::setUserLang() still accepts either a string or a Language object, but changed the calls to pass an object instead of a string
* Changed Parser::getFunctionLang() to return the Language object from ParserOptions when parsing interface messages rather than $wgLang directly and updated the documentation to say that $wgLang should not be used directly (as $wgUser, $wgTitle and $wgRequest)
2011-10-19 14:16:01 +00:00
Chad Horohoe
215376e771 Self revert r99899....I HATE YOU PHPUNIT YOU @#Q**#(#@(#@@#(!!! 2011-10-15 19:06:31 +00:00
Chad Horohoe
9a860bef79 Temporarily reverting r99863 to see if I can pin down test failures 2011-10-15 19:02:07 +00:00
Alexandre Emsenhuber
3a07a052c9 * Timezones are now recognised in user preferences when offset is different due to DST 2011-10-15 09:11:29 +00:00
Alexandre Emsenhuber
b6008e9086 * Use the context when building the preferences form descriptor
* Pass the HTMLForm object to the submit callback so that it can have a context and also access to the form itself (see below). This makes Preferences::tryUISubmit() and Prefrences::tryFormSubmit() signatures incompatible. The only extension calling these is EditUser and I will fix in my next commit.
* Added two extension possibilites (for EditUser): PreferencesForm::getExtraSuccessRedirectParameters() to modify the URL parameters when redirecting after successful save and the fourthparameter to Prefrences::getFormObject() to be able to remove some items from the descriptor
* Pass the user being modified to the HTMLForm to use it to save the preferences instead of doing this unconditionally on $wgUser (to remove one hack in EditUser preferences)
2011-10-09 11:43:06 +00:00
Niklas Laxström
c04ace5435 Part of bug 31503 - Allow gender distinction also for user groups 2011-10-08 14:13:17 +00:00
Aaron Schulz
97a9a6899f (bug 31283) Made ChangeEmail check $wgAuth->allowPropChange( 'emailaddress' ). Fix for r92924. Mark beat me to committing the rest of the fix in r98558, which just hid the link to the special page. 2011-09-30 20:43:45 +00:00
Mark A. Hershberger
a81a0b1844 re r92924 andFix Bug #31283 - "Change E-mail" option in Preference should be hidden
when AuthPlugin#allowEmailChange() returns false

Patch from Rusty Burchfield
2011-09-30 20:36:52 +00:00
Daniel Friesen
391736c081 Use IContextSource instead of RequestContext inside type hints and instanceof checks. All we need is something that implements IContextSource and it's possible we may want to implement types of RequestContext that don't directly extend RequestContext but are perfectly valid to be passed to classes. 2011-09-15 15:19:49 +00:00
Robin Pepermans
af5dc604f6 * Change the message 'yourvariant' to a more descriptive one (might be a bit too long however), and remove it as an optional message. Also added a help message to explain it.
* Make getVariantname fallback to the language name, and use that in Preferences. Shouldn't change the names in practice, but is a more logical implementation imho.
* (Fix a typo in Language.php)
2011-09-10 17:12:35 +00:00
Robin Pepermans
3d99669908 Conversion script between Tifinagh and Latin for the Tachelhit language
Preferences: made getLanguageNames include those that don't have a Messages file
2011-09-10 04:09:20 +00:00
Roan Kattouw
b295b9e1e1 Followup r92155, move preferences-specific code introduced in HTMLForm to Preferences.php. Dropping $displayTitle and replacing it with something else is OK since $displayTitle was introduced as a hack for the preferences form anyway 2011-08-25 09:44:20 +00:00
Alexandre Emsenhuber
0ec422d303 Use local context instead of global variables 2011-08-22 18:32:48 +00:00
Robin Pepermans
165519fdf5 * CategoryPage.php: fix the "category-empty" message per comment on r91518, it was outside the bodyContent. And do not convert interface text.
* Parser.php: Apparently that was a much bigger bug: do not convert interface text going through the parser either.
* Preferences.php: Do not convert the user signature.
For this bug in action, see e.g. http://sr.wikipedia.org/sr-ec/Посебно:Подешавањ?uselang=en (e.g. "Username" -> "Усернаме")
2011-08-11 19:58:23 +00:00
Alexandre Emsenhuber
5473d64671 Call Linker methods statically 2011-08-03 17:19:32 +00:00
Mark A. Hershberger
97969f7d99 w/s changes: “svn diff -x-w” is clean 2011-08-01 16:01:13 +00:00
Aaron Schulz
74b15fc8c4 * Moved email changing from sp:Preferences to new sp:ChangeEmail, which requires confirming the user password. This reduces the impact of session hijacking, which was increased slightly with r86482. Changing a password already required confirming the old one. This change closes the loophole of changing the email address and then doing a reset.
* Parse 'mailerror' message correctly
2011-07-23 00:48:39 +00:00
Leo Koppelkamm
42d5c3f64d HTMLForm: Add option to output a title for a fieldset & activate it for Special:Pref. Preliminary work for Bug 29672 2011-07-08 21:12:10 +00:00