Commit graph

1270 commits

Author SHA1 Message Date
Jackmcbarn f4501ccd22 Only use mw.ustring when necessary
mw.ustring is really really slow. I've discovered that in a lot of modules
on enwiki, upwards of 2/3 of the total runtime gets used when mw.html
calls mw.ustring.gsub. This change checks whether any Unicode characters
are present, and if not, calls string.gsub instead.

Change-Id: Ia50061584be3901ae7428354c449236225c318db
2016-05-30 18:38:32 +00:00
Kunal Mehta 08a39470c0 build: Updating mediawiki/mediawiki-codesniffer to 0.7.2
Also added "composer fix" command.

Change-Id: I8da17b799929b7caed0e0a89014c6ab15c39f0c6
2016-05-27 18:24:16 -07:00
Brad Jorsch c9de00aeff SECURITY: Don't escape strip markers when escaping attributes in mw.html
Core strip markers were changed in T110143 to include characters that
are normally encoded in attributes, however we want to pass them through
here so they can be unstripped correctly in the output wikitext.

This fix makes "Strip markers in CSS" parser test pass again.

Bug: T110143
Bug: T135961
Change-Id: I1353931a53c668d8a453dfa2300a99f59fdb01c5
2016-05-22 21:40:32 -04:00
Translation updater bot 05e8a08b66 Localisation updates from https://translatewiki.net.
Change-Id: I473d9948aa2c7f460df1ceace59467433a76126a
2016-05-22 22:27:35 +02:00
Translation updater bot d0b9bc069f Localisation updates from https://translatewiki.net.
Change-Id: I98f610ae344da3de21275765c2388aa85d90a9eb
2016-05-21 22:23:50 +02:00
Brad Jorsch aa4d72e3ff Fix uncontroversial phpcs errors
The following continue to be ignored:
* Generic.Arrays.DisallowLongArraySyntax.Found, because I'm not sure
  Scribunto is ready to abandon old version support in master.
* MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures,
  because it's overly strict for its purpose.

Squiz.Classes.ValidClassName.NotCamelCaps isn't ignored globally, we
just ignore it explicitly every place it's needed.

Change-Id: I307668da6ef7b3e23da19b1fd1e08914239b99b3
2016-05-18 16:31:28 -04:00
Ricordisamoa 7ec8675e85 Add mediawiki/mediawiki-codesniffer
Failing rules are disabled for now.

Change-Id: I9c4cbd7865a0793703b3ca39045087c5ab691bd1
2016-05-18 15:16:32 +02:00
jenkins-bot c753698eaa Merge "Provide a standard way to get the target of a redirect page" 2016-05-12 19:32:17 +00:00
Sébastien Santoro 5c1a9c9703 Localisation in Breton language
Translation authors:

  - Ash Crow
  - VIGNERON

Bug: T134734
Change-Id: I0e6f244b0dc15df3d3e1ae090f19f6678f3bc21f
2016-05-09 09:25:35 +00:00
Translation updater bot da0ac79906 Localisation updates from https://translatewiki.net.
Change-Id: I3090be34eea249be3bdbf256f938d3d7dfda0bbd
2016-05-01 23:20:19 +02:00
Translation updater bot 60422dfd25 Localisation updates from https://translatewiki.net.
Change-Id: I0e9f3033db37e0412e7db13b0f585227ef31466a
2016-04-26 22:31:12 +02:00
Translation updater bot 811cd06ea2 Localisation updates from https://translatewiki.net.
Change-Id: Ic3065cde5c1b072d4fa74d323cd933c72376aa83
2016-04-24 22:36:06 +02:00
Raymond c93ff0c51e Add namespace translation for diq
https://translatewiki.net/wiki/Thread:Translating_talk:MediaWiki/Namespace_translation_for_diqwiki

Change-Id: I10e5188106d0a1a8236db0077e7d2e58b250f363
2016-04-22 10:14:39 +02:00
Translation updater bot 3b982a1c6f Localisation updates from https://translatewiki.net.
Change-Id: I9a439cb12c5cb0dc6d9f0ceb460ff7c351682409
2016-04-20 23:14:31 +02:00
Translation updater bot ea5728c063 Localisation updates from https://translatewiki.net.
Change-Id: I4415ed38a7e8d5803782cf4588fff2a5dbd1a052
2016-04-19 22:22:22 +02:00
Translation updater bot 7774414e88 Localisation updates from https://translatewiki.net.
Change-Id: Ie727f46cab00ccc235c762340cc644218dc9af6a
2016-04-16 23:14:43 +02:00
Translation updater bot 8279e718c7 Localisation updates from https://translatewiki.net.
Change-Id: I5490f815ccf4d7dfc0b81986139147e3acba868d
2016-04-11 22:39:17 +02:00
Brad Jorsch 507827aaf5 Avoid fataling Special:Version if LuaSandbox is enabled without the PHP extension
Such a configuration is completely broken, but it's easy enough to
detect and avoid here.

Bug: T131910
Change-Id: I0bf108ec191a59f5506c0cdab00f3e5e68158ed5
2016-04-06 11:20:20 -04:00
Brad Jorsch b3da8a698d Add toNFKC and toNFKD to mw.ustring
This also makes some updates to make-normalization-table.php to handle
the move of UtfNormal to a separate library.

Bug: T126427
Change-Id: Id4985c3ca441cf92f08ba1f1af85c762ba43d7d2
2016-04-02 15:22:42 +00:00
Sorawee Porncharoenwase 22153435a2 Change the translation of th namespace
Change the translation of "Module" from "เกณฑ์สำหรับวัด" which is totally wrong and meaningless
to "โมดูล" which is the correct one. The consensus to modify this can be found at
https://th.wikipedia.org/wiki/วิกิพีเดีย:ศาลาชุมชน/อภิปราย/เปลี่ยนชื่อเนมสเปซ_module

This commit corrects [[gerrit:243617]].

Change-Id: I1eeb295c25a34c2852bc7c71921534b578b73e35
2016-04-02 05:54:45 -04:00
Translation updater bot 74dd520ab2 Localisation updates from https://translatewiki.net.
Change-Id: I3f4eab45dd07d366cdb547c5e2ffa723c5836ce4
2016-04-01 22:28:34 +02:00
jenkins-bot c812a5418b Merge "Modify Scribunto namespaces for Aragonese" 2016-03-28 02:27:33 +00:00
maurelio fa21479147 Modify Scribunto namespaces for Aragonese
Bug: T131025
Change-Id: I7c2baeca08fd8cb95c0eff281b0c3c39f784fb46
2016-03-28 02:17:42 +00:00
Translation updater bot 55e2eb071e Localisation updates from https://translatewiki.net.
Change-Id: I412b23aee7106d013af4cadb8e4f3c693d1b2911
2016-03-27 21:22:59 +02:00
jenkins-bot 8a898a6bbd Merge "Update LanguageLibraryTests per changes in core" 2016-03-21 12:53:54 +00:00
aude 399b94fa24 Update LanguageLibraryTests per changes in core
appears the test depends on kk-cyrl translation of
limitreport-cputime-value, which has changed:

https://gerrit.wikimedia.org/r/#/c/278597/1/languages/i18n/kk-cyrl.json

Change-Id: Iedf847b7dd0dde094ce0c1c2af4f44b71b9c477f
2016-03-20 18:02:22 -04:00
Translation updater bot 4daf25e4c1 Localisation updates from https://translatewiki.net.
Change-Id: I4ab9b1160a1dafbfe3dd4b5eeb62ca6b95156a4a
2016-03-20 22:41:51 +01:00
Translation updater bot 6708409f21 Localisation updates from https://translatewiki.net.
Change-Id: Ibe17e80f993d0d532e1bcc482287d4a43548cc31
2016-03-17 23:22:07 +01:00
Sébastien Santoro 5e3c86bae5 Namespace localisation for Sanskrit
Translation author: Nehal Dave (NehalDaveND)

Bug: T101634
Change-Id: I93e44daa8980bc5f75e2a0577a1ccfa6dd758d34
2016-03-17 15:06:20 +00:00
Jackmcbarn b82ed4aa7d Restrict cached results to their original frame
When caching results from frame:preprocess and frame:expandTemplate,
restrict the scope of the cache to the frame object that was used. This
allows the integrity of the empty-frame expansion cache to be maintained
while also allowing parent frame access. This change is the equivalent of
I621e9075 in core.

Change-Id: Iae4c00e7e19ba12cfdaac135be16c991d9d0cea1
2016-03-09 11:27:23 -05:00
Translation updater bot 589619cced Localisation updates from https://translatewiki.net.
Change-Id: Ie545b248608e81ca4c18b52cb157cfe34fb5e904
2016-03-08 22:44:44 +01:00
Translation updater bot 91276f2872 Localisation updates from https://translatewiki.net.
Change-Id: I028aa6e54ef73902904884754105406bf0c7622f
2016-03-07 22:26:13 +01:00
Translation updater bot fe461e5540 Localisation updates from https://translatewiki.net.
Change-Id: Idf6a922b27510a6c1bc8ac0b6e86c950cabb1f73
2016-03-01 22:01:20 +01:00
Ricordisamoa 1573bee81a Provide a standard way to get the target of a redirect page
The new Scribunto_LuaTitleLibrary::redirectTarget() method is
used by mw.title objects as read-only attribute 'redirectTarget'.

If the page does not exist or it is not a redirect, the value
of the attribute is `false`; otherwise, it is the target of the
redirect page, as mw.title object.

This is a proper alternative to parsing wikitext as it is done in:
https://en.wikipedia.org/wiki/Module:Redirect

Bug: T68974
Change-Id: Id4d9b0f8c1cd09ebc42c031d4d3fc0c33eea44aa
2016-03-01 14:30:22 +01:00
Translation updater bot 10ebda4a73 Localisation updates from https://translatewiki.net.
Change-Id: I1667ed2055e2cceb9d361dd7f3f0d9bd7cfdb24b
2016-02-27 21:58:18 +01:00
Brad Jorsch 31dd4d535f Pass language to SpecialVersion::getVersion()
The language used should be $parser->getTargetLanguage(), not the user
language.

Soft-depends on Id14733aaef3e52a2e315bffe74baeb926d46e238.

Bug: T127233
Change-Id: I712e048367d9d65fd223cb085dbf9e5fceca286c
2016-02-24 00:11:17 +00:00
Darian Anthony Patrick 00ed2a567b Update lua binaries to patch CVE-2014-5461
These binaries were compiled from a manually lua-5.1.5 source tree.

Linux binaries were built by Anomie. Mac OS X and Windows by dpatrick.

Bug: T72541
Change-Id: I6af0f042c491785cce26afc186a148c83c4f3414
2016-02-22 09:38:22 -08:00
Paladox 663b2f9c3b Add jshint to npm
Change-Id: I87bf6347e80395b10ee496f0786d55e759a4fef3
2016-02-19 15:33:18 +00:00
jenkins-bot 62ecb113b2 Merge "Update jscs configuration" 2016-02-18 01:37:28 +00:00
Paladox 0fd4cfb6b1 Update jscs configuration
Change-Id: I1da096b453413ae0faa06b551e35d270c78e0c41
2016-02-13 16:18:05 +01:00
Sébastien Santoro ba17a0ea2d Namespace correction for Module talk in ur
Replaces U+06C1 U+0654 ("ARABIC LETTER HEH GOAL" and "ARABIC HAMZA ABOVE")
with the NFC form U+06C2 ("ARABIC LETTER HEH GOAL WITH HAMZA ABOVE").

Bug: T126799
Change-Id: Iae5f252441be4aacf56553a4226d7b6a0bd952c5
2016-02-13 14:42:26 +00:00
Paladox b423ed3eba Update grunt-jscs to 2.7.0
Change-Id: I76b632bb08b5f899b753464e6d9a46c595ce9603
2016-02-11 22:31:33 +00:00
Brad Jorsch 1365e35d89 Waste CPU cycles, not wall clock time
Apparently microtime is a bit unreliable for this test for some reason,
so let's use getrusage() to measure actual CPU time instead.

Bug: T125045
Change-Id: Ia1ab6b043b99abb4fc6c2989ad09a24d97dd09c3
2016-02-11 14:00:03 -05:00
Paladox bd44f0f5e8 Add phplint to composer
Change-Id: Ia3509caa82a3ed6d021c61d8bbe2340f12f15e05
2016-02-10 08:57:50 +00:00
Translation updater bot 6ff65d0b28 Localisation updates from https://translatewiki.net.
Change-Id: I1b893c19f6338577ce124186aee766737e673de6
2016-01-31 21:41:18 +01:00
Translation updater bot 0c2dd662b6 Localisation updates from https://translatewiki.net.
Change-Id: Ic33dff158397fb3ac6fe97694ddf79d40972f859
2016-01-27 21:44:15 +01:00
Brad Jorsch dd0c6e7668 Use ParserOutput::getRawText() where available
This is unlikely to be a cause of the cache corruption since this isn't
calling setText() on any wikitext ParserOutputs, but let's fix it just
in case.

Bug: T124356
Change-Id: Ic34c654af86385dede843009d89df6f442ddc915
2016-01-25 12:39:23 -05:00
Anomie 581ca1111f Revert "Add license information"
This reverts commit 4c29dba5e8.

Change-Id: I3c15b4b93355322de80cb1c3ede83bd048b4c94d
2016-01-23 15:27:39 +00:00
victorbarbu 4c29dba5e8 Add license information
Bug: T123943
Change-Id: Ib8de2c84e7e962efce656530021a44617a9dcb8a
2016-01-23 13:04:40 +02:00
Jackmcbarn dc9446b84d Remove loadedLibraries
Nothing actually uses this, so I'm not sure why we ever kept track of it.

Change-Id: I60480b96a83731c7b25aed55099886a86efc08b1
2016-01-19 02:25:25 +00:00