| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$languageFactory->getLanguage() throws an exception on an invalid
language code. Therefore first validate the values by
$languageNameUtils->isKnownLanguageTag().
Also use getRawVal() instead if getVal() because the UTF-8
normalization is not needed here.
Also use getRawLanguage instead of getLanguage because a replacement of
dummy language codes is not needed here.
Bug: T207981
Change-Id: If4823eca18c5f2dab02368740c3fd95b58738e2b
|
|
|
|
|
|
|
| |
For detecting the URL parameter css=1 the Unicode normalization of
WebRequest::getVal is not needed.
Change-Id: Ic1af273e617e062e0716406007cbd23dd455c7b3
|
|
|
|
|
| |
Bug: T353458
Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
|
|
|
|
| |
Change-Id: If58d96c311bef728446b517bb7a81316b23aad4d
|
|
|
|
|
|
|
|
| |
This reverts commit 70990948050e5626f910132ca56af61ae09dba34.
Reason for revert: Let's maintain PHP4-compat.
Change-Id: I47b9b758fc3cf4df5c49bd148706f69e567b2440
|
|
|
|
|
|
|
|
| |
`dirname()`: https://www.php.net/manual/en/function.dirname.php,
has a levels param that can be used for indicate the number of parent
directories to go up!
Change-Id: Ibdf6fbedbcf9b0eead1cfbf822d24ccae6652f3f
|
|
|
|
| |
Change-Id: I11f8801ef47ec1a1f63d840116e69667e6f3ae3c
|
|
|
|
|
|
|
|
|
|
|
| |
This is inspired by Ib117e05.
As far as I can tell this is functionally identical. Even arrays should
behave the same, as both the getVal() and getCheck() methods do have a
special case that returns the `null` default in case the user tried to
pass multiple values instead of a single scalar.
Change-Id: Id4e4ec91f39d3c39461bd41673bdafc3bde11737
|
|
|
|
|
|
| |
Cleanup null checks and string literals in wfInstallerMain function.
Change-Id: Ib117e05faf899b0c46820d337f1bd3ebd4272419
|
|
|
|
| |
Change-Id: I535a91d09cc74ab08b782973a946dcf3fc3e6b46
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove obsolete handling for 'load.php', which no longer
uses this check. This hasn't been used for several releases.
* Remove the 'entryPoint' parameter in favour of 'format',
which it was already a proxy for.
* Move the double dirname() logic to mw-config/index.php.
Bug: T189966
Change-Id: I343216442475d36e61213900f196ab6ec5f6b747
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because it doesn't work. `phpcs:ignoreFile` is intended as a performance
shortcut, and gives up on the file as soon as that token is found.
Instead, use `phpcs:disable` which does support selectively disabling
some sniffs. And since disabling is local to the file, there's no need
to re-enable it at the bottom of the file.
<https://github.com/squizlabs/PHP_CodeSniffer/issues/1903> has some
relevant discussion and clarification from upstream on this.
And make the files that are now being re-enabled pass PHPCS.
Change-Id: Ia4d8c45045f61cf9f24eb1d8631ff98d99c82d69
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clean up use of @codingStandardsIgnore
- @codingStandardsIgnoreFile -> phpcs:ignoreFile
- @codingStandardsIgnoreLine -> phpcs:ignore
- @codingStandardsIgnoreStart -> phpcs:disable
- @codingStandardsIgnoreEnd -> phpcs:enable
For phpcs:disable always the necessary sniffs are provided.
Some start/end pairs are changed to line ignore
Change-Id: I92ef235849bcc349c69e53504e664a155dd162c8
|
|
|
|
|
|
| |
Organize phpcs.xml a bit
Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
|
|
|
|
|
|
|
|
| |
This file should remain compatible with PHP 5.3, so that we can
actually display the error message about old PHP version, rather than
a syntax error.
Change-Id: If12f79f5d375e925291728aac7c9db18ca226d26
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set the context language early, even before the session is loaded, to
avoid attempting to call User::loadFromSession(). Also update the things
that set $wgLang to also set it in RequestContext.
Passing $wgUser through to the ParserOptions constructor isn't strictly
necessary right now, but it does at least show the intended data flow
and is more robust to future changes in the way the language is passed
through to ParserOptions.
Fixes bug T126177 independently of my other two patches.
Bug: T126177
Change-Id: I15eb9cdce7805382d96b6fc6ffb9b25855876417
|
|
|
|
|
|
|
|
|
|
| |
Replaced all dirname(__FILE__) by __DIR__ or added
@codingStandardsIgnore
Found by tests:
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs/2736/consoleFull
Change-Id: I90ff10f183ed60175fe580c43d73c0e57fd04234
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This way, if someone tries to install MediaWiki via
either web installer or install.php maintenance script,
after obtaining from git, they get some useful information
on what to do.
Put the checks alongside the php version check, as
stuff installed via composer (mustache / lightncandy)
is used for NoLocalSettings.php and install.php
attempts to use logging stuff.
Also tried to make PHPVersionError look slightly nicer,
with some <h2> elements and more padding for the <p>
elements.
and centralized this code in one place, as much as possible,
for improved ease of maintenance.
Bug: T90438
Bug: T88951
Change-Id: Iae4eb42c4266dbe9213c5de8a96fccfbeaa9acb0
|
|
|
|
|
| |
Bug: T839
Change-Id: Iac827ef8505ff0653a40e45d759b0f79619351ee
|
|
|
|
|
|
|
|
| |
- Added/removed spaces around parenthesis
- Added space after switch/if/foreach
- changed else if to elseif
Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2
|
|
|
|
| |
Change-Id: Ifb3d1bd92d6abaa561e7337b311b4cb10c38a2b6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Web installer was not checking for unsupported PHP versions.
In those cases the script should terminate or the
installation will break (e.g. syntax errors for PHP4).
Installer::doEnvironmentChecks() no longer checks for PHP
version since it has already been done by the entry scripts
(both in cli and web modes)
Installer::MINIMUM_PHP_VERSION has been removed since it is
no longer used.
Message config-env-php-toolow is no longer used and it has
been removed
Change-Id: I9227868bd2bd4e13bad6b95ad581be3ada71c94e
|
|
|
|
|
|
|
| |
WebInstaller::outputCss no longer requires an argument
as of I717cb299b3639024.
Change-Id: I85c1624eb99affd5df809a041cfc9f22fc46945a
|
|
|
|
|
|
|
|
| |
CSS was not showing correctly when session errors occurred.
This was caused because mw-config/index.php was not taking
into account the "css" parameter passed in the URL.
Change-Id: I500c7340ab6826d428e9e3be28bcfc7ca5ed8466
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Harmonize spacing
* Use // for comments rather than #
* Harmonize call style for 'require', 'include' etc.
* Add missing profileinfo.php5
* Use "./" for path to api.php in api.php5 (to match other php5 files).
* Move documentation related to Setup.php from index.php to WebStart.php
* Remove "Initialise common code." comment in api.php (was already remove
in most entry points)
Change-Id: I8dc4a79fd13cee49e34f250a4039b3666bd42aca
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hphpc has been superseded by hhvm, so support for hphpc is no longer
needed.
* Continue to use Preprocessor_Hash under HipHop since it is still
faster under hhvm
* Keep $wgCompiledFiles for now, so that wikihiero doesn't give an error
before Ic9d1e795 is merged
* Migrate the run-server script and associated configuration file to
hhvm. Enable EnableStaticContentFromDisk since it doesn't seem
ridiculously inefficient at first glance. Run from $IP rather than
$IP/.. since hhvm is apparently not picky about sourcing files from
outside of the current directory.
Change-Id: Ic3e769f1fbad4f7ad26dd819406796fee48c6b45
|
|
|
|
| |
Change-Id: If5d695dc3665635fbed73a713583c0b03c14ebb1
|
|
|
|
|
|
| |
We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :)
Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
|
|
|
|
|
|
|
|
|
| |
...after a discussion with Debian packagers. They can now override installer
classes and change LocalSettings.php the installer generates. The file
intended for such overrides, mw-config/overrides.php, has intentionally been
placed outside of includes to underline the "don't change includes" paradigm.
Change-Id: Id82b90f6740307609bc6c6f4fb8765bc3484dbe7
|
|
|
|
| |
Change-Id: Ief2721ee6573a5e54a276c91de636d9e1a678b8b
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/103814
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added the ability to compile extensions. The build process is bootstrapped by running MediaWiki in interpreted mode. Extension setup file inclusions are slightly modified in a way that makes them register themselves for compilation. Then the same LocalSettings.php uses the compiled extension setup file when the compiled binary runs.
* Tested with Cite and ParserFunctions. The code which lets you have an extensions directory in a place other than $IP/../extensions is untested.
* Simplified WebStart.php slightly by using a custom $_SERVER variable to mark compiled mode. It will break if you don't use the supplied server.conf, but that will break a lot of things so don't do that.
* Fixed the core web entry points to include WebStart.php in compiled mode instead of interpreted.
* Made the build directory configurable. This is mostly so that I can grep the source tree without seeing loads of generated C++.
* In server.conf, added a rewrite rule allowing a /wiki/$1 article path.
* Removed server.conf log file location "/dev/stdout", breaks when you switch user
* Disable static content cache, breaks horribly when you set SourceRoot to a directory containing 7GB of files.
* Rewrote the run-server script in PHP, mostly to support the configurable build directory feature.
* Added an option to the run-server script to allow running in interpreted (hphpi) mode.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/89166
|
|
Renamed config/ to mw-config/, however left aliases for b/c.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/82845
|