Commit graph

109 commits

Author SHA1 Message Date
Tim Starling
5b1c7fc157 Fix English/*nix specific error messages in FSFileBackend
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
2020-12-03 15:00:02 +11:00
kevinbazira
dacb021b08 Move 'actor' SharedTable to LocalSettings
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
2020-10-18 05:54:54 +00:00
Umherirrender
d790580fda Fix typos related to repeated words
Change-Id: Ibc187d95b003017255bc87adf56afae7a59bd3db
2020-09-27 10:25:36 +00:00
James D. Forrester
384d493f61 installer: Write to wgLogos, not wgLogo
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
2020-07-29 02:15:51 +01:00
Timo Tijhof
f575721a06 Update all use of $wgVersion to MW_VERSION
Follows-up I04628de4152dd5.

Bug: T212738
Change-Id: I718474ec0d9fd29ac2c05477f0f2493615d8aff5
2020-02-25 02:16:12 +00:00
Kunal Mehta
e248b5d287 installer: Fix typo in extension loading instructions
Change-Id: Id82b952ec01934c09944bbc0a9be798e39a45d30
2020-01-26 19:21:24 -08:00
Timo Tijhof
b118bddc15 installer: Rename Doxygen group from "Deployment" to "Installer"
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
2019-11-25 23:26:20 +00:00
Daimona Eaytoy
290ab29617 Declare dynamic properties
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
2019-09-14 15:21:26 +02:00
Shreyas Minocha
d5b2a1621b
Fix small typos
"publically" → "publicly"

Change-Id: I712d97c0504d52c96532b4aac4f332ef39670955
2019-01-27 17:40:18 +05:30
Kunal Mehta
50212e6d0e installer: Add support for PlatformSettings.php
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
2018-04-10 02:51:02 +00:00
Hoto Cocoa
adf170a553 LocalSettingsGenerator: Fix typo in exception message
Change-Id: I61fe67468eec659f312fb9aa4c20ec9bf083e78b
2017-12-07 06:19:04 +00:00
Thiemo Mättig
d14faa6bed Remove auto-generated "Constructor" documentation on constructors
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
2017-07-10 10:15:51 +00:00
jenkins-bot
212f96ec2a Merge "Properly detect if CACHE_ACCEL is available in the installer" 2017-05-05 20:52:19 +00:00
Brad Jorsch
3b84e7f31c Change default $wgShellLocale to C.UTF-8, and use it to set LC_ALL
It's less likely to cause surprises than language-specific defaults.

Bug: T107128
Change-Id: Ife7673255798f3a3d72028a26607c56b9b7fb224
2017-05-04 05:53:47 +00:00
Brian Wolff
35c725e157 Properly detect if CACHE_ACCEL is available in the installer
The variable was getting mangled.

Follow up 1fec847c6b

Bug: T160519
Change-Id: I7f7e1530725737020c98747730f2bd363616258c
2017-04-08 04:13:21 +00:00
Aleksey Bekh-Ivanov (WMDE)
350b138a7d Revert "Default to CACHE_ACCEL if user skips advanced settings"
This reverts commit 1fec847c6b.

Bug: T160519
Change-Id: I3bbfb5c5b61b8587ddc4af4fa134de6c86f46d98
2017-03-16 06:51:13 +00:00
Brian Wolff
1fec847c6b Default to CACHE_ACCEL if user skips advanced settings
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
2017-03-15 06:39:45 +00:00
Erik Bernhardson
d67197fa11 Cleanup some incorrect return annotations
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
2016-12-12 10:15:05 -08:00
Amir Sarabadani
6b221fa96a Clean up array() syntax in docs, part IV
Change-Id: If626409a93d31bf90c054c9bf7ba44a78ea9a621
2016-08-26 16:06:58 +04:30
Ori Livneh
f181cdec56 Add option for sharing info about this MediaWiki install via pingback
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
2016-07-21 21:00:28 +00:00
umherirrender
f800abc858 Use short array for generator output
The AutoloadGenerator and LocalSettingsGenerator should generate short
array syntax

Change-Id: I5772640556fd6274db0d522341a98c0acfe5794d
2016-02-17 22:08:07 +01:00
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Kevin Israel
94e5b80fee Remove references to safe_mode INI setting
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
2016-02-12 19:18:26 -05:00
Brad Jorsch
854406883e Add release notes and installer support for $wgAuthenticationTokenVersion
Change-Id: I092a0052b2ab50310cd8ca403d6b2f201b482d5b
2016-02-08 18:20:33 -07:00
Tim Starling
f43e0d840f Use autoloader for PHP data files instead of include/require
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
2016-01-30 13:08:46 +11:00
jenkins-bot
f4a5507a96 Merge "Installer: use _MainCacheType form variable" 2015-10-26 17:32:52 +00:00
saper
1730a17929 Installer: use _MainCacheType form variable
Do not use "wgMainCacheType" form variable
name that contains values that cannot be
assigned to $wgMainCacheType

Bug: T116375
Change-Id: I83459c8006cc4c1bcdeaa0d78a1230687c95db46
2015-10-26 17:10:13 +00:00
jenkins-bot
7bd0201183 Merge "installer: Remove additional newline in LocalSettings.php" 2015-10-25 20:33:04 +00:00
saper
53912df2ea installer: Remove additional newline in LocalSettings.php
Change-Id: I6a0630d109c0ab4299507d125e4e1748055bcd58
2015-10-25 20:21:46 +00:00
saper
9b6257a8c4 installer: Define $wgResourceBasePath in LocalSettings.php
Bug: T116374
Bug: T75031
Change-Id: I459c1097ed7048c3fe24e636e9ea22ec2e3b2675
2015-10-23 23:41:06 +02:00
jenkins-bot
1271bb75c6 Merge "Update comment about enabled extensions" 2015-10-13 11:39:18 +00:00
haritha28
0299ac0210 Update comment about enabled extensions
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
2015-10-13 11:29:20 +00:00
Timo Tijhof
31b41c535b Use wgResourceBasePath instead of wgScriptPath for wgStylePath etc.
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
2015-09-01 18:18:03 +02:00
Alex Monk
e7c9096ecc HTTPS-ify links to Wikimedia's sites in MW core source
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
2015-06-13 19:23:23 +01:00
Chad Horohoe
785a8289d3 Do not support new installations via .php5 entrypoint any longer
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
2015-06-02 08:38:57 -07:00
Timo Tijhof
f325d07b6c installer: Export wgResourceBasePath in LocalSettingsGenerator
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
2015-05-24 11:30:21 +02:00
Kunal Mehta
7935bd4c80 installer: Use wfLoadExtension/Skin in LocalSettingsGenerator
Bug: T87791
Change-Id: I37cede7396d9677466ec68289702a3a73f1a1f8a
2015-04-01 00:16:17 -07:00
Kunal Mehta
7222312fd9 installer: Reduce some code duplication in LocalSettingsGenerator
Change-Id: Ie3c2e56ac4d20d6d547e89a4d6c6331f4222409b
2015-04-01 00:01:41 -07:00
Timo Tijhof
466c29847d installer: Remove unused references to wgResourceLoaderMaxQueryLength
* Added in 40e18e4534.
* Removed in 648bed9f83 (r87494).

The latter left the Installer::values array still populating this
variable eventhough it was no longer used in the generators output.

The example in overrides.php is also outdated as modifying this
variable there would have no effect.

Change-Id: I0c86e94a004c034702c5fcd83257c0f4c3d15a57
2015-02-28 17:31:19 +00:00
Bartosz Dziewoński
a957836f4a Support for enabling skins in the installer
Let the user choose the skins to install (like extensions)
and decide which one will be the default for the new wiki.

Right now core skins are always enabled regardless of user
choices there, but I'm working on that.

Bug: 66440
Change-Id: I2e10720a6ac327e66c415bb91dc897885f952738
2014-07-20 19:54:39 +02:00
Bartosz Dziewoński
62a293a719 LocalSettingsGenerator: Remove unused commented-out code
This is unused and unnecessary, $wgRightsUrl is always checked before
it's used in code and it can be an empty string.

Change-Id: Ia2e2af0162004b7e19a028ba8e648f8b2ef02a12
2014-07-12 17:50:24 +00:00
Mark A. Hershberger
d6f51c5aa5 Don't allow some E_NOTICE messages to end up in the LocalSettings.php
There is probably a better, more comprehensive way to produce a
LocalSettings.php file so that E_STRICT and E_NOTICE errors don't end
up in the file, or to notify users that there is a problem with the
generated file, at least.   This only attempts to address those issues
reported as a result of c978cee856.

Bug: 66922
Change-Id: I0fe70446d9fe23aed2a147e20e5ff3851371726d
2014-06-21 14:37:42 -04:00
jrobson
fb33b959db Move Modern and CologneBlue out of core
Import in the new repositories:

- Modern: I5348fedddf14affcee2688833f4e759e5af6499c
- CologneBlue: I9cc051f48074a033c684e5efa56a7b4dde51d366

Change-Id: I65768b4c29faf46895a7005a3090f43cf6e86258
2014-05-27 11:29:24 -07:00
umherirrender
f5f1e38b9a Fixed some @params documentation (includes/[db|installer])
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.
Also added some missing @param.

Change-Id: I3595e9aac69ac42fbb74b0783fae0ad9bcc831aa
2014-04-19 13:55:27 +02:00
Ladsgroup
1ba0445c12 Changing URLs of mediawiki.org in scripts to the SSL-based website
http://www.mediawiki.org --> https://www.mediawiki.org

Part 2

Change-Id: I3be61fe3dfb502cc20180486eb1a8016eac151df
2014-03-12 23:24:03 +00:00
Siebrand Mazeland
f077c4b1d6 Update formatting
Change-Id: I18aff576262479c9bb1c56eb8e1d1aaae200e4b1
2014-02-06 09:27:05 +01:00
MaxSem
0998c41943 Revert "Include short descriptions for extensions bundled in the release"
Contains var_dump(), self-merged non-trivial code.

This reverts commit 96b2c66e24.

Change-Id: Ie630466ef50e6bcdabf01daff28c283c764aae35
2014-01-12 23:59:44 +00:00
Mark A. Hershberger
96b2c66e24 Include short descriptions for extensions bundled in the release
Also fix styling for the list of extensions.

Bug: 43817
Change-Id: I5335225683ec8f1c163bb67f478787ebc52ee3a9
2014-01-12 18:21:55 -05:00
aude
ef04c774fb Remove spacing between $wgLogo and value in generated LocalSettings
makes it consistent with the other variables and removes phpcs violation

Change-Id: I2b8a5ef6d07575a69f3b2ac77c1334553dd54215
2013-12-22 13:22:35 +00:00
tisane
6f9ba4d2c4 Move init of $noFollow outside of if
Bug: 58044
Change-Id: I5655a0dc64055f3ec5d0a287aa8e0c85c11d3a1f
2013-12-06 09:52:38 -05:00