Why:
- We want developers to have DevelopmentSettings loaded by default
What:
- Define a new `--with-developmentsettings` argument for install.php,
Set it to true in the `composer mw-install:sqlite` invocation
For now, this option is not supported in the web installer.
Bug: T347347
Change-Id: Icba2d614fd1349463fb745ef31f53a3b3834e5ad
Follows-up a5277ce87f (Ie6152cf510). This file no longer exists.
Update references to MainConfigSchema or MainConfigSchema.php instead.
Bug: T300129
Change-Id: I40a8881e843cc75a10e44b51ed0784fdc834f0e5
The "${var}" and "${expr}" style string interpolations are deprecated in
PHP 8.2. Migrate usages in core to "{$var}" as appropriate.
Bug: T314096
Change-Id: I269bad3d4a68c2b251b3e71a066289d4ad9fd496
The file Names.php was moved from
languages/data/Names.php to
includes/languages/data/Names.php
in e07a279a39.
This change updates the references in documentations.
Change-Id: I95ae3368ec6b7e9a3dfa85257e8d163fde7a47db
There are now 4 types of logos, only one of which is needed.
Update documentation in installer to reflect this.
Also make it possible to drag and drop files into the installer
and see live previews of what the logos will look like to aid
setup.
The 1x is no longer required.
Bug: T255913
Change-Id: I58226ae8fb02c32d2eeea65a50aaabbc193cb51c
This replaces references to DefaultSettings with
references to config-schema.yaml where appropriate.
NOTE: this does not yet change Setup.php. DefaultSettings.php
remains intact and is still being used.
NOTE: this does not remove usages in the installer, see I5d8843a1062fbf
for that.
Bug: T300129
Change-Id: Ie6152cf510c3be61bc22167ca6d90dfc28910a45
$wgShellLocale was a flawed solution to the problem of locale
dependence. MediaWiki has its own concept of locale (the Language
hierarchy) and any kind of dependence on the server's libc locale is
incorrect and harmful, leading to bugs. Developers have an expectation
that functions like strtolower() will work in a certain way, and
respecting the locale set in the environment at install time violates
this expectation.
The problems with using C as a locale, which led to $wgShellLocale, are:
* escapeshellarg() will strip non-ASCII characters. This can be worked
around by not using it. The security vulnerability it was trying to
fix can be prevented in another way.
* Shell commands like rsvg will fail to correctly interpret UTF-8
arguments. This is the reason for the putenv(). On Linux, this can
be fixed by using C.UTF-8, which we didn't know at the time. On
Windows, the problem is not relevant (there are unrelated issues
with UTF-8 arguments).
Bug: T291234
Change-Id: Ib5ac0e7bc720dcc094303a358ee1c7bbdcfc6447
If $wgLocaltimezone isn't hard-coded, it is evaluated from the
system timezone. On some systems this isn't guaranteed to be
static, for example on Debian, GMT can get converted to UTC,
instead of Europe/London. This can throw off code that relies
on consistent time zones or signatures. Hard-code the auto-
detected timezone value in LocalSettings.php to avoid this.
Also switch up the order of two variables to keep localization-
related settings next to each other.
Bug: T21991
Bug: T290464
Change-Id: I315a55a3129eeb81711232f59467eb8a2c59a80e
FileBackend::getFileList() is supposed to return an empty array when the
specified path does not exist, however this was broken on Windows due to
a difference in the exception message raised by DirectoryIterator.
Unit tests and code inspection showed that there were several other
instances of unmatched Windows error messages, which I also fixed. Now
FileBackendIntegrationTest passes on Windows.
It was also broken when $wgShellLocale is set to a non-English locale.
Recommend against this in the default LocalSettings.php. Work around
the issue using socket_strerror() if available. I was able to confirm
the bug and the fix using the existing tests.
Bug: T265778
Change-Id: I2b4cfbb1554d9e05cce53513f4b474064fb57de5
Following the recommendation here T243276#6524236,
we removed the 'actor' table from wgSharedTables in DefaultSettings.php
and added it to wgSharedTables in LocalSettingsGenerator.php
This undoes a change merged in Idea6b450f6,
which has not been part of a public release.
Bug: T243276
Change-Id: I06d1e56d7a9314d42170a0e2e060712965371fc9
During development, the default value accidentally got lost in
several ways. To avoid that from going unnoticed in the future,
an error is introduced if the Logo input field is empty.
Bug: T247790
Bug: T232140
Bug: T50084
Change-Id: I5a198474473ae1d5595a6fcd64a08205d03be5c0
Also improve the description a bit and explain at a high level
how this code is used, and which classes back those entry points.
Change-Id: Ia69531858e714d0b43a29a7d5b6dcc5c7edd8240
This is for classes with a single undeclared property - aside from
BlockManager: I3f51fd3579514b83b567dfe20926df2f0930dc85 removed the
declaration of $permissionManager without actually removing all uses.
Change-Id: Ic2a95f77071312041be6e0633ea9b5325e98de42
PlatformSettings.php is a standardized and recommended way for
re-distributors and packagers of MediaWiki to be able to tune
DefaultSettings.php as appropriate.
If includes/PlatformSettings.php exists, the installer will
automatically include it as part of the generated LocalSettings.php.
The main advantage of this system is that if the distributor wants to
change the default settings, all users will benefit immediately. And if
people want a vanilla MediaWiki experience, they can just remove the
inclusion from their LocalSettings.php.
This RfC
(<https://www.mediawiki.org/wiki/Requests_for_comment/PlatformSettings.php>)
was approved by TechCom.
Bug: T182020
Change-Id: I34f9a4acbe86b9c5c80ac16451b317ce5f6640f9
Having such comments is worse than not having them. They add zero
information. But you must read the text to understand there is
nothing you don't already know from the class and the method name.
Change-Id: I994d11e05f202b880390723e148d79c72cca29f0
In the event user skips advanced settings in the installer, and
CACHE_ACCEL is available, we should default to it. This is already
the default in the event the user goes to advanced settings
since b3dc2fedc5
Bug: T160495
Change-Id: Icaa2ca4e8eb63254142e837d2a47b6023a8ea0a2
Most of these are simply changing annotations to reflect
reality. If a function can return false to indicate failure
the @return should indicate it.
Some are fixing preg_match calls, preg match returns 1, 0 or false,
but the functions all claim to return booleans.
This is far from all the incorrect return types in mediawiki, there
are around 250 detected by phan, but have to start somewhere.
Change-Id: I1bbdfee6190747bde460f8a7084212ccafe169ef
When $wgPingback is true, MediaWiki will periodically ping
https://www.mediawiki.org/beacon with basic information about the local
MediaWiki installation. This data includes, for example, the type of system,
PHP version, and chosen database backend.
The pingback is sent via a deferred (post-send) update whenever $wgVersion
changes, using the updatelog table to ensure we don't send duplicate pingbacks.
A database lock ensures only one thread attempts to send the pingback, and a
cache key throttles attempts to no more than once per hour.
$wgPingback is false by default. The web installer has a checkbox for
controlling this option, and it is checked by default. This nudges new installs
to turn on pingbacks, but does not sneak this decision past sysops of existing
installs.
Change-Id: Ie43a6b46a07ebd9ccc1b9c3001f2ea02435d826b
The feature no longer exists starting in PHP 5.4.0, and MediaWiki
now only supports PHP 5.5.9 or newer.
Change-Id: I3f2d1b564c50f0a28ec1ec0abd7d1b242e26953b
Move ZhConversion.php and Names.php to languages/data and make them both
expose their data as static class variables instead of in the local
scope. This means that the autoloader can be used to load the data,
which is efficient and secure. This also makes additional request-local
caching of the arrays unnecessary.
Change-Id: Iafb96ac4165d0965fcb9a69f1d0a91139ea9790c
Do not use "wgMainCacheType" form variable
name that contains values that cannot be
assigned to $wgMainCacheType
Bug: T116375
Change-Id: I83459c8006cc4c1bcdeaa0d78a1230687c95db46
The comment message given in enabling the extensions
are based on for the earlier versions of mediawiki which
uses the requireonce() and as at present all the versions
since 1.25 uses wfLoadExtensions() the comment message
have been changed accordingly.
Bug: T100940
Change-Id: I915a4893cc2d89624c9d8dd6504d7dc8bf166cd9
This make re-configuring these much easier by only needing to update
one variable instead of four.
Also remove redundant hardcoding of wgStylePath and wgResourceBasePath
in the generated LocalSettings.php file during installation. This way
changing wgScriptPath will naturally result in the other variables
updating too. We already do this for many other variables (such as
wgLoadScript, wgScript, wgExtensionAssetsPath, etc.).
Change-Id: Ide74355b4054c78214c17f3b2d6fa2f5270e0ab9
See https://blog.wikimedia.org/2015/06/12/securing-wikimedia-sites-with-https/
Ignoring SVN stuff because svn.wikimedia.org's SSL certificate has expired, and
ignoring wgSharedUploadPath because T25122 wants to get rid of it.
Also a couple of BZ -> phab changes
Change-Id: I02fd23ac6c30a4a4c718e57d4dedbc693dd653c0
Continues the path of deprecating $wgScriptExtension and all of
the related baggage.
You'll only end up with sadness when we rip out of the rest of
this later so don't let people shoot themselves in the foot.
Change-Id: I34cd1d2c266405ebc761a271e3740e972fb7cf2f
wgRightsIcon uses wgResourceBasePath in its value, therefore it
must be exported first. Otherwise $wgResourceBasePath will still
be null (as from DefaultSettings.php) and cause an incorrect
value to be assigned.
Also fix $wgLogo to use wgResourceBasePath instead of wgScriptPath,
to match what Setup.php does already.
Bug: T75031
Change-Id: I6f18895f3caa50871327eec108fc7d70c1077f1e