Commit graph

7215 commits

Author SHA1 Message Date
Ori Livneh
c099155a17 ellapsed => elapsed
Also fix some files that don't end with a newline.

Change-Id: Id0672d685b929a5832b42f733dad49683536180a
2015-06-23 03:32:33 +00:00
Gilles Dubuc
584a239318 TinyRGB support for JPG thumbnails
TinyRGB is an ICC profile released by Facebook under CC0.
It is designed to be fully compatible with sRGB.
It offers the vast advantages of being much smaller than sRGB,
as well as being free as in freedom (the sRGB profile found in the
majority of JPGs is copyrighted).

This change aims to provide the ability to swap sRGB for TinyRGB at
the time thumbnails are generated.

JPGs that use another ICC profile than sRGB or no profile at all are
unaffected.

Bug: T100976
Change-Id: I2ae35ddad4e8a82db8b9541974367dc76c884e7a
2015-06-22 16:17:54 +00:00
jenkins-bot
e8e8670e7c Merge "Remove i18n references to Popularpages" 2015-06-22 14:56:38 +00:00
jenkins-bot
4d264a3762 Merge "Introduce mediawiki.RegExp module" 2015-06-22 13:58:32 +00:00
Vivek Ghaisas
96c93a8cce maintenance/exportSites: Fix minor whitespace issue
Opening parentheses should be followed by a single space.

Change-Id: I9d73334c3c79bf5277248c56e0f146a91938b35c
2015-06-20 23:49:49 +03:00
Timo Tijhof
8bee338d1c Introduce mediawiki.RegExp module
Simple module based on the $.escapeRE method of the old
"jquery.mwExtension" module.

Change-Id: I9e108a3f8c24d87bb239b63a14807a691c25aa3e
2015-06-20 07:10:00 +01:00
paladox
dca469bb87 Fix phpcs warnings
Bug: T102614
Change-Id: Iecea365f83bbb0c336b58f1cfdebfc9b1112087e
2015-06-18 20:13:37 +00:00
jenkins-bot
0538ebfd24 Merge "Fixed spacing" 2015-06-17 21:40:11 +00:00
umherirrender
d8821f2b0b Fixed spacing
- Removed space after casts
- Removed spaces in array index
- Added spaces around string concat
- Added space after words: switch, foreach
- else if -> elseif
- Removed parentheses around require_once, because it is not a function
- Added newline at end of file
- Removed double spaces
- Added spaces around operations
- Removed repeated newlines

Bug: T102609
Change-Id: Ib860222b24f8ad8e9062cd4dc42ec88dc63fb49e
2015-06-17 20:22:32 +00:00
paladox
889f83dc9b Fix phpcs warnings
Change-Id: I2d7dbf7314257a3ad8f5f6b97a6949a2500d298f
2015-06-17 20:06:42 +00:00
Vivek Ghaisas
5132a68683 Remove multiple empty lines in functions
Functions must not contain multiple empty lines in a row
(Squiz.WhiteSpace.SuperfluousWhitespace sniff).

Bug: T102774
Change-Id: Ib706e4fc34b95c0d7c887e54af0ea61227767d8f
2015-06-17 13:30:57 +03:00
Vivek Ghaisas
9f5b6f5aeb Fix whitespace issues around parentheses
Fix issues found by MediaWiki.WhiteSpace.SpaceyParenthesis sniff.

Bug: T102617
Change-Id: Iec7f71e64081659fba373ec20d9d2006306a98f4
2015-06-16 22:14:02 +03:00
Vivek Ghaisas
665f1a033d Ensure that files end with a newline
Bug: T102619
Change-Id: Iae6e722151581d15c9421d41c4d14b100bb6e437
2015-06-16 16:21:57 +03:00
Mark A. Hershberger
671adf39db Remove i18n references to Popularpages
bug: T100676
Change-Id: I66002cbfb6b210fa08b57782665450b59439d17f
2015-06-15 17:48:52 -04:00
Kunal Mehta
f6e5079a69 Use mediawiki/at-ease library for suppressing warnings
wfSuppressWarnings() and wfRestoreWarnings() were split out into a
separate library. All usages in core were replaced with the new
functions, and the wf* global functions are marked as deprecated.

Additionally, some uses of @ were replaced due to composer's autoloader
being loaded even earlier.

Ie1234f8c12693408de9b94bf6f84480a90bd4f8e adds the library to
mediawiki/vendor.

Bug: T100923
Change-Id: I5c35079a0a656180852be0ae6b1262d40f6534c4
2015-06-11 18:49:29 +00:00
jenkins-bot
f5cda3a9e0 Merge "Chinese Conversion Table Update 2015-4" 2015-06-10 19:33:55 +00:00
Sn1per
1a80532083 Revert "Implement MalformedTitleException for JS and use in constructor"
This reverts commit 52bc467b31.

Change-Id: I4ccd057559251317134da36d75fa8532ede4c51b
2015-06-04 21:45:07 +00:00
jenkins-bot
977f7ad8ad Merge "Combine deleteArchived{Files,Revisions}.inc into the .php scripts" 2015-06-03 00:05:52 +00:00
Chiefwei
839ffb0830 Chinese Conversion Table Update 2015-4
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82.

It is only data changes and only works for Chinese WikiProjects.

Change-Id: Ic1355c98e8e18217c73461239d4754f9d117999d
2015-06-02 16:59:05 +08:00
James D. Forrester
9069b9ce85 Follow-up 727454f: Add mediawiki.widgets to jsduck
Change-Id: I1715c5bbca8735de8c391dee4e2cec8269414acf
2015-06-01 16:33:21 -07:00
Geoffrey Mon
52bc467b31 Implement MalformedTitleException for JS and use in constructor
Implements MalformedTitleExceptions to provide information on
  invalid titles.  Throw these exceptions from Title constructor
  instead of generic Errors.

Bug: T89648
Change-Id: I9ed16a5a30b01df785ad736df4b84111c5939bbf
2015-05-31 21:52:08 +02:00
Kunal Mehta
a1368a3d9b registration: Version the extension.json schema
Versioning the extension.json schema will allow us to make breaking changes
to the schema in a non-breaking manner.

Extensiosn and skins will set a 'manifest_version' value, stating which
version of the schema the file is written for. Processor::extractInfo() will
be  passed the version number, and can switch behavior depending upon it.

For backwards-compatability, a version number of 1 is assumed if none is set.
The validateRegistrationFile.php script will emit a warning if this is the
case.

Bug: T99344
Change-Id: I2086a1465ceaeedd1ccc6804fda2c304ad16ffa0
2015-05-28 22:20:59 +00:00
jenkins-bot
61b0670e7e Merge "resources: Add OOjs UI's Apex theme's files" 2015-05-23 16:53:57 +00:00
Bartosz Dziewoński
4dc9c344ff resources: Add OOjs UI's Apex theme's files
Currently not used, but there are big plans for them!

Change-Id: Iaa0e82a3ebda4665c5eafac5167c8912e82199d4
2015-05-23 16:45:54 +00:00
aude
9880d5b60b Check for dependencies in entry point and Maintenance.php
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
2015-05-23 15:05:11 +00:00
jenkins-bot
5bb693f6d4 Merge "registration: Don't ignore empty array config settings when converting" 2015-05-21 17:33:05 +00:00
Kunal Mehta
e66864878a registration: Don't ignore empty array config settings when converting
Remember which settings we set to an empty array and then only skip
those settings.
The weird variable name "$__settings" is used to avoid any conflicts
similar to what eval.php does.

Bug: T98739
Change-Id: Iefbf8a98fd433cfbe0087aca6821d90c2786b0cb
2015-05-21 10:22:05 -07:00
Marius Hoch
a89338ff82 Improve documentation of maintenance/sql.php
I found this to be lacking earlier this week...

Change-Id: I409c7451baa71b88cf554af0d82d1bf5904a2c4c
2015-05-20 21:24:33 +02:00
jenkins-bot
aaef99cbb6 Merge "Do not allow setting deprecated $wgSpecialPageGroups over extension.json" 2015-05-20 04:48:59 +00:00
Chiefwei
60d58c19c5 Chinese Conversion Table Update 2015-3
Update the Chinese conversion table routinely to fix bugs reported from
https://zh.wikipedia.org/wiki/Wikipedia:%E5%AD%97%E8%AF%8D%E8%BD%AC%E6%8D%A2/%E4%BF%AE%E5%A4%8D%E8%AF%B7%E6%B1%82.

It is only data changes and only works for Chinese WikiProjects.

Change-Id: I8c9a52a3c03031330b8be771f3c74e6007efab73
2015-05-18 08:13:03 +00:00
Kevin Israel
5fca8e5130 Combine deleteArchived{Files,Revisions}.inc into the .php scripts
Some of deleteArchivedFiles.php and deleteArchivedRevisions.php were
split off to deleteArchivedFiles.inc and deleteArchivedRevisions.inc
respectively in r62948 (04b2413aac) for use in tests.

The tests no longer use those methods, so I moved them back and inlined
them into execute(). I also did some minor cleanup -- changing direct
calls to tableName() and query() to use query builder functions and
clarifying/fixing some of the logic that was in deleteArchivedFiles.inc.

Change-Id: Ica49dcac18a9c702cffe02e562c6dff48d2d2784
2015-05-17 00:01:42 +00:00
Kevin Israel
eb11a00a1e Remove maintenance script deleteImageMemcached.php
This script is broken; it deletes an object cache key that 1.11
(r22850 / ed4303922f) and newer no longer use. The most similar
working script is probably refreshImageMetadata.php --force.

Change-Id: Icf2223dc87861e02f20422492d40994f5302ad15
2015-05-16 17:47:48 -04:00
umherirrender
d06aaa9b20 Do not allow setting deprecated $wgSpecialPageGroups over extension.json
$wgSpecialPageGroups is deprecated since 1.21
The code should be migrated to override SpecialPage::getGroupName before
adding an extension.json to the extension, instead of allowing setting
this over extension.json

Also added a warning to convertExtensionToRegistration.php for the no
longer supported global

Change-Id: Idccbe41b649de93548c5b0fca03145da716bcc65
2015-05-16 22:26:33 +02:00
Reedy
2d234faf92 Remove PHP4 "support" from using constant in update.php
Change-Id: I4743d10a3084a7dc4806d73662b19aa6751b0c18
2015-05-11 15:34:02 +01:00
Aaron Schulz
929b280b99 Unbreak --profile=text for CLI scrips
* Fixes "Undefined index: threshold" and
  "Invalid argument supplied for foreach()" errors
  so that output actually can show

Change-Id: Ibf8090f265d988c58d1752319336a5146a28f4d0
2015-05-08 19:09:31 -07:00
jenkins-bot
7f3037e8ff Merge "Only configure the transaction profiler if profiling is enabled" 2015-05-07 20:05:54 +00:00
Ori Livneh
03d941ed42 Only configure the transaction profiler if profiling is enabled
Follows I0fe14bcda.

Change-Id: I4eb77d3b5ead587da6f01dec00fa6c5852225fcc
2015-05-06 17:45:48 -07:00
jenkins-bot
200322ca9a Merge "Remove --max-slave-lag options and remnants from maintenance scripts" 2015-05-06 20:37:41 +00:00
jenkins-bot
39508404aa Merge "update.php: Remove max seconds of lag from wfWaitForSlaves() call" 2015-05-06 20:37:26 +00:00
Kunal Mehta
2b81c4ca36 registration: Add support for $wgParserTestFiles
Bug: T97921
Change-Id: I9a736a4c0ff739c4acf742b8f17792544851b28e
2015-05-02 23:16:54 -07:00
jenkins-bot
01799a7cb3 Merge "convertExtensionToRegistration.php: Ignore i18n shims" 2015-05-02 05:00:42 +00:00
Kevin Israel
c9b73a38bc convertExtensionToRegistration.php: Ignore i18n shims
Bug: T91350
Change-Id: I18b35db14a13f58909bce83fec11bf9e8f10672d
2015-04-30 23:32:44 -04:00
Kevin Israel
5f6fdaab77 generateJsonI18n.php: Remove features that should no longer be needed
* Removed --langcode, which was for converting core messages files.
* Do not generate backward compatibility shims. MediaWiki 1.19 will
  enter end-of-life status in May 2015.
* Print a special error message for shims, which is different from
  the one that used to refer to --langcode.
* Removed extra newlines from error messages.

Change-Id: Ic8498fbdd7c2bd6e30ddbd96da85b2b8b23d706b
2015-04-30 15:59:13 -04:00
Timo Tijhof
22f098c8cf maintenance/resources: Enable 'set -e' and 'set -u' in bash scripts
* set -e: Abort on error.
* set -u: Emit error for undefined variables.

This removes the need for endless "&&"-chains and easy-to-forget
"|| exit 1" statements.

Change-Id: I41a1c0d1bd57b5e241b83224096d32876fd913af
2015-04-29 02:04:22 +01:00
jenkins-bot
38e333c81a Merge "Use ResourceLoaderImageModule to serve icons for OOjs UI" 2015-04-28 20:21:08 +00:00
Bartosz Dziewoński
9e5c3e9521 Use ResourceLoaderImageModule to serve icons for OOjs UI
Benefits:
* Full per-language icons support. Icons that differ for each language
  (such as the 'Bold' icon) will now always display correctly
  according to user interface language, even on old browsers.
* MediaWiki UI icons support. When the 'mediawiki.ui.icon' module is
  loaded, you can use syntaxes such as below to display any OOUI icons
  (from the packs that were loaded) without involving OOUI itself.
    <div class="mw-ui-icon mw-ui-icon-before mw-ui-icon-check">OK</div>
    <div class="mw-ui-icon mw-ui-icon-after mw-ui-icon-check">OK</div>
    <div class="mw-ui-icon mw-ui-icon-element mw-ui-icon-check">OK</div>

Summary of changes:
* Resources.php:
  * Remove icons CSS files. Include image data JSON files instead.
  * Split the images from 'oojs-ui.styles' module to separate ones.
* OutputPage: Update enableOOUI() method for newly split modules.
* ResourceLoaderImageModule: Make it possible to load image data from
  a JSON file.
* update-oojs-ui.sh: Copy source files rather than distribution for
  icon packs.

This is not an improvement when it comes to code quality, though :(
Issues include some nasty code duplication, using "source code" (image
definitions) from OOUI rather than just distribution files, and hacky
methods to load image data from JSON files live.

Bug: T92551
Change-Id: Id369ecaec7048dcf68ba1e4df748362760533782
2015-04-28 13:48:30 +00:00
jenkins-bot
5ac40796cd Merge "Removed LocalFile::purgeHistory method" 2015-04-28 08:31:14 +00:00
jenkins-bot
a576e4066a Merge "Added $wgTrxProfilerLimits and slow query limits" 2015-04-28 08:26:06 +00:00
Aaron Schulz
7ea13643f5 Added $wgTrxProfilerLimits and slow query limits
* Limits are now configurable instead of being hard-coded

Change-Id: I99133586eb82e8e9e84061548c8d1a99695fde5c
2015-04-28 10:18:11 +02:00
Chad Horohoe
f94e85e976 wfRunHooks() -> Hooks::run() in maintenance scripts
Change-Id: I6550bca3a6a3a6cd67bb1ed94c09805deed86dbc
2015-04-27 21:42:17 -07:00