aboutsummaryrefslogtreecommitdiffstats
path: root/mw-config
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* build: Update eslint-config-wikimedia to 0.11.0Ed Sanders2019-02-201-13/+13
| | | | Change-Id: Iee025a518962e68c5ec2c07d952f402cd2a7f69b
* build: Update eslint-config-wikimedia to 0.10.0Ed Sanders2019-01-081-7/+27
| | | | Change-Id: I2930bcabeeb7b7b2eb36063e77b26e664a691b43
* build: Upgrade stylelint-config-wikimedia to 0.5.0 and make passVolker E2018-11-281-1/+0
| | | | Change-Id: I648375927bace5fc21bd842268c645570759ce85
* Add generic `font-family` fallbackVolker E2018-11-161-1/+1
| | | | Change-Id: I65fb9eff81729f7d320d0fa73f88e6c8c5571100
* 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
* resources: Strip '$' and 'mw' from file closuresTimo Tijhof2018-09-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follows-up Id6d13bbea6: - '$': mw.loader.implement does this already. - 'mw': Use the canonical name directly. This replaces the following patterns: File closures (common): - `( function ( $, mw ) {` => `( function () {` - `( function ( $ ) {` => `( function () {` - `( function ( mw ) {` => `( function () {` - `( function ( mw, $ ) {` => `( function () {` File closures (rare): - `( function ( mw, $, OO ) {` => `( function () {` - `( function ( mw, OO, $ ) {` => `( function () {` - `( function ( mw, document ) {` => `( function () {` Combined dom-ready and file closure (rare): - `jQuery( function ( $ ) {` => `$( function () { - `jQuery( function () {` => `$( function () { Remaining references in files without a closure, as found by the new ESLint setting (rare): - `jQuery` => `$` - `mediaWiki` => `mw` Change-Id: I7cf2426cde597259e8c6f3f6f615a1a81a0ca82b
* installer: Do not wrongly hide namespace input fieldFomafix2018-05-081-1/+3
| | | | | | | | | | When the radio button is already on "other" then the input field for the namespace should not get hidden by JavaScript on load. Also remove the readonly attribute in HTML because the readonly attribute can not get removed with disabled JavaScript. Change-Id: I8cfde90d791765234572caf00b731881ac2eda48
* installer: Clean up ext-dependency jQuery codeTimo Tijhof2018-04-181-11/+8
| | | | | | | | | | | | | | | Follows-up c8833d8e8ecc. * Select the input elements by class to avoid accidentally trigging on unrelated elements elsewhere on the page in the future, given the generic selector. * Use on('change') instead of deprecated change() alias. * Set properties directly instead of via prop() indirection. * Get attribute directly instead of via data() indirection. Change-Id: I5158aa26b5fd7327d6795f0a31bbffbe99043fbf
* Merge "Handle extension dependencies in the installer"jenkins-bot2018-04-171-0/+48
|\
| * Handle extension dependencies in the installerKunal Mehta2018-04-131-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As there will likely be extensions bundled with the 1.31 release that depend upon other extensions, we should have the installer prevent users from enabling extensions that depend on other, not-enabled extensions. We can build a dependency map from extension.json's "requires" component. On the client-side, we'll first disable all checkboxes that require other extensions, and evaluate each checkbox click, updating the disabled checkboxes as possible. This required some refactoring of how ExtensionRegistry reports issues with dependency resolution so we could get a list of what was missing. While we're at it, sort the extensions under headings by type. This does not support skins that have dependencies yet (T186092). Bug: T31134 Bug: T55985 Change-Id: I5f0e3b1b540b5ef6f9b8e3fc2bbaad1c65b4b680
* | installer: Hide empty textbox if no extension tables were createdKunal Mehta2018-04-121-0/+5
|/ | | | | | | | | | The textarea is for extension update messages to go, but in some cases extensions don't create any tables so you're left with an empty, confusing textbox. Hide it with CSS if it's empty, since that's an expected condition. Bug: T48802 Change-Id: I798d07d1d6ed65011e9f2a2ac5cc77ad0595df7d
* 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
* installer: Fix setting a custom $wgMetaNamespaceKunal Mehta2018-04-061-1/+1
| | | | | | | | | `$textbox.removeProp('readonly')` has no effect and leaves the input still as readonly, so instead use `$textbox.prop( 'readonly', false )`, which does work. Bug: T188415 Change-Id: I898c5605caf383cc992a948f14294193460f761b
* 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
* build: Upgrade grunt-eslint from 19.0.0 to 20.0.0Ed Sanders2017-07-181-12/+8
| | | | | | Most indent and escaping fixes. Change-Id: I210e2fc3c0ce3148327ef81f824e1ce9f1e269b6
* Remove empty lines at begin of function, if, foreach, switchUmherirrender2017-07-011-1/+0
| | | | | | Organize phpcs.xml a bit Change-Id: Ifb767729b481b4b686e6d6444cf48b1f580cc478
* stylelint: Drop over-ride for 'declaration-no-important' and make passJames D. Forrester2017-03-011-2/+2
| | | | Change-Id: I150acaf188c445ca983583d9de107f10d425a0fb
* build: Enable selector-list-comma-newline-after stylelint ruleVolker E2017-02-232-2/+7
| | | | | | | Enabling selector-list-comma-newline-after stylelint rule and making it pass. Change-Id: I8fa3fbe03fcce57d555c47f39361c2a8d9828c3c
* build: Enable stylelint rule 'number-leading-zero' and make passJames D. Forrester2017-02-201-5/+5
| | | | Change-Id: I7f6d7784b5a415d4fd4fc098800bfdf9ed61790f
* 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
* This changes grammar, spelling and flow of the READMEzppix12016-08-111-1/+1
| | | | | Bug: T141738 Change-Id: I47d4e76d88b32af10805fa5531faf21cb1d8a77c
* Fix typo in mw-config/overrides/READMEKunal Mehta2016-06-151-1/+1
| | | | Change-Id: I1769753ad7e49b07977e15c369f479f8e42c6385
* Change the way installer overrides workMax Semenik2016-06-092-81/+22
| | | | | | | | | | Instead of "don't edit this file, edit that file", do it settings.d style where packagers can drop their stuff in mw-config/overrides. I propose to backport it to 1.27 because LTS. Bug: T135695 Change-Id: I2661ba2036b2887d31ab356751d731cc8b499f26
* Follow-up 276c30e: Use the correct hex for the green we wantJames D. Forrester2016-05-261-1/+1
| | | | | Bug: T136175 Change-Id: I4ce6010d55c361c56584a36ac252a68f0d2ee363
* build: Enforce stylelints on function callsJames D. Forrester2016-05-191-4/+4
| | | | | | | | | | * Function calls to calc should use operators with spaces * Function calls should not be split over lines * Function calls should have a space after each comma * Function calls should have space inside of the parentheses * Function calls should not quote url parameters Change-Id: Ia35f0bb5ca2dde23ce4ec90256b4fa958203e1cc
* build: Enforce stylelints on fontsJames D. Forrester2016-05-191-1/+1
| | | | | | | * Font families should be quoted unless keywords (''Times'' not 'Times') * Font weights should be named where possible ('bold' not '700') Change-Id: I20194c2998efb71db4da5ea79234a81dc90b55ea
* build: Enforce the rest of the colour-related stylelintsJames D. Forrester2016-05-192-3/+3
| | | | | | | | * Hex colours must be in short form where possible ('fff' not 'ffffff') * Hex colours must be used over named colours ('fff' not 'white') * Hex colours must be valid ('fff' not 'ffq') Change-Id: I2ba04cc3ad9898c17fee3c65bb3bead834c3a1fd
* build: Introduce stylelintJames D. Forrester2016-05-191-1/+1
| | | | | | | | | | | Initially, with just a single rule to make this a smaller change that we can incrementally extend up to the full Wikimedia coding conventions preset; namely, forcing hex references to colours to be in lower-case. Note the odd src definition to avoid referring to mediawiki.less the directory in the glob. Change-Id: I34f0c8e3c8280e3fce0aa22d7537100b850cbb8d
* Compress PNGs with zopflipngOri Livneh2016-02-216-0/+0
| | | | | | | | | | | | | | | | | | Zopfli is the most efficient DEFLATE compression algorithm, trading run-time performance for file sizes that are typically 3-8% smaller than those produced by zlib with the maximum compression setting. Its output is Deflate-compatible, so no specialized decoder is needed. This change was created by running zopflipng against all the PNG files in this repository. The exact invocation was: git ls-files --exclude-per-directory=.gitignore -- '*.png' \| parallel zopflipng -m -y {} {} \; Files which zopflipng was not able to compress more efficiently were left unmodified. Bug: T127608 Change-Id: Ia9c70cf35da489985af39df1f8b58469eb4813fd
* Convert all array() syntax to []Kunal Mehta2016-02-172-2/+2
| | | | | | | | | | 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
* Installer: use _MainCacheType form variablesaper2015-10-261-2/+2
| | | | | | | | Do not use "wgMainCacheType" form variable name that contains values that cannot be assigned to $wgMainCacheType Bug: T116375 Change-Id: I83459c8006cc4c1bcdeaa0d78a1230687c95db46
* Web installer: Fix collapsing of field help textKevin Israel2015-09-261-5/+5
| | | | | | | Follows-up 1e06a9f02f9a. Bug: T112383 Change-Id: I23030f48ce89abc460ac9e7ed3c148893ffb24ef
* Add missing images used in installer's CSSBartosz Dziewoński2015-09-122-0/+0
| | | | | | | | Copied from resources/src/mediawiki.legacy/images. Follow-up to 1e06a9f02f9a3ca645f5abe5cd38943fcfa3aea2. Bug: T111519 Change-Id: Idb7f02ee62eb535af3c2dbbaed53dabe04ae4e9e
* build: Enable jscs rule 'requireSpacesInsideParentheses' and make passJames D. Forrester2015-09-031-9/+9
| | | | Change-Id: Ie88c89344e54657f007e5101472e667be5408319
* mediawiki.legacy.config: use own help-field stylingOri Livneh2015-08-141-0/+29
| | | | | | | | | | | | Instead of using .mw-help-field-container from mediawiki.legacy to style help tooltips, use a class that is specific to the WebInstaller and which is styled in its stylesheet. This allows us to stop embedding it in mediawiki.legacy (which is loaded on every page). The CSS is copied directly from the styles for mw-help-field-container et al. in mediawiki.legacy. Change-Id: I8e092e9d2c91b5f70499d93c1134f43f2e96348c
* Do not support new installations via .php5 entrypoint any longerChad Horohoe2015-06-021-26/+0
| | | | | | | | | | 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
* 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
* installer: Remove unused references to wgResourceLoaderMaxQueryLengthTimo Tijhof2015-02-281-1/+1
| | | | | | | | | | | | | * Added in 40e18e45343. * Removed in 648bed9f839 (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
* Require PHP >= 5.3.3Kunal Mehta2014-10-301-1/+1
| | | | | Bug: T839 Change-Id: Iac827ef8505ff0653a40e45d759b0f79619351ee
* Merge "Use a custom MediaWiki logo during installation"jenkins-bot2014-09-031-0/+0
|\
| * Use a custom MediaWiki logo during installationBartosz Dziewoński2014-09-031-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we used the regular logo, which could prove confusing when one switched back-and-forth between the installed and mediawiki.org pages. The new one is "half-drawn", evoking the image that we are in the process of creating something (a new wiki). I like that. Source: <https://commons.wikimedia.org/wiki/File:Wikitech-logo.png>, authored by Brion, GFDL 1.2+. It was previously used as a logo of the Wikitech wiki, but that has unicorns instead now. Change-Id: Ic5c83bb85e6b6a11978d452fbe46d2dad9c5a553
* | Use String#slice instead of String#substr or String#substringTimo Tijhof2014-09-031-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quite a few reasons: * There is a bug in IE 8 and below where the startIndex argument does not support negative values, contrary to the ECMAScript spec and implementations in other browsers. IE8: 'faux'.substr( -1 ); // "faux" Standards: 'faux'.substr( -1 ); // "x" Code written for ES5 (and using the es5-shim) works as expected since the shim repairs this method. * String#substr and String#substring both exist but have different signatures which are easily mixed up. String.prototype.substr( start [, length] ) > Supports negative start, but not in IE8 and below. > Takes length, *not* second index. E.g. `substr( 2, 3 )` returns `slice( 2, 5 )`. String.prototype.substring( indexA [, indexB] ) > Doesn't support negative indices. > If indexA is larger than indexB, they are silently swapped! String.prototype.slice( start [, end] ) > Supports negative indices. 'faux'.substr( 0, 2 ); // "fa" 'faux'.substring( 0, 2 ); // "fa" 'faux'.slice( 0, 2 ); // "fa" 'faux'.substr( -2 ); // "ux" 'faux'.substring( -2 ); // "faux" 'faux'.slice( -2 ); // "ux" 'faux'.substr( 1, 2 ); // "au" 'faux'.substring( 1, 2 ); // "a" 'faux'.slice( 1, 2 ); // "a" 'faux'.substr( 1, -1 ); // "" 'faux'.substring( 1, -1 ); // "f" 'faux'.slice( 1, -1 ); // "au" 'faux'.substr( 2, 1 ); // "u" 'faux'.substring( 2, 1 ); // "a" 'faux'.slice( 2, 1 ); // "" * String#slice works the same way as Array#slice and slice methods elsewhere (jQuery, PHP, ..). * Also simplify calls: - Omit second argument where it explicitly calculated the length and passed it as is (default behaviour) - Pass negative values instead of length - x. - Use chatAt to extract a single character. * Change: - Replace all uses of substring() with slice(). - Replace all uses of substr() with slice() where only one parameter is passed or where the first parameter is 0. - Using substr()'s unique behaviour (length instead of endIndex) is fine, though there's only one instances of that, in mediawiki.jqueryMsg.js Change-Id: I9b6dd682a64fa28c7ea0da1846ccd3b42f9430cf
* Move installer files from skins/common/ to mw-config/Bartosz Dziewoński2014-08-1711-0/+338
| | | | | | | | | | | | | | | | | The CSS and JS files are definitely used only by the installer. As for the images: * mediawiki.png is still used directly by some error pages (includes/PHPVersionError.php, includes/templates/NoLocalSettings.php) * ajax-loader.gif is still used by shared.css * bullet.gif is mysteriously used by *something*, according to the logs at bug 69277 comment 11; I currently have no idea what, so let's keep it here for a while * All other ones don't grep (outside of the installer itself) and don't appear in the logs on bug 69277. Bug: 69277 Change-Id: I9146d9211a807911a5e0cfaa1dd3ab8170f333ca
* 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