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
* 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
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
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
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
Import in the new repositories:
- Modern: I5348fedddf14affcee2688833f4e759e5af6499c
- CologneBlue: I9cc051f48074a033c684e5efa56a7b4dde51d366
Change-Id: I65768b4c29faf46895a7005a3090f43cf6e86258
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
It's the setting for $wgServer, but let's not confuse humans
and tools by using the convention for globals.
Change-Id: I38c82d363f588648f11d0a0ab3e264e25553493e
One class of errors left unaddressed: Class name "WebInstaller_Language"
is not in camel caps format. I think this can be changed, too, but I
wasn't able to quickly find out where class names are being created.
Change-Id: I920b0231db1b70b68c6c8907257c288a0e112668
Currently, if we do not pass a wgServer value (via --server),
the CLI installer sets the value to the default value
specified in DefaultSettings.php - which is to 'guess' by
calling into WebRequest::detectServer. This yields terrible
results, since WebRequest::detectServer expects to be working
in the context of a Web Request - and hence with HTTP Host
header information. Since calling from the CLI does not give
it host header information, it falls back to 'localhost',
which is not the value you usually want.
If we just do not set wgServer when it is not specified,
it is automatically calculated on every request by
WebRequest::detectServer, which does a splendid job.
Bug: 55376
Change-Id: I5436dd8c340604cbb59406a507188e11c8f86e86
This can change from one web server to another. Hardcoding it
in LocalSettings is unnececary (and could even cause problems
when a MediaWiki install is moved to a server with a lower
limit than the original server, as ResourceLoader would still
be acting on the old limit).
Similar to how wgUsePathInfo is currently dynamically set.
The less cruft in LocalSettings by default the better imho.
Except for stuff that makes sense to be sticky, explicit and
cached. Or stuff that is every commonly enabled and is therefor
convinient (such as wgEnableUploads/wgUseInstantCommons).
Change-Id: I58cb185f8dc1650a76c60c7fd04767fb74b32be2
Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81.
Also updated usage in text in documentation and the
installer LocalSettingsGenerator.
Most of them were handled by this regex:
- find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$
- replace: $1 $2;
Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
Standard, Simple, Chick and MySkin have all been removed.
Nostalgia has been moved to an extension for posterity.
Change-Id: Ia6d73c2deb9428d214b7d69b29235094de75c52e