Commit graph

1267 commits

Author SHA1 Message Date
Ed Sanders 822d0cd345 Rename module editPage→editTemplatePage, create minimal new editPage module
VisualEditorPluginModules loads whenever VE loads, so create a minimal
loader page to check if we are in the template namespace before loading
the rest of the TemplateData init code.

Bug: T208765
Change-Id: Id127eb4a2472a6ce9da7672f9237b182cf6be2eb
2018-11-24 00:14:03 +00:00
libraryupgrader a71ecb3953 build: Updating mediawiki/mediawiki-codesniffer to 23.0.0
Change-Id: Icbaa6edc54535c79390a11da27054cb6c91a8b42
2018-11-16 14:38:18 +00:00
jenkins-bot db3d73bc84 Merge "eslint: Introduce wikimedia/qunit ruleset" 2018-11-15 23:57:55 +00:00
jenkins-bot 7b7b1bacbd Merge "build: Update devDependencies" 2018-11-15 23:51:42 +00:00
jenkins-bot 201efff49a Merge "Separate parameter aliases in the description table with spaces" 2018-11-15 23:51:41 +00:00
Ed Sanders 9a8c807f51 eslint: Introduce wikimedia/qunit ruleset
Change-Id: I3972918c00e69d325c5cb2055d4996a8c07b1034
2018-11-15 23:21:32 +00:00
Ed Sanders 0736e6d572 build: Update devDependencies
eslint-config-wikimedia      0.5.0  →   0.8.1
 grunt-eslint                20.1.0  →  21.0.0
 grunt-stylelint              0.9.0  →  0.10.1
 stylelint                    8.2.0  →   9.2.0
 stylelint-config-wikimedia   0.4.2  →   0.4.3

Change-Id: I21d7b4e1418f2f9bf22d380b1302158c56ab4886
2018-11-15 23:14:32 +00:00
Bartosz Dziewoński 1421878eee Separate parameter aliases in the description table with spaces
This allows them to wrap over multiple lines if necessary, greatly
improving the result for templates with ridiculous number of aliases,
like <https://en.wikipedia.org/wiki/Template:Cite_book/TemplateData>.

Change-Id: I5826ac31b83e81f89f85e87f9098570b3759ccfb
2018-11-15 23:08:18 +00:00
Translation updater bot d9174e7052 Localisation updates from https://translatewiki.net.
Change-Id: Ifb58d24d967a12f3921641bb6bc42f7ae09aa343
2018-11-15 23:00:28 +01:00
Ed Sanders 34924e0a0b Remove VETarget, use textSelection API
The textSelection API works with VE wikitext mode , so we
can use the same code for both editors.

Change-Id: I9032733b14d115bad8dcadefc50e791cf30eed7d
2018-11-14 14:53:42 +00:00
Translation updater bot d30c1be1f2 Localisation updates from https://translatewiki.net.
Change-Id: I7f3821e8da04e396c19cf4bdcc04d115108cae05
2018-11-12 22:12:56 +01:00
Translation updater bot bb3a30f02c Localisation updates from https://translatewiki.net.
Change-Id: I732a074f22b0db11dfbf43978684fe668f9781f8
2018-11-11 22:33:54 +01:00
Translation updater bot 2cd9625494 Localisation updates from https://translatewiki.net.
Change-Id: I974bb4bdb583d2d34bcb39374e995741ba1a1b96
2018-11-10 22:28:28 +01:00
Translation updater bot 57b6fb03fa Localisation updates from https://translatewiki.net.
Change-Id: I57cd5fa289aae5b39da3e7aae4be477796cf4725
2018-11-04 22:42:43 +01:00
Translation updater bot 91cf82c038 Localisation updates from https://translatewiki.net.
Change-Id: I9d5bc27234327af4863e81bf4bf9d728ecefa61f
2018-11-03 11:03:27 +01:00
Bjornskjald 096d558272
Add stripping leading and trailing spaces from the "format" field
Bug: T177973
Change-Id: I5fc30479485da59b5ea097f97a2dfb7ec149918f
2018-11-01 22:55:40 +01:00
Translation updater bot 8d95685c11 Localisation updates from https://translatewiki.net.
Change-Id: I11ae21d24aa0b1c7275b8fde64ba349bdd771591
2018-11-01 22:23:29 +01:00
jenkins-bot 593d23fd36 Merge "Don't store templatedata pageprop on doc-subpage" 2018-10-31 15:21:49 +00:00
Umherirrender bce29bdc6e Start showing warning for deprecated PHP entry point
Change-Id: I43d7febac9ae620d739dd494a87aba2a7010801c
2018-10-26 22:00:05 +02:00
Translation updater bot 66c5185896 Localisation updates from https://translatewiki.net.
Change-Id: I32967ebfaa1cb8c89e04383707163cbf8a3eb012
2018-10-23 22:09:06 +02:00
Translation updater bot af1bb1bffd Localisation updates from https://translatewiki.net.
Change-Id: I38a79e7ff46b15bbebdeb32c60ccbab61c21c323
2018-10-18 22:34:31 +02:00
Timo Tijhof 73aed63e0a ApiTemplateData: Address non-array count() warning on PHP 7.2
The $data value here comes from TemplateDataBlob which is always
an instance of stdClass. It has no items that make sense to count,
and the object was already being used as $data->params a few lines
higher, which means this count operation would always yield "1",
by proxy of count() effectively seeing the non-array as an array
containing the one non-array item.

Bug: T202087
Change-Id: If725aa8b4229613bf60290eb78654a42497056c8
2018-10-14 03:54:24 +01:00
Timo Tijhof 777ddee3aa ApiTemplateData: Use strict check for $langCode
This is assigned as boolean false or any string value.
The previous code used in implicit boolean cast to differentiate,
but the check is insufficient given that "" and "0" would also
cast to false. It is not the responsibility of this code to filter
those out.

Change-Id: I2cc707432b93703b29c49ac17d737f34119fc400
2018-10-14 03:52:55 +01:00
Timo Tijhof 29162276eb ApiTemplateData: Remove needless count() call
These variables always hold arrays, and to assert an array being
non-empty, boolean evaluation is reliable and suffices.

Change-Id: I5173f9d38ff52807a8025897115823d093052ecf
2018-10-14 03:51:38 +01:00
Umherirrender 8d0a3ea30c Update namespace for MediaWiki\Revision\RevisionRecord
Follow-Up: I16bea8927566a3c73c07e4f4afb3537e05aa04a5
Change-Id: Iae4f59a54a0fb65058ef43f51c5c819646935ac7
2018-10-11 19:56:27 +02:00
libraryupgrader b27e61ec3b build: Updating npm dependencies for security issues
* Updated grunt-contrib-watch to 1.1.0, addressing:
  * https://npmjs.com/advisories/534
  * CVE-2017-16137
  * https://npmjs.com/advisories/577
  * CVE-2018-3721
* Updated grunt to 1.0.3, addressing:
  * https://npmjs.com/advisories/577
  * CVE-2018-3721

Change-Id: Ic7cc2041d63519835b3c569989a7c7c43738fb08
2018-10-11 11:15:00 +00:00
Timo Tijhof 326558fc77 Don't store templatedata pageprop on doc-subpage
This resolves two issues:
* Database inefficiency (T52512).
* Doc pages showing on Special:PageWithProp.

It also makes progress on (but doesn't fully resolve) T54448,
by not outputting encouraging accidental use of "/doc" by
displaying descriptions and parameter documentations for them
below the suggestions in VisualEditor.

Bug: T52512
Bug: T54448
Change-Id: I99323d7adc5fc072a85ff1d3595f805f537bbb43
2018-10-09 17:46:21 +00:00
Translation updater bot f957ec42c2 Localisation updates from https://translatewiki.net.
Change-Id: I2672ac1a6d6b1f6b348eee66d727efa7d83c9bd8
2018-10-06 22:35:37 +02:00
Bartosz Dziewoński 9695c4fbb2 TemplateDataBlobTest: Ensure identical results on PHP 7.1
The implementation of mt_srand()/mt_rand() was changed in PHP 7.1 to
a better one. Pass MT_RAND_PHP to get the old implementation.
http://php.net/manual/en/function.mt-rand.php#refsect1-function.mt-rand-changelog

Bug: T206287
Change-Id: Ia2f79f2364583f7ee8f145519ae4ae1b7210c450
2018-10-05 11:08:01 -07:00
Translation updater bot 7bc74cd753 Localisation updates from https://translatewiki.net.
Change-Id: I938843fef0d690d5783faac25e079476b51dce6f
2018-10-03 18:53:52 +02:00
jenkins-bot 49f1201621 Merge "Remove empty Default, Example and Auto value sections of the output table" 2018-09-28 16:08:34 +00:00
Agabi10 348edb68d2 Remove empty Default, Example and Auto value sections of the output table
Bug: T125333
Change-Id: I1f7135cdf22c04aaa31744096900fd7ea65f9a37
2018-09-28 15:24:14 +00:00
Translation updater bot bd25695345 Localisation updates from https://translatewiki.net.
Change-Id: I7741bc1d1dd6bf2fbc44907d1268fa4311623a49
2018-09-24 09:18:23 +02:00
Translation updater bot 056dd63e4b Localisation updates from https://translatewiki.net.
Change-Id: Ia127d9a0926854c8410aaad261ae69de003a8cf3
2018-09-20 09:59:28 +02:00
Translation updater bot 26562ce9f3 Localisation updates from https://translatewiki.net.
Change-Id: I03ff1e717f63a80552061a492bb366c7e796e771
2018-09-15 09:54:42 +02:00
Volker E e06b2b1686 Replace deprecated 'advanced' by renamed to 'settings' icon
One more, after my comment in I997bc0f8c7d99f73c1cc6b4ce46f6bcdc1eee410
got happily ignored.

Bug: T190581
Change-Id: I26dc9018693ffd4c5edcda021c8adce52325cdc9
2018-09-12 12:49:10 -07:00
jenkins-bot 5ac1f53bde Merge "Replace deprecated 'advanced' by renamed to 'settings' icon" 2018-09-12 16:23:48 +00:00
Sam Wilson 79e5347d90 Prevent leading hash from starting param names when guessing
Parameter names can be constructed with parser functions, so
we should not include these as raw parameter names. There
might be more characters to add here.

Bug: T203605
Change-Id: If57a9ed7edf1e881cd121d9a1bcb2e7455c04ec9
2018-09-12 10:04:45 +08:00
Translation updater bot e01b0bcea7 Localisation updates from https://translatewiki.net.
Change-Id: I4eb8a2e62c626672466a0cfb7907b3f9d65c4561
2018-09-11 10:24:37 +02:00
jenkins-bot 6d438766c8 Merge "Fix problems with MediaWiki messages and non-displaying icons" 2018-09-09 10:41:50 +00:00
libraryupgrader 4e6bb25ee5 build: Updating mediawiki/phan-taint-check-plugin to 1.5.0
Change-Id: Ib222506ee35adb813b235b810740b86c2b4c3293
2018-09-08 06:09:26 +00:00
Volker E 7da7b90b58 Replace deprecated 'advanced' by renamed to 'settings' icon
Bug: T190581
Change-Id: If509219d1b6404c66f2a3c942623e315f9b02e34
2018-09-07 20:05:46 -07:00
Translation updater bot 23c8c4f345 Localisation updates from https://translatewiki.net.
Change-Id: Ia35faa27a7b4c5e258b3b20d60c533ebea41a3d2
2018-09-07 09:03:03 +02:00
libraryupgrader c687f605b8 build: Updating mediawiki/mediawiki-codesniffer to 22.0.0
Change-Id: I3c23b66413da111bc55f9be1ddcf26eb2d16302b
2018-09-03 19:51:00 +00:00
Saint Johann c608d204c1 Fix problems with MediaWiki messages and non-displaying icons
Bug: T160252
Change-Id: I997bc0f8c7d99f73c1cc6b4ce46f6bcdc1eee410
2018-09-03 17:14:16 +02:00
jenkins-bot bb0ea17413 Merge "Do not display editor on non-wikitext pages" 2018-09-03 15:06:53 +00:00
Translation updater bot ad5c1f4a73 Localisation updates from https://translatewiki.net.
Change-Id: Ie451c7bac78d863b3d477799b93e29d11be64971
2018-09-01 22:33:44 +02:00
libraryupgrader 23066fc0f4 build: Updating mediawiki/phan-taint-check-plugin to 1.4.0
Change-Id: Ib0a4420c9be803e1b513fb5bb05ef6439049c445
2018-09-01 14:40:59 +00:00
Seb35 db1fb276a0 Do not display editor on non-wikitext pages
The editor is displayed on 'Sanitized CSS' pages (template pages
ending with .css), it should not because it is not interpreted as
wikitext and tags are not recognised.

Change-Id: I58195de1ae54252d57e1cd912ee52801a093729e
2018-09-01 13:03:49 +02:00
jenkins-bot 783e99618a Merge "Use Parser::stripOuterParagraph" 2018-08-31 06:43:45 +00:00