Commit graph

2568 commits

Author SHA1 Message Date
Matthew Flaschen aa8a0eaf19 Write cache unless there *is* a cache hit:
Moves writeCache call back to hooks (changed in 9ba4ef269d)
 and makes it unconditional, so only one part of the code decides
whether to write to the cache.

Bug: 45973
Change-Id: I6b387795304ff15c960fcf0f5354a9ac939e1212
2013-03-12 00:38:45 -04:00
Matthew Flaschen 3916ac167c Revert "(Bug 45973) Fix check for avoiding re-cache"
Revert unreviewed self-merge with pending issues.

This reverts commit f5422cf85a.

Change-Id: I17471e2adccf54b79a9d8185c4a6f4b6937ce622
2013-03-12 00:24:43 -04:00
Ori Livneh f5422cf85a (Bug 45973) Fix check for avoiding re-cache
If the request could not be served from the cache, we *do* want to cache it.

Change-Id: Id58dac55ce79f568e4b4a42a155235af5a46bf7f
2013-03-12 04:16:21 +00:00
Translation updater bot 20af9faba6 Localisation updates from http://translatewiki.net.
Change-Id: I8a8017dd81d6afbe4b160d380843973e0139834f
2013-02-24 20:39:47 +00:00
Translation updater bot 9320742fce Localisation updates from http://translatewiki.net.
Change-Id: I209506266dfee0d80e213c1542130e6b81e00399
2013-02-22 20:12:04 +00:00
Ori Livneh 9ba4ef269d Only update the cache on cache miss
Change I9b1d68c4faa8d177d8d0088fa1a5879caed4f1fe added an indiscriminant call
to writeCache(). I assume that it was supposed to be regulated by the check for
$this->isRecall() (which is a getter for '$this->recall'), but there was no
concomitant change to ensure that recall is set true on cache hits.

My fix does not set recall to true. The style of "pass-by-attribute" is tricky
and should be factored out by a subsequent change. This change moves the call
to writeCache() so that it is only called on cache miss.

Change-Id: I9b690e55001859c97fd40330272791d49ec6de75
2013-02-21 17:39:17 -08:00
Ori Livneh 7831957091 Add unit tests, demonstrating how to stub out deps.
Physikerwelt asked for some guidance on how to write good unit tests for
classes that depend on external resources. I wrote a few to serve as examples
for additional tests. Because they have an ulterior didactic purpose, the
comments are a bit more verbose than I would otherwise like, but despite that
the tests are good enough to merit being merged.

Change-Id: Ifa97eec1a68fb68b4744d1e5b192b410afe5ef68
2013-02-17 20:55:47 -08:00
Moritz Schubortz c869831f45 Add and register PHP unit tests for MathSource class
This change adds test cases for the MathSource class and registers a
hook for loading these tests. Also adds documentation about how to run
these tests in README.

Change-Id: Ie58a273326e0353dfa4437b3de21a2393adb5a87
2013-02-17 20:23:50 +00:00
Daniel Friesen 48b029fbe9 Fix MathRenderer::renderMath.
The call to getRenderer is supposed to be a static method in the same class,
not a global function.

Change-Id: I5d101574b1d67238c6357e154209f2595cb36859
2013-02-17 10:32:09 +01:00
Matthew Flaschen 8a04254e6d Change default LockManager back to nullLockManager.
* This was changed in 926db7c3bd as a workaround for a testing issue.
* See 8cbd679aac781bdd73038064261736a937645fc1 , which fixes the test harness in core .

Change-Id: Ib57cafee35a699ce875ee4bc8951781e1a37553a
2013-02-08 13:59:26 -05:00
Physikerwelt 926db7c3bd Restructuring Math classes
The Math.body file which contains the MathRender class was split in the following way:
- Math.base contains the base class with the database related stuff and provides an abstract interface
- Math.source and Math.MathJax handle the plain tex string output. There are two classes since they
  will differntiate in the future I think.
- Math.texvc contains the "old" implementation of png generation with all the file handling related stuff
- Other implementation of math renderer can be added in the same style.
- Cleanup to better follow coding conventions.
- Changed LockManager to 'fsLockManager'

The first attempt restructure the class layout and introduce LaTeXML at the same
time was dropped. Instead this was split up into two phases.
This commit only deals about the restructuring of the math module design.

Change-Id: I9b1d68c4faa8d177d8d0088fa1a5879caed4f1fe
2013-02-07 20:35:45 -08:00
Timo Tijhof c14159404f JSHint: Equality, unused arguments and other minor remnants.
After this jshint passes.

Change-Id: Iee640a1d485ac23caaa783b0069ce9f1616db9ad
2013-02-06 20:20:14 -08:00
Timo Tijhof 282960c4ba JSHint: Fix var statement and global scope issues.
Change-Id: Ia567d10b72f86963eb344cd5579738532531d3d9
2013-02-06 20:14:02 -08:00
Timo Tijhof 8a29221a83 JSHint: Fix curly braces.
Change-Id: Ib59ab38b2c3d9270d882798242e796b823206a50
2013-02-06 20:08:22 -08:00
Antoine Musso ca6a896cb0 JSHint: Fix quotmark and semicolon warnings.
Change-Id: I2ab9e7ce308fd47336f86d2571e8450347321f10
2013-02-06 20:02:47 -08:00
jenkins-bot 33c30a0d6c Merge "JSHint: Add .jshintrc" 2013-02-07 03:54:57 +00:00
Antoine Musso b13ec348ac JSHint: Add .jshintrc
Based on settings from MediaWiki core.

Change-Id: I71345f6906d430fcca750c995a689f785831e3f8
2013-02-06 19:54:07 -08:00
Translation updater bot a10ba58bc8 Localisation updates from http://translatewiki.net.
Change-Id: I47597423a9fd654cf999e7b9e7db29eb2ce7d21a
2013-01-29 21:02:36 +00:00
Translation updater bot 394275be20 Localisation updates from http://translatewiki.net.
Change-Id: I43d0cf6b012936f76379b87cd2834255e6394d19
2013-01-27 18:53:37 +00:00
Translation updater bot f9de81a9da Localisation updates from http://translatewiki.net.
Change-Id: Idb8014be033c9cf376ae8cec3c2fc0ad1878867f
2013-01-27 17:48:22 +00:00
Translation updater bot 3044599afe Localisation updates from http://translatewiki.net.
Change-Id: Ie9a3d11ff06a6852fb0f560de0a04c401a576c26
2013-01-22 20:50:00 +00:00
Antoine Musso b029a4037e JSHint: ignore modules/MathJax
modules/MathJax is a third party library, we do not want to report
JSHint errors for it. Any errors there should be committed upstream.

Change-Id: I48a73eacb635149141e554853bf4aef65ecdcd49
2013-01-18 12:22:28 +01:00
Translation updater bot 766d548df9 Localisation updates from http://translatewiki.net.
Change-Id: Ic1a1c5e39aafb630c5d2d2478e39e869a3a7fc9b
2013-01-06 20:12:18 +00:00
Ori.livneh 33ee76cdae Merge "Rename Math.body to MathRenderer to be consistent with the class name. Reson: Further classes will be added in the next step." 2013-01-02 04:25:39 +00:00
Translation updater bot 3318be4b31 Localisation updates from http://translatewiki.net.
Change-Id: I97a3f906e57f5a06ff20040d197148c3d25daee7
2013-01-01 20:24:00 +00:00
physikerwelt 7ff47f898f Rename Math.body to MathRenderer to be consistent with the class name.
Reson: Further classes will be added in the next step.

Change-Id: I9dba8c1fca11cbc51fa11edebabde4687d17e312
2013-01-01 17:16:35 +01:00
Translation updater bot 075abb7b1e Localisation updates from http://translatewiki.net.
Change-Id: I67f28a8026b7b9844ad1b3b39dafaa0f97f54419
2012-12-27 21:23:09 +00:00
Translation updater bot 02f89f6ac0 Localisation updates from http://translatewiki.net.
Change-Id: I76b50906fafff8511ba070b8c14e502aacbe8be6
2012-12-09 20:27:54 +00:00
Translation updater bot 62a0074461 Localisation updates from http://translatewiki.net.
Change-Id: I750d911086f7b626f51b48dc66d3bcd3d4e8a41e
2012-11-16 20:38:02 +00:00
Translation updater bot 162e9bdfef Localisation updates from http://translatewiki.net.
Change-Id: I673e5fd0462ff3268f62f3ccf7a80a324541e751
2012-11-13 21:09:27 +00:00
Translation updater bot 5dee7e52c3 Localisation updates from http://translatewiki.net.
Change-Id: Icdef993aebf324a0b6354dfe66648459f3011a90
2012-11-11 20:56:22 +00:00
Derk-Jan Hartman 7e58acc95a (bug 36855) escape literal % in tex input
This removes support for MathML % comments, just as with texvc

PS2: Fix for regex lookbehind issue

Change-Id: I0cb026d749733ed3dbba8faacb163be4438fc6bb
2012-11-01 16:22:59 +01:00
Translation updater bot a998a493b0 Localisation updates from http://translatewiki.net.
Change-Id: Ied923fb20ec7550e956d7e804e17222fb2e9b5da
2012-10-28 21:11:42 +00:00
Translation updater bot 47e3cdbfe4 Localisation updates from http://translatewiki.net.
Change-Id: I02d00d05131aa8e23513241cb0fe6a060f2d3fd6
2012-10-22 01:21:46 +00:00
Aaron Schulz b3b28e5892 Fixed file mode setting.
Change-Id: I3d933fbfe2078e6ae9f990df47206bc38ce8f675
2012-10-17 09:27:55 -07:00
Translation updater bot 5bbee223c4 Localisation updates from http://translatewiki.net.
Change-Id: I693cdfd1b538539be1e15d7af89e2cdf269c959f
2012-10-06 21:29:28 +00:00
Siebrand Mazeland 22a09c87d3 Replace remaining wfMsg* call.
Also remove some trailing whitespace.

Change-Id: Ic7a706a894dd07ca638173f2fc6e1695a05f914b
2012-10-04 19:42:13 +02:00
Translation updater bot d4eea42233 Localisation updates from http://translatewiki.net.
Change-Id: I7ec4855c055ffc6b4d13ce16ad237e59ff74e2bb
2012-10-02 13:48:17 +00:00
Translation updater bot 2a9f5a7ece Localisation updates from http://translatewiki.net.
Change-Id: Id5b5b394f913ee38542241e75eff7ea2276c07c4
2012-10-01 20:02:22 +00:00
Translation updater bot 71c9dea4c4 Localisation updates from http://translatewiki.net.
Change-Id: I441401fd1e76b4f5820b44ac179944920cbb95f7
2012-09-26 19:48:05 +00:00
Derk-Jan Hartman dc20c51d91 (bug 38720) Output the Math errors in a consistent language
Outputting as content language now.

Change-Id: I77cc38b2db129e904aaf8ada012da4f4160867fd
2012-09-07 19:43:09 +02:00
Derk-Jan Hartman 25cce43f9f (bug 35556) Allow MathJax to report errors.
Change-Id: Ibed05d3a4a28f7f99bc379f765d633256a8ddc12
2012-09-07 15:40:44 +02:00
Siebrand Mazeland 7b2b7301e0 Maintenance for Math extension.
* Replace deprecated wfMsg* calls with alternatives.
* Add FIXME for occurrence I don't know how to replace.
* Update some docs.
* Sprinkle a few semi-colons over the JavaScript.

Change-Id: I755a95f8bba48a23ef8c432e232adfaef4caae70
2012-08-31 01:25:48 +02:00
Aaron ae9e0d989b Added file backend support via $wgMathFileBackend.
* Also removed old legacy migration code.

Change-Id: I43cfd7f0da49690a2d0b4eb2daab9b8a110137b7
2012-08-22 17:16:49 -07:00
Translation updater bot 29a0a80e8f Localisation updates from http://translatewiki.net.
Change-Id: I4bf24d364416894874077e1570aa2b9f6f9fa02a
2012-08-20 19:20:18 +00:00
Translation updater bot 0f35575e82 Localisation updates from http://translatewiki.net.
Change-Id: If8484d7b9b72e36a85aeca3d3c939b4c6ad5d2b3
2012-08-19 14:47:42 +00:00
Translation updater bot 6dfbd3a80b Localisation updates from http://translatewiki.net.
Change-Id: Ia7cefda210d836b064b68ecd1588919b0458d80a
2012-08-11 00:07:01 +00:00
Translation updater bot 401c957a47 Localisation updates from http://translatewiki.net.
Change-Id: I808a74f9ee23ae94b73b4c39753f9e633e836e28
2012-08-09 19:29:09 +00:00
Translation updater bot d3ac76c332 Localisation updates from http://translatewiki.net.
Change-Id: Icae9812ae1aa76abd253bcb12f1d37e183daf370
2012-08-03 16:19:17 +00:00
awjrichards 2c7ad693fe Merge "Fix Change I6d548d06, redo Change I23407ae6: Add one more space" 2012-07-20 21:43:25 +00:00