Commit graph

1698 commits

Author SHA1 Message Date
Aryeh Gregor 6905775132 Make default values fall through in switch
Bug 19093.  Previously {{#switch:foo|bar|#default=baz}} would behave
differently from {{#switch:foo|#default|bar=baz}}, even though they'd
behave identically if "#default" was replaced by "foo".

I changed switchObj but not switchHook.  In testing, switchObj was the
only method that seemed to be used, and I didn't want to make untested
changes to switchHook, so if that's used, the behavior may remain in
some cases.  It seems like code is duplicated between them -- whatever
the difference is, that should probably be factored out.

This passes all existing parser tests for #switch, of which there are
none, so don't blame me if it breaks something.  ;)
2009-06-05 16:53:59 +00:00
Aryeh Gregor 08bcb1bdc7 Style: "else { if" -> "elseif" 2009-06-05 16:31:43 +00:00
Tim Starling 5d97108615 * Disabled string functions by default with a configuration variable. Outlined my case for doing so.
* Defer loading the bulk of the code until a parser function is actually called. Necessary due to the recent large increase in code size. 
* Fixed the total disregard for parser state and object-oriented data flow in ExtParserFunctions::loadRegex().
2009-06-05 09:53:05 +00:00
Robert Rohde 7840d735cf (Bug 19078) Restore #pos default behavior unintentionally changed in r50997 2009-06-05 00:06:06 +00:00
Siebrand Mazeland c38a0f9a51 Localisation updates for extension messages from translatewiki.net (2009-06-02 20:45 UTC) 2009-06-02 20:59:07 +00:00
Katie Filbert 6d969b56e7 fix spelling in code comments for r50997 2009-06-01 00:51:49 +00:00
Siebrand Mazeland 5104b20993 Localisation updates for extension messages from translatewiki.net (2009-05-31 21:03 UTC) 2009-05-31 21:32:44 +00:00
Siebrand Mazeland 7da7e7d2ef Follow up to r51082 from CR. Message is supposed to be in the content language. 2009-05-28 20:05:10 +00:00
Siebrand Mazeland 656e3a97ef Localisation updates for extension messages from translatewiki.net (2009-05-27 22:45 UTC) 2009-05-27 23:08:39 +00:00
Siebrand Mazeland 78253a7e4e Support PLURAL for pfunc_string_too_long. Is that escape really needed - it's a number? 2009-05-27 18:44:30 +00:00
Raimond Spekking 4fffd5e8d7 Localisation updates for extension messages from translatewiki.net (2009-05-26 20:45 UTC) 2009-05-26 20:58:15 +00:00
Rotem Liss 2bbd281140 Localization update for he. 2009-05-26 17:08:52 +00:00
Robert Rohde a697525576 (Bug 6455) Add string function support to ParserFunctions 2009-05-26 00:43:34 +00:00
Alexandre Emsenhuber f7243b62ee Localisation updates for extension messages from translatewiki.net (2009-05-15 20:05 UTC) 2009-05-15 20:53:05 +00:00
Tim Starling 645e6149a8 * Fix for PHP 5.3: use the timezone parameter to DateTime::__construct() instead of applying setTimeZone() afterwards. This avoids an exception being thrown when the timezone is not set in php.ini.
* Tweaked formatting
2009-05-12 06:56:04 +00:00
Raimond Spekking 1071259ce6 Localisation updates for extension messages from translatewiki.net (2009-05-06 19:30 UTC) 2009-05-06 19:50:29 +00:00
Shinjiman e5eeec681f * (bug 18242) Show the Subversion revision number per extensions in Special:Version (currently applied on some extensions to get the entries file) 2009-04-26 05:22:33 +00:00
Philip Tzou 680d39e1e6 Allowed to find variant link when use #ifexist. 2009-04-25 03:46:10 +00:00
Siebrand Mazeland 6902aa5db0 Localisation updates for extension messages from translatewiki.net (2009-04-20 09:59 UTC) 2009-04-20 10:15:38 +00:00
Raimond Spekking 6b9cf45a6d Localisation updates for extension messages from translatewiki.net (2009-04-16 19:52 UTC) 2009-04-16 20:09:07 +00:00
Raimond Spekking e8e9880018 Localisation updates for extension messages from translatewiki.net (2009-04-12 18:56 UTC) 2009-04-12 19:43:10 +00:00
Raimond Spekking c407f9a833 Localisation updates for extension messages from translatewiki.net (2009-04-06 18:50 UTC) 2009-04-06 19:16:07 +00:00
Alexandre Emsenhuber cbbb61714e svn:eol-style native 2009-04-01 16:36:50 +00:00
Chad Horohoe 3d92b8ed14 Basic README. If compat with StringFunctions were to become an issue, you could put a note about that here ;-) 2009-03-30 15:39:31 +00:00
Siebrand Mazeland a99543ea37 Localisation updates for extension messages from translatewiki.net (2009-03-23 18:54 UTC) 2009-03-23 19:15:02 +00:00
Siebrand Mazeland 794b23f1c8 Localisation updates for extension messages from translatewiki.net (2009-03-05 23:24 UTC) 2009-03-05 23:41:28 +00:00
Siebrand Mazeland 93db5ace50 Localisation updates for extension messages from translatewiki.net (2009-02-19 21:36 UTC) 2009-02-19 22:12:31 +00:00
Andrew Garrett e7bb4501f4 Revert Expr.php to r40762 for now -- still some errors that need tracking down and fixing. 2009-02-18 05:57:38 +00:00
Andrew Garrett baaf9def26 Fix division by zero handling for BC -- 0 != "0.00" 2009-02-18 05:36:55 +00:00
Brion Vibber 47042d2584 fix regression -- bc compat check was reversed; attempting to call bcpow() when no bc :) 2009-02-18 05:23:56 +00:00
Andrew Garrett 5a331c7c28 Handle precision=0 correctly in bcround (it's the default anyway!) 2009-02-18 05:12:01 +00:00
Siebrand Mazeland a5f70ba2fb Localisation updates for extension messages from translatewiki.net (2009-02-17 21:00 UTC) 2009-02-17 21:23:38 +00:00
Raimond Spekking 5db0d1728c Localisation updates for extension messages from translatewiki.net (2009-02-16 17:30 UTC) 2009-02-16 18:44:29 +00:00
Roan Kattouw 3c6bd5a6ec ParserFunctions: Fix undefined variable warnings introduced in r47205 2009-02-16 10:08:31 +00:00
Alexandre Emsenhuber e2eb7eb6e3 svn:eol-style native 2009-02-14 14:45:49 +00:00
Siebrand Mazeland 432bef232b Localisation updates for extension messages from translatewiki.net (2009-02-14 11:51 UTC) 2009-02-14 12:03:26 +00:00
Andrew Garrett 67ad2159a1 Fix handling of 0, 0.0, 0.00 etc in logical functions. 2009-02-13 00:28:40 +00:00
Andrew Garrett 29f573fe22 Per Simetrical on code review, fix confused implementation of log (just convert to doubles and use the inaccurate floating-point math for now), and move initialisation to doExpression, instead of haveBC. 2009-02-12 23:49:30 +00:00
Andrew Garrett d9fd747f2d Revert "Adds explicit round-off checking to operations that are sensitive to floating point vs. integer round-off errors.", et al. ( r46683, r46671 )
Reimplement, but better! Use BC Math library where possible, for fixed-point math operations. The tolerance aspect has been included by doing math internally at 16 digits, but discarding the last two digits for the purpose of comparison.
2009-02-12 22:29:32 +00:00
Siebrand Mazeland 29fcf23a4c Localisation updates for extension messages from translatewiki.net (2009-02-10 23:29 UTC) 2009-02-10 23:48:58 +00:00
Siebrand Mazeland 27b4bb6801 Localisation updates for extension messages from translatewiki.net (2009-02-08 22:48 UTC) 2009-02-08 23:02:36 +00:00
Siebrand Mazeland 216996cc90 Gotta love having to type that language code every time. 2009-02-08 14:30:28 +00:00
Philip Tzou fedec8161a New translations of Chinese for ParserFunctions extension. 2009-02-08 14:15:03 +00:00
Andrew Garrett 54de74c0ef Fix glaring fatal. 2009-02-06 21:18:32 +00:00
Rotem Liss 0d727facf3 ParserFunctions localized for yi:. 2009-02-02 17:45:44 +00:00
Robert Rohde a0fdcf7415 Adds explicit fractional tolerance checks to comparison functions. Currently set to 1e-10.
Addresses concerns related to r46671.
2009-02-01 18:40:26 +00:00
Robert Rohde 8f6382337c Adds explicit round-off checking to operations that are sensitive to floating point vs. integer round-off errors.
Where applied, it assumes that any floating point number that is an integer to within one part in 10^10 should be replaced with that integer.
2009-02-01 03:56:24 +00:00
Siebrand Mazeland de9b42156f Localisation updates for extension messages from Betawiki (2009-01-29 21:14 UTC) 2009-01-29 21:36:03 +00:00
Siebrand Mazeland 1dee070c01 Localisation updates for extension messages from Betawiki (2009-01-25 23:00 UTC) 2009-01-25 23:10:35 +00:00
Raimond Spekking a50ed0fb9e Localisation updates for extension messages used by WMF from Betawiki 2009-01-15 16:45:03 +00:00