Commit graph

97 commits

Author SHA1 Message Date
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
jenkins-bot
4960dd9b77 Merge "Set $wgNoFollowLinks to false iff "Authorized editors only" selected" 2013-12-03 20:17:36 +00:00
Platonides
0e75eebf02 Rename $wgServerSetting to $serverSetting
It's the setting for $wgServer, but let's not confuse humans
and tools by using the convention for globals.

Change-Id: I38c82d363f588648f11d0a0ab3e264e25553493e
2013-11-23 19:41:20 +01:00
tisane
c978cee856 Set $wgNoFollowLinks to false iff "Authorized editors only" selected
Adds a little more whitespace for other configs; let me know if that's
not okay

Bug: 57115
Change-Id: I27775195a1a69cc83c2ea24640e563095591aff7
2013-11-18 14:27:04 -05:00
Siebrand Mazeland
bb0044f638 Address PHP CodeSniffer errors and warnings
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
2013-10-23 12:42:07 +00:00
YuviPanda
513a7198e8 Do not set wgServer in cli install unless explicitly passed
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
2013-10-10 14:01:22 +05:30
Siebrand Mazeland
626addab9e Update formatting
With some manual corrections.

Change-Id: Icd947288c32fdb90a0f35388963ef5a17ffa58e7
2013-10-09 09:35:18 +00:00
Timo Tijhof
40e18e4534 Installer: Remove wgResourceLoaderMaxQueryLength in LocalSettings
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
2013-06-05 16:07:17 +02:00
Timo Tijhof
beb1c4a0ec phpcs: More require/include is not a function
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
2013-05-21 23:26:28 +02:00
umherirrender
9f14ecf829 Added space after switch/Removed spaces after unset
While at it, added/removed some other spaces in the same files

Change-Id: I84d8001aa123a008807ad5eb76f396aed7c899a4
2013-04-26 16:42:31 +02:00
umherirrender
ee31d37821 Fixed spacing in context/installer/media/templates/upload folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I9761be9fa47adc3554852a97b19792b4648466ad
2013-04-21 06:22:06 +00:00
Chad Horohoe
8dfd474b53 Remove several ancient skins
Standard, Simple, Chick and MySkin have all been removed.
Nostalgia has been moved to an extension for posterity.

Change-Id: Ia6d73c2deb9428d214b7d69b29235094de75c52e
2013-04-01 17:11:59 -04:00
Dereckson
79fc796a8e Installer can now customize the logo in LocalSettings.php
Bug: 40617
Change-Id: Ia6efdf931b0b6be7556fc16c040aa7493845cdfc
2013-04-01 14:29:22 +00:00