Commit graph

2288 commits

Author SHA1 Message Date
Kevin Israel
d6a9f3a2f2 Hide message for DBUnexpectedError exceptions
DBUnexpectedErrors are now treated like most other exceptions; we now
hide the error messages (which could contain sensitive information
such as IP addresses) unless $wgShowExceptionDetails is true.

In that case, the messages (and redacted backtraces) would be shown
even if $wgShowDBErrorBacktrace is false, though hiding them would
add complexity to the exception handler for little benefit.

Bug: 26811
Change-Id: I063c241975ce5b12a04abc21821ac67c716b3d5e
2014-03-04 19:59:57 -05:00
Antoine Musso
5b52c881be Deprecates $wgRateLimitLog in favor of debug log
$wgRateLimitLog is meant to log rate limiting occuring in MediaWiki. The
feature was introduced by e46d19e72d / r9202 in 2005.  We might not
have wfDebugLog() at that time and we used error_log() with the global
pointing to a file.  A later patch converted to file_put_contents().

On Wikimedia production the variable is set to a udp:// URL, I am not
sure file_put_contents() can write to it.  Additionally the warning are
suppressed which I tend to hate.

Instead use the log bucket 'ratelimit'.

For backcompabitilibity purposes, if $wgRateLmitLog is still set:
attempt to set $wgDebugLogGroup['ratelimit'] with its value.

Change-Id: I86131c4a8053800afd9f41fa1906c998a88736c6
2014-03-04 13:12:35 +00:00
Brian Wolff
09a82a4b7b Remove $wgDebugProfiling. It appears to be unused.
Not sure what happened to it, but grep suggests the option no
longer does anything.

Change-Id: I0d515551cd0d6cfd5b027be71ada714f6ebeb5ab
2014-02-28 00:53:58 -04:00
Alexandre Emsenhuber
19084be0a2 Allow to disable specific groups in $wgDebugLogGroups
So that they don't even appear in $wgDebugLogFile.

Change-Id: Ibf1a28fa566915d790e4d915354238441c3ff5c7
2014-02-26 20:46:14 +00:00
jenkins-bot
868fef7572 Merge "Revert "DefaultSettings.php: Remove $wgPasswordSenderName"" 2014-02-26 09:40:51 +00:00
TTO
1270fd4d89 Revert "DefaultSettings.php: Remove $wgPasswordSenderName"
It seems that this variable is used by a whole
lot of extensions, so to remove it now would be
to break these other extensions.

This reverts commit acda2cc90a.

Change-Id: I2bd3078508c0608ff58bae4c9ec456e57c617da8
2014-02-26 06:06:29 +00:00
umherirrender
bcacc361dd Document $wgResourceLoaderMaxage in DefaultSettings.php
To have a start and to remove the todo.

Change-Id: I62421f1399c0f3e77238c39322028b969c0e925f
2014-02-25 09:39:31 +01:00
Bartosz Dziewoński
acda2cc90a DefaultSettings.php: Remove $wgPasswordSenderName
It doesn't do anything.

Follow-up to Ibfd28cd181365c8c0b5f3e8ffe8f5de8c89844a3.

Change-Id: Id20e4ec1cdae94fadb278146cd72d5a9b247dccf
2014-02-24 18:40:36 +01:00
csteipp
01c8c421f8 Password Expiration
Add functionality to expire users' passwords:
 * Adds column to the user table to keep a password expiration
 * Adds $wgPasswordExpirationDays, which will force users to reset
   their passwords after a set number of days. By default, this set
   to false, so passwords never expire.
 * Adds a default grace period of 7 days, where if the user's password
   is expired, they can still login, but are encouraged to reset their
   password.
 * Adds hook 'LoginPasswordResetMessage' to update reset message, in
   case an extension wants to vary the message on a particular reset
   event.
 * Adds hook 'ResetPasswordExpiration' to allow extensions to change
   the expiration date when the user resets their password. E.g., if
   an extension wants to vary the expiration based on the user's group.

If the user is in the grace period, they get a password reset form
added to the login successful page. If an extension prevents showing
the login successful page (like CentralAuth), it should be updated to
show a password change form during the grace period. After the grace
period, the user will not be able to login without changing their
password.

Also prevents a successful reset if the user is "changing" their
password to their existing password.

No passwords will expire by default. Sites will have to call
User->expirePassword() from their own maintenance script to trigger a
password reset for a user.

Bug: 54997
Change-Id: I92a9fc63b409b182b1d7b48781d73fc7216f8061
2014-02-20 09:41:51 -08: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
tinajohnson.1234
e7b85e720f Removed deprecated $wgDisabledActions
$wgDisabledActions is deprecated since 1.18 and is hardly used
anywhere. It occurs once in includes/DefaultSettings.php where
it is initialized to an empty array.And in Setup.php, for every
action in $wgDisabledActions $wgActions is set to false. Also
added Release notes

Bug: 60460
Change-Id: I5fab95c76b2742b12c1f397d27898148625a9959
2014-02-18 10:37:49 -08:00
jenkins-bot
5a38e4b22c Merge "Remove unused setting $wgImageMagickIdentifyCommand" 2014-02-17 03:05:09 +00:00
jenkins-bot
e552fd3b1e Merge "Fix comment for $wgUseImageResize" 2014-02-17 02:44:28 +00:00
This, that and the other
9e084acc37 Fix comment for $wgUseImageResize
It is not obsolete - it is used by the Bitmap class. I tested it and it
does indeed disable server-side image thumbnailing. The variable was
originally un-obsoleted in r48787, but accidentally re-marked obsolete
when merging upload-api/js2 branch in r53282.

Also moving it to a more logical location in DefaultSettings.

Change-Id: Ibb4d9784e997ea3b6ca7e2e0272635e6c8a30d26
2014-02-17 02:40:06 +00:00
This, that and the other
492e9569bc Remove unused setting $wgImageMagickIdentifyCommand
No need to deprecate first, as it is simply unused.

It was added in r107351, and its only usage was removed in
r108141.

Change-Id: Ie95d8b707ac1ff2fe2a9bae6d5f77ba68b4291ad
2014-02-16 05:44:57 +00:00
Skizzerz
f7174057a4 Add preliminary MS SQL support
This likely has outstanding bugs but basic wiki operations work just fine in it.

Change-Id: I25df82065a307b9abc30c694f8c8afff0996d7c1
2014-02-15 10:40:19 -08:00
This, that and the other
c5b5e4509a Deprecate wgSkipSkin in favor of wgSkipSkins
Per comments at
https://gerrit.wikimedia.org/r/#/c/110162/5/includes/DefaultSettings.php

Change-Id: I47e891464c9955e2ea8c655c8e2e19cb09f55baa
2014-02-15 11:04:24 +11:00
Timo Tijhof
344c5aa5f2 oojs-ui: Fix up addition to core
Follows-up I0736601e04a15c8.

* Move to its own directory instead of mixing in the oojs.js dir.
* This also fixes the jsduck errors as it was immediately being
  indexed with settings for oojs, eventhough oojs-ui correctly
  does not index without errors with core's jsduck config.
* Remove spurious .gitignore file.

Change-Id: I01f99deb3967d731d7b0e8bca2a2497b3c0151ac
2014-02-13 10:05:10 -08:00
Aaron Schulz
dc496c02d9 Limit attempts to render the same thumbnail after failures
bug: 49118
Change-Id: I9379ec445bf2e77bd3b085c00182c5e406ed300d
2014-02-12 16:55:57 -07:00
James D. Forrester
131963678b Add OOjs UI v0.1.0-pre (3b61a8d77c) to MW core
Just adding code for now, not actually used for anything in core yet.

Note that OOjs and OOjs UI do not work in older browsers, and will
actually cause JS errors when loaded in browsers that don't support
ES5. We'll resolve this by adding an ES5 shim later.

Bug: 56572
Change-Id: I0736601e04a15c84d2ac1994febbf1a17bc1399a
2014-02-12 20:02:03 +00:00
Chad Horohoe
5e3229b1a8 Remove $wgMaintenanceScripts and friends
Nothing ever used it--and rightly so--as it's completely useless.

Change-Id: I2746500c8156cc4e7834f2b811581144a35cb6e0
2014-02-10 18:00:55 -08:00
Aaron Schulz
87be24dbdf Made ActiveUsers use querycache and do staggered updates on view
Bug: 41078
Change-Id: Id9c2377e0d2636fa9aaed01839678e2b8abe824e
2014-02-04 20:14:40 +00:00
jenkins-bot
187b46ce0c Merge "Removed "Justify paragraphs" from MW user Preference." 2014-01-29 05:13:27 +00:00
Aaron Schulz
b3c9653090 Removed unused postConnectionBackoff() from LoadMonitor
* This setting proved to be not terrible useful

Change-Id: I58b18947ff0edb8937229d0f130d7d10e846125e
2014-01-28 11:00:55 -08:00
jenkins-bot
529c02dc47 Merge "Config: Add Config and GlobalConfig classes" 2014-01-28 05:15:26 +00:00
Kunal Mehta
fbfe789b98 Config: Add Config and GlobalConfig classes
Allows configuration options to be fetched from context.

Only one implementation, GlobalConfig, is provided, which
simply returns $GLOBALS[$name]. There can be more classes
in the future, possibly a database-based one. For convinience
the "wg" prefix is automatically added.

Ironically, this adds the $wgConfigClass global variable
which is used to determine which implementation of Config
to use by default.

The ContextSource getConfig and setConfig methods were introduced
in I23194d1ba (1.23), but have no uses in Gerrit, so they can safely
be re-purposed.

Change-Id: I13baec0b6d4ea7badf20b9c5f9b40846348838e4
2014-01-27 21:10:30 -08:00
Federico Leva
5954fc5b16 Make preference "Email me when a page or file on my watchlist is changed" true by default
Consistent with the recent work in making vanilla MediaWiki closer to what a standard site
would do, with more obvious defaults, and bug 45020.

WMF can sort out its special problems separately and is not affected by this, see Iad6d13509.

Bug: 45022
Change-Id: I9757cff9728f377363c540b1ab809679a1bfa01d
2014-01-28 00:34:13 +00: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
Simon Walker
c4358ca758 Fix git repository viewer URLs so they support more variants of the Wikimedia URLs
I've tested this against the URLs that are exposed within gitblit and gerrit, specifically:

* https://gerrit.wikimedia.org/r/p/mediawiki/extensions/AbuseFilter.git
* ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter.git
* https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter
* ssh://stwalkerster@gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter
* https://stwalkerster@gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter

Change-Id: I36008eced60e32d554a5801bae155611f259f2d1
2014-01-23 22:19:55 +00:00
umherirrender
7424941405 Split documentation for $wgRCLinkLimits/$wgRCLinkDays
Each var should have it own doc block

Change-Id: Iec2b37687c009be9412103081ff5fc020c6dad03
2014-01-23 16:41:52 +00:00
umherirrender
8d7e7cf23b Expand documentation around $wgAPI*Modules
Change-Id: I095fa03596c05d292faf1e6c1dce808deeee1a66
2014-01-19 21:19:21 +01:00
umherirrender
8616f1b970 Add $wgHideUserContribLimit config setting
Replace const in Special:Block by a config setting in
DefaultSettings.php
Setting to false will disable the limit (instead of setting to a
very high number).

The value is unchanged, but now it is possible to change it in
LocalSettings.php
Also add the value to the message to give better feedback to the
performer of the action.

Change-Id: I3fd39c1c9dfa65a24a3451800dc623b40162aeb5
2014-01-18 19:33:50 +00:00
jenkins-bot
437a7ddf85 Merge "Remove deprecated $wgBetterDirectionality" 2014-01-17 20:47:17 +00:00
Chad Horohoe
736820f8f2 Remove DBABagOStuff
Isn't useful outside of testing as the comments state, but it's
barely even useful for that. People who are testing the cache
code can use CACHE_DB if CACHE_MEMCACHED is too hard.

Change-Id: Ief0aa148376957fdd844c8bb585a133b854a012c
2014-01-16 11:43:59 -08:00
Siebrand Mazeland
2b5a197b66 Remove deprecated $wgBetterDirectionality
Was deprecated in 1.18. One use remained in Liquidthreads. It was removed
there, too.

Change-Id: I4dc3290fe7fe793d8284a3337e24dbe298099079
2014-01-11 20:41:15 +01:00
Chad Horohoe
f5e7453f5c Remove searchlimit preference
Change-Id: Ib3dd2ba54261514b827d12a21536392530c7e02e
2014-01-07 17:48:35 -08:00
theopolisme
1768f90bc8 Deprecate $wgPasswordSenderName
The sender name for system mailings can now be configured
locally by modifying the system message "emailsender". The
new default sender name is simply "{{SITENAME}}". Added to
release notes.

Also modify UserMailer to strip CR/LF linebreaks from header
values to prevent mail header injection now that the sender
name can be modified.

Bug: 32770
Change-Id: Ibfd28cd181365c8c0b5f3e8ffe8f5de8c89844a3
2014-01-01 08:27:59 -06:00
Siebrand Mazeland
210edff11b Remove underscore from classes LBFactory_*, LoadBalancer_*, LoadMonitor_*
Part of program to remove underscores from class names. Checked core and
600+ extensions for occurrences. All uses are in core in core are updated
in this patch.

Patches for extensions:
* https://gerrit.wikimedia.org/r/#/c/96463/ CentralAuth
* https://gerrit.wikimedia.org/r/#/c/96460/ SimpleSecurity
* https://gerrit.wikimedia.org/r/#/c/96459/ WikiBase
* https://gerrit.wikimedia.org/r/#/c/96472/ Wikimedia configuration

Antoine added tests to test the back compatibility.

Change-Id: I507ba00a83bca8375a0215f00891b47e3c7afb9f
2013-12-26 16:30:15 -05:00
jenkins-bot
841f064b2c Merge "Added $wgJobBackoffThrottling to replace wmf sleep() hack" 2013-12-23 23:40:04 +00:00
Aaron Schulz
e8cb20737a Added $wgJobBackoffThrottling to replace wmf sleep() hack
* This also adds a Job::workItemCount() method
* Removed unused USE_PRIORITY constant
* A few small cleanups in runJobs.php

Change-Id: Ife9370e488fa63dcd1f702ed98f3b7f26057f10c
2013-12-23 15:10:50 -08:00
jenkins-bot
b99630a9cc Merge "Move VectorBeta modules to VectorBeta extension" 2013-12-20 23:03:13 +00:00
Siebrand Mazeland
2f7b68ffde Rename $wgExtensionMessagesDirs to $wgMessagesDirs
This is a better name, as we'll also be adding core and the installer i18n
to this.

Change-Id: Ic4c5849654aef54f3e5aea01a2d68e47d148b9bd
2013-12-20 17:02:18 +01:00
jenkins-bot
b3970523a3 Merge "Add support for JSON i18n files" 2013-12-20 13:41:42 +00:00
Roan Kattouw
6380e81cd0 Add support for JSON i18n files
Implementation for https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format

Add $wgExtensionMessagesDirs, which tracks the directory
(or directories) where each extension stores it's JSON i18n files.
In this commit only support for messages is implemented, but adding
support for other i18n variables (e.g. magic words) is easy to do later.

To be backwards compatible, an extension can specify both
$wgExtensionMessagesFiles and $wgExtensionMessagesDirs. Older versions
of MediaWiki will just work, and newer versions will use the JSON files
while ignoring the PHP file (except if the PHP file contains non-message
data like magic words).

Misc changes:
* Updated mergeMessageFileList.php to output both
  $wgExtensionMessagesFiles and $wgExtensionMessagesDirs

Change-Id: I8d137e15e1670880a9847263e6ce796c62a4670d
2013-12-20 14:34:06 +01:00
jrobson
1d5ec4a6a1 Move VectorBeta modules to VectorBeta extension
* Remove duplication of styles in skins.monobook and skins.vector by
  creating skins.common.
* At same time allow VectorBeta to replace Vector-specific skin styles
  without having to worry about common styles.

Dependency: Ie32a28f8f8c5fc8e4d0890a3d7d96bc82b39c481
Change-Id: Ia193571afffff36ecb1f14ee9036fb9bb98347e7
2013-12-19 23:07:25 +00:00
umherirrender
2e871f7087 Fixed spacing
- Removed double spaces in arrays
- Added space after for
- Added spaces around string concat

Change-Id: Ifbcaf35f9bfef1f97226a38b5bd74c237f61c99e
2013-12-15 20:56:09 +01:00
Mark A. Hershberger
eef7b9be2a Attempt to fix problems noted in phpcs.
Seen at https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs-strict-HEAD/4724/console

Change-Id: I1bcec887849f726cf0015a3a3a44bfc1f797658c
2013-12-15 19:23:15 +00:00
Max Semenik
17ab92a656 Set default for nickname preference
Not having a default results in 1361430 pointless rows with
empty up_value in user_properties on enwiki only.

Part of work on bug 52777.

Change-Id: I63db3a813fbf11fd3d9a0f0535facc39d975c563
2013-12-15 12:08:04 +00:00