Commit graph

66 commits

Author SHA1 Message Date
Alexandre Emsenhuber
660d7cc650 Removed some error suppression operators 2010-11-08 10:22:54 +00:00
Platonides
3b8b3fd067 Move the math option inside ParserOptions instead of having Math.php directly sneaking into $wgUser.
Throw an exception if trying to use the DateFormat ParserOption and the UseDynamicDates option is not set.
2010-08-05 15:24:36 +00:00
Tim Starling
83d1a3e51a Run texvc via wfShellExec(), so that execution time is limited. 2010-06-25 10:58:29 +00:00
Mark A. Hershberger
edc744dcd9 * remove function_exists calls for things that functions that always
exist under supported versions of PHP
** assert() is always defined for DifferenceEngine()
** mail() is always defined for UserMailer()
** is_executable() is defined for Windows from PHP 5.0.0 on
2010-05-19 05:33:27 +00:00
Platonides
77dc8fe893 Bug 23190#c7 Mark tex text as class="tex". 2010-04-17 15:31:58 +00:00
Platonides
4a90c54c82 Replace the new lines in plain math with spaces.
This avoids interactions with the parser taking those new lines into account for the wikitext.
Fixes bug 22818 and bug 23190.
2010-04-14 21:22:38 +00:00
Platonides
634b81f8d0 Follow-up r63213. Move it to wfEscapeShellArg, which is the proper place. 2010-03-03 18:22:26 +00:00
Platonides
0f13a6f10b Escape the caret under Windows, since that's a special character for cmd shell.
Bug 13518 -  <math> does not work (wrong shell escaping under Windows)
2010-03-03 18:18:15 +00:00
Chad Horohoe
786d42ba36 $fname -> __METHOD__ 2010-01-08 01:39:14 +00:00
Chad Horohoe
a4e5e935b6 Mass convert NULL -> null. Left strings and comments alone, obviously. 2009-12-11 21:07:27 +00:00
Jure Kajzer
251527d2c1 * Added 5th parameter to texvc call (can be null and defaults to rgb '1.0 1.0 1.0').
This parameter controls texvc background color. Can be set to output transparent background
* Added $wgTexvcBackgroundColor parameter to DefaultSettings with value 'rgb 1.0 1.0 1.0'
* Changed Math.php to call texvc with new parameter
2009-11-30 18:42:16 +00:00
Brion Vibber
3a70821dab Clean up a live hack from wmf-deployment r53208: option to short-circuit math path and file existence checks.
Adds $wgMathCheckFiles setting:

/**
 * Normally when generating math images, we double-check that the
 * directories we want to write to exist, and that files that have
 * been generated still exist when we need to bring them up again.
 *
 * This lets us give useful error messages in case of permission
 * problems, and automatically rebuild images that have been lost.
 *
 * On a big site with heavy NFS traffic this can be slow and flaky,
 * so sometimes we want to short-circuit it by setting this to false.
 */
$wgMathCheckFiles = true;
2009-09-14 21:58:41 +00:00
Brion Vibber
0c38e6e3c1 fix regression from r43965 -- forgot the .png extension from math URLs, which works on my apache install but not on the live upload server :P 2008-11-26 02:37:07 +00:00
Brion Vibber
59c2243cc3 Follow-up to r43964 (bug 16440)
* Purge newly rendered math images from squids, so any old bad versions get purged out
* Don't save entries that were 0-byte files
2008-11-26 02:28:15 +00:00
Brion Vibber
02fd99793f * (bug 16440) Broken 0-byte math renderings are now deleted and re-rendered when page is re-parsed. 2008-11-26 02:13:40 +00:00
Aaron Schulz
801801f69d Bah, revert to r40753 2008-09-17 12:36:44 +00:00
Aaron Schulz
aad32645ce *Should need to escape twice
*Use single quotes on windows, as it goes to cygwin
2008-09-17 12:31:57 +00:00
Aaron Schulz
6509776069 fix typo 2008-09-12 15:12:13 +00:00
Aaron Schulz
fdedf7c610 Use wfEscapeShellArg() since it works on windows (bug 13518) 2008-09-12 15:10:27 +00:00
Chad Horohoe
11abb78d35 (bug 11475) Remove useless final param in $dbw->replace() call. 2008-09-06 03:15:35 +00:00
Chad Horohoe
e35fb6e1c6 More of the ongoing war against mkdir() in favor of wfMkdirParents() 2008-08-11 15:44:59 +00:00
Alexandre Emsenhuber
087a9f70c5 WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>

Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage

One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Rob Church
776a943cce (bug 11474) Fix unintentional fall-through in math error handling 2007-09-27 17:33:59 +00:00
Brion Vibber
4d3446a8e3 * (bug 10508) Allow HTML attributes on <gallery>
* (bug 1962) Allow HTML attributes on <math>
2007-07-13 17:25:06 +00:00
Aryeh Gregor
a15c419b3d Remove ?>'s from files. They're pointless, and just asking for people to mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) 2007-06-29 01:19:14 +00:00
Greg Sabino Mullane
ac059274ec Have Math.php use encodeBlob and decodeBlob when accessing the binary fields math_inputhash and math_outputhash. Better
long-term solution is to simply store the hexadecimal as text, but converting via updaters.inc will be complex.
Fixes bug # 9909.
2007-06-08 01:06:52 +00:00
Nick Jenkins
f88c771756 The war on redundant ampersand usage!
* Convert "$dbw =& wfGetDB( DB_MASTER );" --> "$dbw = wfGetDB( DB_MASTER );"
* convert "$skin =& $wgUser->getSkin();" --> "$skin = $wgUser->getSkin();"

For the time being have not changed the function definitions of wfGetDB() or User::getSkin() [i.e. they are still both return-by-ref], so as to ensure the interface does not change for extensions [some of which may still be trying to run on PHP4 environments]. However presumably at some point this can be changed too.

Also includes tiny tweak to newlines in parserTests - will show 1 rather than 2 newlines between the "Reading tests from" strings when in quiet mode.
2007-01-22 23:50:42 +00:00
Antoine Musso
c771fc9c96 Use Doxygen @addtogroup instead of phpdoc @package && @subpackage 2007-01-20 15:09:52 +00:00
Antoine Musso
b144fcb85d Rename constructors to __constructor 2007-01-20 13:34:31 +00:00
Antoine Musso
171164f835 Return nothing on empty math tags instead of char encoding 2007-01-06 18:46:08 +00:00
Nick Jenkins
ae8554c45b Completing code housekeeping stuff for rest of includes/ directory: removing unused local vars, removing unused globals, replacing extract() where simple to do, declaring output arrays before calling preg_match(), and so forth. 2006-11-29 11:43:58 +00:00
Antoine Musso
fd912a148b A lot more of static issues when using E_STRICT from the commandline. 2006-07-10 15:41:30 +00:00
Rob Church
048021c14a (bug 672) Add MathAfterTexvc hook 2006-06-26 15:50:03 +00:00
Domas Mituzas
e2ae8925ff AutoLoad Math.php 2006-06-06 10:00:53 +00:00
Brion Vibber
0a26267688 Revert to r14512; domas introduced massive breakage with incomplete experimental changes. They will be recommitted when they work. :) 2006-06-01 08:19:02 +00:00
Domas Mituzas
bda0b8e104 Use AutoLoader to load classes:
* remove require_once() throughout whole code, yet left in few places
* move global functions in HttpUtils, ProxyTools, Credits to class methods
* php5 only: __autoload() now used, combined with class->file map and require()
* move initialization of $wgValidSkinNames to Skin::getSkinNames()
* few more changes that will surely break stuff.
2006-06-01 07:22:49 +00:00
Antoine Musso
b64d8b46c6 Unused call to wfMsg('math_unknown_error') 2006-05-01 10:40:31 +00:00
Brion Vibber
60d5263827 * (bug 3347) strip linebreaks in math error source 2006-02-03 06:36:05 +00:00
Ævar Arnfjörð Bjarmason
a26d5a49d7 * s~\t+$~~ 2006-01-07 13:31:29 +00:00
Ævar Arnfjörð Bjarmason
7bbe971aec * s~ +$~~ 2006-01-07 13:09:30 +00:00
Brion Vibber
9d15c14be4 * (bug 3877) Render math images into temp directory, then move to hashed
subdir so you can render new math images and have them work
2005-11-04 02:33:50 +00:00
Jens Frank
abcffab3c0 Change storage architecture in images/math/.
Old: images/math/434be915b5fe2e0e63cad907f254dfd5.png
New: images/math/4/3/4/434be915b5fe2e0e63cad907f254dfd5.png
2005-11-02 23:14:33 +00:00
Tim Starling
6668f232d7 Generic cygwin hack 2005-06-18 05:09:27 +00:00
Tim Starling
cdb3f96ab8 Various live patches ported from REL1_4 2005-04-12 04:03:21 +00:00
Brion Vibber
ff89c2eddd Fix some variable typos 2004-11-21 08:58:46 +00:00
Tim Starling
412eda0517 Correcting bugs due to double-prefixing table names. Removing obsolete Database member functions. Adding comments to Database.php 2004-10-24 07:10:33 +00:00
Antoine Musso
ba2afcd9fa Split files and classes in different packages for phpdocumentor. I probably changed some double quotes to single and used function foo () { shema 2004-09-03 23:00:01 +00:00
Antoine Musso
90155b8a97 Changing comments layout preparing for generated documentation with Phpdocumentor 2004-09-02 23:28:24 +00:00
Antoine Musso
3d60242fb5 massive double to single quotes conversion. I have not noticed any bug after a lot of testing 2004-08-22 17:24:50 +00:00