Commit graph

286 commits

Author SHA1 Message Date
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
Chad Horohoe
f3d8cc92a5 Remove "or other" option for stubtreshold
People use this to set it to absolutely insane values.

Enwiki-Stats: http://p.defau.lt/?1j4omOrfCZzQvIJ_z_dOEQ
Change-Id: I88212703c69d0540f3134f661beee6c1428932a9
2013-12-26 02:49:51 -05:00
Amir E. Aharoni
46cf6929ed Clean some phpcs errors in Preferences.php
Change-Id: I315e562c5f85e464a8ca61be6a47e2a468156a55
2013-12-15 09:20:11 +02:00
01tonythomas
3f0b8c88c3 Removed 'Disable browser page caching" user preference
It is  a very advanced user preference with little usage and is often misleading.
Updated Release Note.

Bug: 52809
Change-Id: I43f6205df53c7a38717c60a2d7d144307feb58a4
2013-12-07 14:02:44 +05:30
tonythomas01
3d17f0dabf Removed "Disable search suggestions" from Mediawiki Preference
It's rarely used and provide more interface clutter and code complexity than
any benefit it provides.

Bug: 52812
Change-Id: I4b1d243b1b1a9da484147c4a682f44aa08a22803
2013-12-05 09:34:02 +05:30
umherirrender
0bc583af2c Move closing parenthesis from multi line if and function to own line
The Line continuation Coding conventions prefers the closing parenthesis
on the same line than the beginning curly braces. This is done for ifs
and functions.
Also move some boolean operator from the end of a line to the beginning
and changed some indentation to make the condition hopefully better
readable.

Change-Id: Id0437b06bde86eb5a75bc59eefa19e7edb624426
2013-12-01 21:39:00 +01:00
Brad Jorsch
b393835bda API: Handle "special" options in action=options
There are certain preferences, such as realname and emailaddress, that
are handled specially in Special:Preferences and are not accessible by
User::getOptions or User::setOptions. But action=options was allowing
a 'dummy' version to be set in User::setOptions.

Change-Id: I4c1b3d8e1eae9520228d7b6da9c41ada80f7c387
2013-10-10 11:02:04 -04:00
jenkins-bot
a71728c990 Merge "Remove "Misc" tab from Special:Preferences" 2013-09-12 19:22:15 +00:00
Federico Leva
291db2aeb0 Clarify "unknown gender" option is a non-answer and resort
It is easier in other languages, but in English some worry
about "I prefer not to detail" not being an answer to the
question used as label of the option; parentheses should
be enough to clarify it is about not answering the question
because you don't care.

Also put such (default) "zero answer" first and move feminine
before male as suggested by Jared to avoid any appearance of
bias in the user interface, though the fallback works that way
in the code anyway for merely grammatical reasons.

Bug: 53311
Bug: 53834
Change-Id: Iea77e903c91063a648fff5e4be41c0be51ac172a
2013-09-06 13:24:17 +02:00
jenkins-bot
57f156a8a1 Merge "doc: Remove repetitive "Give grep a chance" phrase from comments" 2013-08-29 20:32:38 +00:00
Timo Tijhof
90749a261c doc: Remove repetitive "Give grep a chance" phrase from comments
* Follows-up b2e2b2e016.
* Minor clean up of surrounding documentation comments.
* Fixed missing keys for messages in WebInstallerPage

Change-Id: Iaa692064262f3c0e10cfa5e4b1ec8c86e5d02362
2013-08-29 10:46:46 -07:00
Chad Horohoe
7b3898a74c Add help message to prefershttps
The preference requires logging back in again to set the new cookies.

Change-Id: I2602205eec752c927ac6df81545e69f5c9e70ee4
2013-08-28 11:57:57 -07:00
jenkins-bot
d8b36ec22b Merge changes I7493a329,Iaa9dd210
* changes:
  Only show prefershttps if IP can use HTTPS
  Core support for disabling HTTPS based on GeoIP
2013-08-23 20:29:38 +00:00
Chad Horohoe
9e7693c749 Only show prefershttps if IP can use HTTPS
Change-Id: I7493a329d35fad3f17aac2df935f4f9306828884
2013-08-23 12:34:06 -07:00
Chad Horohoe
c8272b3969 Default is not necessary for toggle fields
Change-Id: Ia11290431bc19905f744b65b001adc53c023e2ca
2013-08-22 10:42:19 -07:00
Amir E. Aharoni
90b0ef0098 Try to improve the wording of gender option
* Move the gender option to the internationalisation section,
  because it's mostly used for that.
* Change the displayed values: rather then gender identifiers,
  it demonstrates the usage of the option.
* Update documentation accordingly.

Change-Id: I81f02f03f5992ad5f0501e0a7552bdee9f2c1d5e
Bug: 31816
2013-08-21 09:10:50 +00:00