Set up both database tables (mathoid and mathlatexm) regardless of the enabled modes. This will allow to change configuration without having to rerun db update scripts for the price of having potentially empty tables in the db.
Bug: T307896
Change-Id: I5ed50e53835c378f9f497a6ff3a4195299259d5b
Extensions using Phan need to be updated simultaneously with core due
to T308443.
Bug: T308718
Depends-On: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
Change-Id: I6d355e7037186e840a76f319886ed870419d9fc8
Adds a new configuration variable that can be used to run RESTBase
independently from Math.
Bug: T306572
Change-Id: Ie40bd36a53fa5018364cf9268fee29533f4aa23b
The global function wfReadOnly() has been deprecated in favor of the
new ReadOnlyMode service. Its usages should be replaced.
Bug: T283978
Change-Id: I8f7c026961a6b65e2e45a675c54f0481ccdf09e0
Old versions of Math returned
<dl>
<dd>iso-8859-1</dd>
</dl>
for empty math tags. This is no longer the case today.
Moreover, a problem in the png2svg conversion was fixed
in mathoid recently Iaf41f61335b4af51f758b64427c6e661ee36fb1b
This version of mathoid is now used in production.
Therefore, we can remove the handling of the special case.
Bug: T10372
Change-Id: Id835f7041a19f9519e7d5640b69a02b4b8a3397e
Instead of modifying a page rendering hash,
use the proper mechanism of parser option
registration. The cache is still split on parser
option value. The 'math' option is lazy, since
not all pages contain 'math' tag and we want to
avoid an user preference lookup for every parse.
WARNING: this will invalidate ParserCache for
all pages that contain <math> tags, but according
to Moritz, this is about 1% of all pages, so we
should be fine.
Setting up the test is still rather hard and weird
due to very hacky rendering mode to user option
converter, and math renderer interaction with the DB.
This will be cleaned up later.
Depends-On: I92b3e18fabef4eecac2ec2a4844f1be2716e5d89
Change-Id: I3bce04684070ad306685dabbc51267def25773cd
This is doing a bulk of the job of creating a service
for working with math modes configuration. There's
still things to do, like moving math mode names,
and perhaps depending on default user options to
provide a bit more convenience, but that will be the
next step.
Change-Id: I1259a93651920f44104f2f5135e3e620c858be8d
Additionally - remove RestbaseInterface::checkBackend.
When HTTP requests are banned from unit tests this method
makes no sence.
MathoidCli tests were not reenabled cause it's a bit hard
to mock shell acceess. Hopefully as part of Shellbox
transition we can have MockShell trait in core and reenable
those tests
Bug: T265628
Depends-On: I350ed59af603a0504704af3265787a4be8f2dc2a
Change-Id: I294d0ed905193850dc38cb3071eb9b31c8863121
The overall aim is to make renderer and checker
proper services and stop storing each operation
state in them. This patch reduces the number of
places where we store the lastError. I've decided
to stop here in the first pass so that the patch
doesn't grow out of proportion.
Change-Id: Ice7e1f9f2f074d62ef1819355a510ce0b0335d88
Instead of having a separate method for getting the post data
in MathLateXML, we can just override getPostData method from
parent and make the makeRequest method signature much simpler.
Change-Id: I07b683856885396ff7b6b5a40df79399828c8214
This is not the job of an extension to be a load balancer.
This feature was already deprecated and is not used in WMF prod.
Change-Id: I950dbaf45bc40d9d9ed61b1c98b339d3d38326fc
This hook is no longer needed by core so it's not
called anymore.
See I5124789fac333a664b73b4b4a1e801ecc0a618ca
Change-Id: I9a554b4e70a2564834e1df4058b1ad5cb98a56e3
Note that this changes the URL, which is directly shown to the user
(SpecialMathWikibase::buildPageRepresentation() uses it as the link
text). I think that’s okay (though it would probably be nicer to use
only the item ID as the text).
Bug: T286539
Change-Id: I50c49040846a5e08e5a354641fff35598034ceb9
User::setOption() is deprecated and should be replaced with UserOptionsManager::setOption()
Bug: T277818
Change-Id: I8bfcf9e732b6067d5461792d78c8b41ac31de3a9
* Reenable math validator tests
* Introduce $wgMathUseRestBase which defaults to true
and determines if mathoid is used via RESTbase or directly
* The effect of this change can be tested by setting $wgMathUseRestBase
to false, and then creating a new statement of a property with type math.
One should see a connection to mathoid for every new string and one should
also see the WAN cache for the check endpoint to fill up. Note that
setting WANObject cache to the database simplifies the investigation
of the WAN cache content.
Bug: T274436
Change-Id: I40109e9e09464da78bf855646fb800ee87c1ea67
This additional hook does not seem to be needed.
- wgMathValidModes: All access to this information already uses
getValidModes() and thus there is no need to write this back
to the input variable (use outside the extension is not supported
and it is already not used as cache either).
- wgMathDisableTexFilter: All access already uses getDisableTexFilter()
Move the last bit of logic there instead.
- wgDefaultUserOptions: Duplicate of this already exists in the
onGetPreferences hook higher up.
This seems almost too easy, so I suspect someone tried this before
and intentionally didn't finish it because of some non-obvious
issue.
See T189966 for related perf anaysis.
Change-Id: I4d7fdf6fcae3d44a37bf80d9c72fff2b4361f0c9
* Keep status code and response in memory
* Allow external cache preloading.
This will be required for the one-stop mathoid batch rendering
* Duplicate functionality from the restBASE interface
** Error rendering
** Validity checks
** getter for validated tex
Depends-On: Ic779e671ada0d0306e0935e578b47c431abd520e
Change-Id: I066975b9ba03f5861f6c92687cba4743044ea82a