aboutsummaryrefslogtreecommitdiffstats
path: root/mw-config/index.php
Commit message (Collapse)AuthorAgeFilesLines
* Installer: Ignore parameter uselang on an invalid language codeFomafix2024-08-191-6/+14
| | | | | | | | | | | | | | | $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
* Installer: Use getCheck( 'css' ) instead of getVal( 'css' )Fomafix2024-05-131-1/+1
| | | | | | | For detecting the URL parameter css=1 the Unicode normalization of WebRequest::getVal is not needed. Change-Id: Ic1af273e617e062e0716406007cbd23dd455c7b3
* Namespace includes/contextJames D. Forrester2024-02-081-0/+1
| | | | | Bug: T353458 Change-Id: I4dbef138fd0110c14c70214282519189d70c94fb
* installer: Namespace more installer classesReedy2024-01-131-1/+3
| | | | Change-Id: If58d96c311bef728446b517bb7a81316b23aad4d
* Revert "mw-config: Avoid nested calls to `dirname()`, use levels"Jforrester2020-02-071-1/+1
| | | | | | | | This reverts commit 70990948050e5626f910132ca56af61ae09dba34. Reason for revert: Let's maintain PHP4-compat. Change-Id: I47b9b758fc3cf4df5c49bd148706f69e567b2440
* mw-config: Avoid nested calls to `dirname()`, use levelsDerick A2020-02-041-1/+1
| | | | | | | | `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
* Remove Language::factory and getParentLanguage useAryeh Gregor2019-10-271-1/+3
| | | | Change-Id: I11f8801ef47ec1a1f63d840116e69667e6f3ae3c
* Use the WebRequest::getCheck() shortcut where possibleThiemo Kreuz2019-03-111-1/+1
| | | | | | | | | | | 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
* installer: Code augmentation in wfInstallerMain functionDerick Alangi2019-03-091-2/+2
| | | | | | Cleanup null checks and string literals in wfInstallerMain function. Change-Id: Ib117e05faf899b0c46820d337f1bd3ebd4272419
* installer: Get WebRequest in mw-config via RequestContextDerick Alangi2019-03-091-4/+5
| | | | Change-Id: I535a91d09cc74ab08b782973a946dcf3fc3e6b46
* PHPVersionCheck: Remove obsolete load.php code and simplifyTimo Tijhof2018-10-281-1/+1
| | | | | | | | | | | | | * 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
* Don't use `phpcs:ignoreFile` to selectively ignore sniffsKunal Mehta2018-04-081-2/+1
| | | | | | | | | | | | | | | 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
* build: Updating mediawiki/mediawiki-codesniffer to 15.0.0Umherirrender2018-01-011-3/+2
| | | | | | | | | | | | | 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
* Remove empty lines at begin of function, if, foreach, switchUmherirrender2017-07-011-1/+0
| | | | | | Organize phpcs.xml a bit Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
* installer: Restore PHP 5.3 compatibility in index.phpBartosz DziewoƄski2016-12-111-1/+2
| | | | | | | | 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
* Convert all array() syntax to []Kunal Mehta2016-02-171-1/+1
| | | | | | | | | | 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
* In Installer, set the context language early to avoid loading from UserTim Starling2016-02-101-0/+1
| | | | | | | | | | | | | | | | 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
* phpcs: Use __DIR__ constant instead of callingumherirrender2015-11-151-0/+2
| | | | | | | | | | 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
* Check for dependencies in entry point and Maintenance.phpaude2015-05-231-6/+4
| | | | | | | | | | | | | | | | | | | | | | | 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
* Require PHP >= 5.3.3Kunal Mehta2014-10-301-1/+1
| | | | | Bug: T839 Change-Id: Iac827ef8505ff0653a40e45d759b0f79619351ee
* Fixed spacingumherirrender2014-07-191-1/+1
| | | | | | | | - Added/removed spaces around parenthesis - Added space after switch/if/foreach - changed else if to elseif Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2
* Use PHP_VERSION constant instead of phpversion() function callChad Horohoe2014-07-091-1/+1
| | | | Change-Id: Ifb3d1bd92d6abaa561e7337b311b4cb10c38a2b6
* Web installer: check for low PHP versions before executingSergio Santoro2014-07-081-0/+7
| | | | | | | | | | | | | | | | | | 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
* installer: Remove unnecessary param to outputCss()Sergio Santoro2014-06-281-2/+1
| | | | | | | WebInstaller::outputCss no longer requires an argument as of I717cb299b3639024. Change-Id: I85c1624eb99affd5df809a041cfc9f22fc46945a
* Installer: output css correctly when session errors occurSergio Santoro2014-05-041-0/+10
| | | | | | | | 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
* Clean up access pointsWaldir Pimenta2014-03-281-0/+2
| | | | | | | | | | | | | * 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
* phpcs: More require/include is not a functionTimo Tijhof2013-05-211-1/+1
| | | | | | | | | | | | | 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
* Remove hphpc support and deprecate related functionsTim Starling2013-05-091-5/+1
| | | | | | | | | | | | | | | | | 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
* Improve documentation of maintenance scripts and test suite.Alexandre Emsenhuber2012-10-021-0/+15
| | | | Change-Id: If5d695dc3665635fbed73a713583c0b03c14ebb1
* Use __DIR__ instead of dirname( __FILE__ )jeroendedauw2012-08-271-2/+2
| | | | | | 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
* Add a way for packagers to override some installation detailsMax Semenik2012-06-121-1/+1
| | | | | | | | | ...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
* trunk/phase3 is now mediawiki/corePlatonides2012-03-231-1/+1
| | | | Change-Id: Ief2721ee6573a5e54a276c91de636d9e1a678b8b
* Bug 28296 - Installer should honor &uselang= parameter John Du Hart2011-11-211-3/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/103814
* HipHop improvements:Tim Starling2011-05-301-1/+5
| | | | | | | | | | | | | | | | | * 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
* (bug 1379) Installer directory conflicts with some hosts' configuration panel.Max Semenik2011-02-261-0/+50
Renamed config/ to mw-config/, however left aliases for b/c. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/82845