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
$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
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
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
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
$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
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
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
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
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
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
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
Removed the option 'Justify paragraphs' from MW Preferences
as it is not a necessary option there.
Added RELEASE NOTES.
Bug: 52810
Change-Id: I1fe6a5857070828726077e6ba229b786c017c858
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
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
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
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
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
* This also adds a Job::workItemCount() method
* Removed unused USE_PRIORITY constant
* A few small cleanups in runJobs.php
Change-Id: Ife9370e488fa63dcd1f702ed98f3b7f26057f10c
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
* 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
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