Commit graph

301 commits

Author SHA1 Message Date
Bartosz Dziewoński
709e43aaf9 Preferences: Use case-insensitive comparison for skin names
They are treated case-insensitively everywhere else.

Change-Id: I2561150aca9d88ad67ef359143f06d0ee90ab52e
2015-04-30 16:01:29 +00:00
umherirrender
2c7fa0d7cd Use Language::userTime in Preferences::datetimePreferences
This avoids the indirect use of $wgUser

Change-Id: I951f5c4399dff6bb17c04e20dd9a7f763027b873
2015-04-10 19:34:44 +02:00
cenarium
2e73174639 Adjusting patrol checks for RC and watchlist prefs
This uses the NP patrol check instead of the RC patrol check for the
preference option that allows to hide unpatrolled new pages by default.
And this checks use of RC patrol for the user instead of the config for
the watchlist option (so that users who cannot patrol don't have it).

Bug: T89716
Change-Id: I2895a96f8c21ade83b0174d0d02d1b7e00625737
2015-02-18 20:17:16 +00:00
glaisher
7719ea4b3e Add links to Special:EditWatchlist in Preferences' Watchlist tab
This adds a new "Edit watchlist" section to Watchlist tab with links
to Special:EditWatchlist, EditWatchlist/raw and EditWatchlist/clear.

Bug: T26632
Change-Id: Id31fba4f7aadaa3e427becece3837a8d00b7718f
2015-01-24 20:52:24 +05:00
gladoscc
e0f77ade75 Escape unescaped messages in Special:Preferences
Bug: T85864
Change-Id: Ie516549bce72a0052570ab38bde4c03e2bc1b69b
2015-01-07 12:12:25 +11:00
Kunal Mehta
4603f28025 Avoid GlobalTitleFail in HTMLFormField::__construct
Pass the HTMLForm parent instance in the constructor so context
is available when parsing a message.

Change-Id: I532c0d95698cbcc57294b9bd2725f33838f393a9
2014-12-17 14:20:14 -08:00
Aaron Schulz
e369f66d00 Replace wfRunHooks calls with direct Hooks::run calls
* This avoids the overhead of an extra function call

Change-Id: I8ee996f237fd111873ab51965bded3d91e61e4dd
2014-12-10 12:26:59 -08:00
jenkins-bot
cb1f290d1e Merge "Revert "Add maxlength of 6 for time correction in preferences"" 2014-10-20 18:21:51 +00:00
Mattflaschen
b07b5af485 Revert "Add maxlength of 6 for time correction in preferences"
As noted by Bartosz, System|60 is also valid (apparently also 
ZoneInfo|something, but not sure what can go after ZoneInfo), and the 
maxlength interferes with this.

Maybe eventually we could revisit and use input#pattern 
(http://www.w3.org/TR/html51/forms.html#the-pattern-attribute).  That 
allows specifying a regex, which could have different length limits 
depending whether it started with a number (AFAICT, the 6 length is valid 
if it starts with a digit).

But for now, that is not urgent, and we need to fix the regression.

This reverts commit da470ce005.

Bug: 70405
Change-Id: Ib585c76688284dab78e85fb355785c06d0c3e353
2014-10-20 18:02:27 +00:00
jdlrobson
a155ac55ea Hygiene: Make construction of buttons easier
Stop littering MediaWiki with globals, provide a common
api for generating them similar to how we do text input
attributes before things get out of control.

Adds
* submitButton
* linkButton

Change-Id: I61bb3c358f755ed9f2153d94b744c1a9da02c456
2014-09-30 14:54:56 -07:00
umherirrender
d041222fae Remove Preferences::trySetUserEmail (deprecated 1.20)
Change-Id: I31b008c93eae54b2aecc18154d0c2e3df3fdb712
2014-09-26 14:38:01 -07:00
Matthew Flaschen
da470ce005 Add maxlength of 6 for time correction in preferences
* Supported formats (controlled by filterTimezoneInput) are:
** -12:34/01:23.  It says, "Max is +14:00 and min is -12:00", both
   of which fit in 6 (if someone uses -24:00/+24:00, it's the same width
   anyway).
** If it's not in that format, it's treated as a simple hour, which
   means it should be from -12 to +14 (max 3).

Bug: 70405
Change-Id: I47ec2c07929069cb5243c306a1c502751e57a31b
2014-09-22 17:37:49 +00:00
Brad Jorsch
9084a3a1aa Add "unsaved changes" warning to Special:Preferences
Much like the similar warning on the edit page, it has been requested
that we display a warning if the user has made changes on
Special:Preferences and attempts to leave without saving.

This adapts the code from
resources/mediawiki.action/mediawiki.action.edit.editWarning.js to do
so.

Bug: 55966
Change-Id: Idb00f50ad8148cd80bd0af81b4cd06a0eb217d96
2014-09-19 11:04:30 +10:00
jdlrobson
274978205c Correct button colours of preference page when $wgUseMediaWikiUIEverywhere is enabled
* Apply mw-ui-destructive to Special:Preferences/Reset
  when $wgUseMediaWikiUIEverywhere is enabled

Introduces HTMLForm->setSubmitDestructive()

Bug: 65317
Change-Id: I1d6691dce3e7dab662bda9a718e16c5caee6c041
2014-09-17 00:00:38 +00:00
Kunal Mehta
d931c974f1 Preferences: Use Config instead of globals
Change-Id: Iab8725ded4da532a3072fb68e3060bd8f8ddf30a
2014-09-12 22:54:11 -07:00
Bartosz Dziewoński
8a6428a3f5 Preferences: Disable the 'skin' preference if there are no skins
Having a radio field with no valid values makes MediaWiki sad and
causes exceptions.

Also make double-sure that the global default value is not invalid.
That causes exceptions too.

Change-Id: I90cc9e6f40303aa5771c265948a0be4a4ce2e42c
2014-08-02 12:07:11 +00:00
Étienne Beaulé
b230bdce16 Create preference to watchlist pages after rollbacking
This change adds a  preference in the 'watchlist' section to
automatically watchlist a page after rollbacking.

The setting is only visible, if the user has the 'rollback'-right.
I have removed the watch reverts function per advice by Vogone.

Bug: 4488
Change-Id: I3aa831c9c04d627684641af0ca5a332795c87062
2014-07-30 21:51:41 +00:00
umherirrender
1c68a1ee86 Cleanup some docs (includes/*.php)
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling

Change-Id: I783e4dbfe5f6f98b32b9a03ccf6439e13e132bcc
2014-07-24 19:42:24 +02:00
umherirrender
4ee680a8b3 Fixed spacing
- Removed spaces after not operator (!)
- Removed spaces inside array index
- use tab as indent instead of spaces
- Add newline at end of file
- Removed spaces after casts

Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b
2014-07-24 11:53:04 +02:00
This, that and the other
588880c5f0 Preferences: Turn stubthreshold back into a combo box
Currently it's an insanely tall list box. All the other settings on this
page use combo boxes, so we should be consistent.

After it was changed from 'selectorother' to 'select' in I88212703
and support for 'size' in HTMLSelectField was enabled in I7ac345e1,
the size defines the height of the select box instead of the width of
the text input field.

Bug: 68313
Change-Id: Id42a62e78fc2fee741bb02b88dc14cbb1b63635a
2014-07-22 15:50:24 +00:00
umherirrender
301a7f3d1d Remove unused global declarations
Change-Id: I05a9bc5c0c0447c045714a445b0ed44f001db1dc
2014-07-19 22:44:54 +02:00
jdlrobson
a8871cff14 Refactor Preferences code to allow better reuse.
Break up getPreferences into smaller subfunctions to
allow for reuse.

Change-Id: Idd33bab61b3ef5a262fee9361105f1c5d8024044
2014-07-09 14:26:51 -07:00
umherirrender
77782f1eaf Remove Preferences::loadOldSearchNs() (deprecated since 1.19)
Change-Id: Ia9bfafddd9a861b1ca78fc1a642981dc9535ab27
2014-07-09 01:41:18 +02:00
Federico Leva
480ce1e732 Remove redundant filter for negative namespace ids in search preferences
Follows-up 5dc4dc099. MWNamespace::getValidNamespaces() filters these
out already.

Change-Id: Icad951fb9a4c4cb368cd994d1861dc2eff1f4ae0
2014-06-03 16:10:04 +00:00
Nemo bis
5dc4dc099d Save advanced search namespace prefs on Special:Search itself
* Checkbox on own row below power search checkboxes per MatmaRex;
  avoiding a mw-search-ns* id leaves it untouched by All/None JS.
* The option searcheverything is removed: a "shortcut" which is no
  longer necessary now that options can be (un)selected at once
  with All/None buttons on search page itself.
* Require a token for saving: no accidental preferences changes.
* Keep the searchoptions/advancedsearchoptions prefs section in case
  something is using it (no known extension does though); options
  are converted to "api" type so it's empty and hidden by default.
* Add minimal documentation for saveSettings() and friends
  (@todo since 155ddf6de, 2009!).

Bug: 52817
Change-Id: I514cee835988600cc013658049e88a10b670e64a
2014-05-30 14:33:47 -07:00
Kunal Mehta
f0ece08caf Remove user id from Special:Preferences
Dating back all the way to r15, it serves no useful purpose
as users typically do not need to know their own user id.
If they really want to, they can easily look it up using the
API.

Bug: 58626
Change-Id: Ib146abb8b579bc9a3dac601aff8e2818b2ed49e4
2014-05-13 03:39:51 +00:00
Siebrand Mazeland
49cffd699c Make phpcs-strict pass on includes/ (2/~10)
Change-Id: I59fa9af7b16e0a5a4eb8a5cc764a605b18137316
2014-05-11 19:22:05 +00:00
umherirrender
89c92dbac7 Fixed some @params documentation (includes/[Article|Pref|Skin].php)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.

Change-Id: I6627ba0e76d3577c40bf2473e0f78a5ad7368634
2014-04-23 11:46:22 +02:00
jenkins-bot
d16f223edf Merge "Removed 'Remember my login' preference" 2014-04-17 17:02:43 +00:00
tonythomas01
74756a2409 Removed 'Remember my login' preference
Removed 'Remember my login' from Preferences, as it was unwanted. It adds
to the complexity of the user preferences

Bug: 52342
Co-Author: Tyler Romeo <tylerromeo@gmail.com>
Change-Id: I7c957e1e1aaecf47f7c47bc063b5d3b364644afc
2014-04-16 12:49:44 +05:30
Bartosz Dziewoński
59002d8935 Consistently use '@deprecated since <version>'
Variants included 'in <version>', 'as of <version>' and just the
version number.

Some @deprecated annotations do not have the version number at all,
I want to hunt them down separately.

Change-Id: I8208c6097098f4735d4f51bc42254675f1f27f6d
2014-04-15 22:18:19 +02:00
jenkins-bot
83a1cf573f Merge "Rename Skin::getUsableSkins() to Skin::getAllowedSkins()" 2014-04-13 00:30:53 +00:00
Tony Thomas
a3ffeffe18 Moved "Date format" user preference to "Appearance" tab
This user preference affects the appearance of the site,
so this feels like a natural fit

Bug: 63582
Change-Id: Ib97b1b39723f1835b7f6086ff1418ab5de13a7a1
2014-04-11 13:09:51 +00:00
umherirrender
ad69935c0b fix typo in comment in Preferences.php
The name of the preference was spelled wrong.

Change-Id: I443d0a8fc67c89da36b5c725dd3f3513d4170357
2014-04-05 19:18:12 +00:00
jenkins-bot
7a74e085d9 Merge "Preferences.php: avoid "Undefined index" if key 'realname' don't exist in $formdata" 2014-03-19 22:53:31 +00:00
jenkins-bot
c2665e4b6e Merge "Remove user preference "noconvertlink"" 2014-03-11 10:01:16 +00:00
gbt248
7110eb061a Preferences.php: avoid "Undefined index" if key 'realname' don't exist in $formdata
Added additional check for missing key "realname" in $formData which can cause
an undefined index: realname

Bug: 62029
Change-Id: I6763c12d9b4d8b1e574eb3162168f4f5380df93a
2014-03-02 23:40:05 +01:00
tonythomas01
11c04f9ecb Removed 'Enable simplified search bar (Vector skin only)' from MW user Preference
The vector-simplesearch preference is enabled by default since version 1.22.
The option is removed to decrease the clutter in the preference page

Bug: 52815
Change-Id: I6d8dd997a4c4a6b8fb06b4674dda5f306432c6af
2014-02-19 17:53:55 +01:00
Liangent
333bf3ae5b Remove user preference "noconvertlink"
This toggle was introduced in 8d06ad6e, but the most useful feature for
human users there (disabling <h1> conversion on a per-user basis) has
been dropped due to cache fragmentation. The only remaining part is not
quite useful and can be covered by the URL parameter &linkconvert=no.

Change-Id: I12f2cdc9b0d44d6e47487b14fa8ef010de5c94a7
2014-02-08 03:10:16 +00:00
jenkins-bot
afb954e890 Merge "Remove unused $entryPoint from Preferences::tryFormSubmit" 2014-02-06 16:51:49 +00:00
jenkins-bot
11cb289cfc Merge "API: Handle "special" options in action=options" 2014-02-04 18:43:40 +00:00
jenkins-bot
68e8c6ca53 Merge "Add PreferencesFormPreSave hook" 2014-02-03 03:00:44 +00:00
Marius Hoch
fe565ce25f Remove unused $entryPoint from Preferences::tryFormSubmit
Change-Id: Ied5f81df70061fecb09bfb85174c9868c8828bbf
2014-02-03 04:00:05 +01:00
tonythomas01
2f9cfa3d26 Removed "Justify paragraphs" from MW user Preference.
Removed the option 'Justify paragraphs' from MW Preferences
as it is not a necessary option there.
Added RELEASE NOTES.

Bug: 52810
Change-Id: I1fe6a5857070828726077e6ba229b786c017c858
2014-01-25 09:57:57 +05:30
tonythomas01
aadd16aab1 Remove preference "Show table of contents (for pages with more ...)"
The table of contents box is auto-inserted, can trivially be hidden or
exposed on a per-page basis with __MAGICWORDS__, includes a sticky
[show|hide] link, and can be easily hidden with site-wide CSS as
necessary. It needlessly adds complexity and user interface clutter.

Bug: 52813
Change-Id: If2139317dae4aa980b373c73d7b81dac627b5af8
2014-01-24 12:59:44 -08:00
tonythomas01
f6aa7b3e88 Removed "Enable section editing via [edit] links" from preferences
Unwanted user preference option in MW adding to the clutter.
Users interested in hiding section-edit links can use per-user
(or site-wide) CSS.
Removed 'editsection' from Defaultsettings.php and
ResourceLoaderUserCSSPrefsModule.php
Updated Release Notes

Bug: 52811
Change-Id: I5fc49106621943ca7180ddb37590b624edac67d5
2014-01-25 00:04:40 +05:30
Kunal Mehta
266e9d91d1 Add PreferencesFormPreSave hook
Allows extensions to modify what preferences will be saved

Change-Id: Ibd8331c39afdde39b688d78f3faade2883f0c997
2014-01-23 23:53:16 +00:00
umherirrender
17aa87d651 Remove outdated comment from Preferences.php
There is a cleanupPreferences.php script

Change-Id: I29c55b3ba5d296a06e3c26e98b28779cb3959282
2014-01-19 21:41:33 +01:00
jenkins-bot
15cb0501f6 Merge "Remove "or other" option for stubtreshold" 2014-01-08 21:31:11 +00:00
Chad Horohoe
f5e7453f5c Remove searchlimit preference
Change-Id: Ib3dd2ba54261514b827d12a21536392530c7e02e
2014-01-07 17:48:35 -08:00