Commit graph

34 commits

Author SHA1 Message Date
Kunal Mehta e8cfa46f87 Use OOUI instead of jquery.ui for error popup
Use OOUI's PopupWidget to display error tracebacks/details instead of a
deprecated jquery.ui dialog.

Bug: T319361
Change-Id: Ie7796c853782de9874595674fe250f6702db717e
2022-10-08 20:33:27 +00:00
Reedy 13e82702ab Add global alias for Scribunto_LuaEngine
Change-Id: I8a53a0583f25b397fec25ba77c8a061426c8a641
2022-09-30 02:07:29 +00:00
Reedy 408f4d0bc6 Namespace tests
Change-Id: I4977bf534400643f83ab3400c3dfd736c53f9705
2022-09-30 00:59:00 +00:00
Reedy 1eecdac6de Capitalise Engines folder
Change-Id: I6d730d67decc859fd130fee5ec92b1cfb8d9ef64
2022-09-30 00:58:27 +00:00
Reedy 073a365759 "Namespace LuaCommon" take 2
Revert "Revert "Namespace LuaCommon""

This reverts commit 18d122b60d.

Change-Id: I74fd43f7920c8772e9078f745ac6062d5461a7f1
2022-09-30 00:52:27 +00:00
Lucas Werkmeister (WMDE) 18d122b60d Revert "Namespace LuaCommon"
This reverts commit 62e1fb0b5f.

Reason for revert: caused several errors:
* unnamespaced HooksTest collides with core’s class of the same name
* Scribunto_LuaError renamed without class alias despite being used in Wikibase

Bug: T314464
Change-Id: I8b151327236bf86945e59823fba155497e4b3fc6
2022-08-03 10:03:12 +00:00
Reedy 62e1fb0b5f Namespace LuaCommon
Change-Id: Ib6e912e71fb797942aca4b4f22eb0ff9e005a662
2022-08-03 06:03:57 +00:00
Reedy c479ad6f86 Namespace LuaStandalone engine
Change-Id: I7d3f77a56c8b74e0481197224006f19ff4c9d108
2022-08-03 06:03:48 +00:00
Reedy 1628cfa367 Namespace LuaSandbox engine
Change-Id: I485401c202057ae0fea7226ab21e68ce1c7d40c8
2022-07-30 22:51:42 +01:00
Tim Starling a0a0c3ee7e In ScribuntoContentHandler use the new ParserFactory::getInstance()
To avoid an exception when the parser is re-entered.

Bug: T310948
Depends-On: I762b191e978c2d1bbc9f332c9cfa047888ce2e67
Change-Id: I5013ed2a2958c3ff422778f9146f663aff0f5939
2022-07-05 04:31:52 +00:00
Reedy 8e73003fee Start namespacing extension
Change-Id: Ib632434861c2df03dfcddbd195f556c937812196
2022-05-12 01:33:11 +00:00
C. Scott Ananian 0453ef6021 Replace use of deprecated ParserOutput::addTrackingCategory()
Depends-On: I697ce188a912e445a6a748121575548e79aabac6
Change-Id: Ie41ad70f1fb5de202355314a96a1243234fb267c
2021-10-13 21:46:57 -04:00
DannyS712 cd885e83cb Use WikiPage::doUserEditContent() instead of ::doEditContent()
::doUserEditContent() is available since 1.36 as a replacement
for ::doEditContent(), which has been deprecated. Bump the
required version of MediaWiki to 1.36 accordingly.

Results in passing a user where previously the fallback
to $wgUser was being used.

Bug: T255507
Change-Id: I11e4a305e66935ea1d1b4692561fb5d49871a729
2021-06-24 05:58:13 +00:00
C. Scott Ananian e0837cfd46 Don't use deprecated Parser::OutputType()
Depends-On: I0b4d5f170216597afb259cedbb13b8028d284715
Change-Id: I70e0ecb201d5ffdc3ccb75caf552a1dee4ad9e60
2020-04-17 00:47:42 +00:00
Umherirrender 724c38c892 Use MediaWikiServices::getRepoGroup
This required MediaWiki 1.34

Change-Id: Ie7186b0729b54ef9a52b18bb6a2a2696dca6daed
2020-03-16 17:58:49 +00:00
Umherirrender 92587641dc Use MediaWikiServices::getContentLanguage()
This required MediaWiki 1.32

Change-Id: Iff717eba8f4fad1e80229ebcf317ceec81667846
2020-03-16 17:58:26 +00:00
Umherirrender 9c6f6f905a Split all classes in own files
Move autoload entries for test to TestAutoloadClasses key

Change-Id: Ie705db0e7225600b7b498cfa134733a65f1ae1c9
2019-12-21 10:20:18 +01:00
Umherirrender e83bc743ec Split classes in Base.php
Change-Id: Ie29a32aeb10cf23264481d3b0f5fb5096d49b60e
2019-12-18 19:06:57 +00:00
Timo Tijhof 85076760de Remove use of jquery.ui module aliases
Bug: T219604
Change-Id: If38feab0bed047f15a3833811742c5c520ddc3d0
2019-10-19 21:30:38 +01:00
Amir Sarabadani 248dcae392 Split LuaEngineTestBase to LuaEngineUnitTestBase and LuaEngineTestBase
And use the unit test base on most of the tests, except the ones that need
database. This makes tests considerably faster.

Bug: T230701
Change-Id: Ifbede1e2610c672b4d8a83ce41f74200e0c97be9
2019-08-31 10:51:26 +02:00
Reedy 860f0284eb Rescue PHP comments into config descriptions
Change-Id: I46b46558344b2752f27d447c47270b4986923c3c
2019-06-20 23:56:31 +00:00
Reedy e4a59833b7 Update manifest_version to version 2
Change-Id: Ied0149f8d23bbc50d9f84736e44e1079f2b7d7ab
2019-06-20 23:34:10 +00:00
MGChecker 4bc7abb0ac Set "TemplateSandboxEditNamespaces" in extension.json
If TemplateStyles installed, then enable it in the Module namespace
by default. This change is analogous to I96d9601ff80c2d3eb052c01.

Since both extensions use the ContentHandlerDefaultModelFor hook, Scribunto
will check if the sanitized-css model has already been set, and if so, not
override it. If the page is in NS_MODULE, it will set the content model to
Scribunto, but allow further hooks to override it, in which case it is
expected that TemplateStyles would set it to sanitized-css.

Bug: T200914
Depends-On: I2fa9b822ee39bcc5f95a293c8c4aad4d53ede30a
Change-Id: I7a9b445accde35e4a5e7d13100c646f211d21afe
2019-01-15 09:39:30 -08:00
Rafid Aslam f447357856 Move all apihelp translatable messages to separate files
Should be merged along with
I7d78958232089a9c5f4fa340aa6e1b2bf8e2c931

Bug: T189982
Change-Id: If175ec538827056d0ab9a3bdda6370e0fca6508d
2018-11-22 13:28:11 +00:00
Jayprakash12345 7da38c8e10 Update extensions to take advantage of parser test autodiscovery
Bug: T170037
Change-Id: Ifeffbf7a27dfd4915998159617d37d4d9b9a1c17
2018-04-13 15:07:17 +00:00
Kunal Mehta 1fad4da137 Move classes into includes/
Change-Id: Ida2c9cac348fe31ecf8d8c0a352e899bcbff1ebf
2018-04-09 08:54:22 -07:00
Gergő Tisza 2664e63038
Use CodeEditor and SyntaxHighlight when available
There is no reason not to default to using these when they are there.

Bug: T191737
Change-Id: Id1b918a538a45c1279e3e4ad87b2a40f8d41478d
2018-04-09 11:28:34 +02:00
zoranzoki21 e41a3dc368 Removed deprecated position statements from resource loader module
Bug: T184257
Change-Id: I2b5941d2dcee3a998b3c1ece7dd4a6b36cc1e9c9
2018-02-03 17:23:40 +01:00
Jayprakash12345 0f285d0516 Use SPDX 3.0 license identifier
Bug: T183858
Change-Id: I405b1e6744dac319c1fb519a85e8a7a92978cd9a
2018-01-29 06:00:10 +00:00
Kunal Mehta 76dbe5d804 Treat phpdbg as being run from the command-line
The two lualib/ustring generation scripts run independently of MediaWiki, so
the new wfIsCLI() isn't usable there.

Bug: T184043
Change-Id: I217657d12e16a7b76dc814be5fed03540c461e7c
2018-01-10 19:47:19 +05:30
Kunal Mehta 31820c673a Move tests into tests/phpunit and remove UnitTestsList hook
This takes advantage of extension.json's unit tests autodiscovery
mechanism.

Bug: T142120
Change-Id: Id526f3368fc73ba7e6ef1d793ea70ab05fbd9517
2017-07-07 13:50:39 -07:00
Kunal Mehta ab9ae6efe0 Set "TemplateSandboxEditNamespaces" in extension.json
If TemplateSandbox is installed, then enable it in the Module namespace
by default.

Change-Id: I96d9601ff80c2d3eb052c0150fe4392bef5a93a9
Depends-On: Ia5d34cb78fa6af337b373731ab1afc0539db4f52
2017-07-03 15:40:17 -07:00
Kunal Mehta 11cf41c74c Automatically detect if luasandbox is installed
This makes it easier for people to use luasandbox and brings it in line
with how we currently take advantage of other PHP extensions if they're
available (e.g. wikidiff2). People can still explicitly use
luastandalone if they want to.

Bug: T128144
Change-Id: I585019be4dfeb0e2614d91dc3fb7eac0a3bd4bab
2017-06-29 18:24:11 +00:00
Kunal Mehta 246df8d427 Convert to use extension.json
The CanonicalNamespaces hook is no longer necessary as extension.json
handles it automatically, and was removed.

This sets the minimum requirement to MediaWiki 1.30.

Bug: T87969
Change-Id: Id00a2a00bddf72f5c8716f21226695456b3a32c6
2017-06-27 10:48:02 -07:00