Commit graph

71 commits

Author SHA1 Message Date
Siebrand Mazeland 20888253e0 * remove MediaWiki pre-1.8 compatibility and remove SprintfDateCompat.php
* bump version to 1.4.0
* run stylize.php
2010-10-02 22:36:34 +00:00
X! c0835f5836 (bug 22116) Add limit parameter to {{#explode:}}. Patch by Christopher Baker 2010-08-08 16:18:33 +00:00
Max Semenik 1b75afd18d (bug 19940) urldecode dropped during StringFunctions-ParserFunctions merger 2010-05-29 16:12:41 +00:00
Chad Horohoe 7d289782c8 Revert r66934 (Removing wfLoadExtensionMessages() from everything). I disagree on principle...we branch extensions for this very reason. But people want trunk extensions compatible for several versions back, meh. 2010-05-27 15:56:53 +00:00
Chad Horohoe 1813ce38bb Large commit. Removed 800+ references to no-op wfLoadExtensionMessages() 2010-05-26 22:25:32 +00:00
Brion Vibber 49aef28f87 Clean up some old PHP 4-style references passing $parsers around in ParserFunctions. Caused PHP warning output when using some functions on PHP 5.3. 2010-04-16 11:00:07 +00:00
Alexandre Emsenhuber d37e2b09f0 Per Platonides, follow-up r63912: readd the removed line and remove the other one, since it's only used there 2010-03-20 16:39:03 +00:00
Alexandre Emsenhuber c60f90db7b * (bug 12901) #switch no longer expands node twice 2010-03-18 16:25:28 +00:00
Alexandre Emsenhuber 417248832f * (bug 22866) Cast returned value to numeric if possible to do the check since ExprParser::doExpression() returns a string, this was causing some bugs since "-0" (string) converted to boolean is "true" 2010-03-18 11:35:28 +00:00
Tim Starling 2a677438fa Revert r62436 and associated parser test. If you really want to make {{#ifexist:foo}} work the same way as [[File:foo]], which is presumably what bug 14779 is getting at, then you should do a proper job of it, and not introduce your own special #ifexist-specific syntax for specifying files. 2010-02-19 07:32:11 +00:00
Platonides f409f3f252 Follow up r62436 comments.
s/Title::newFromUrl/Title::newFromURL/
All these usages should be reviewed. Make it easy to grep using the canonical form.
Additionally fix the typo.
2010-02-13 23:58:30 +00:00
Platonides 9fbeadd46f (Bug 14779) {{#ifexist}} does not recognise URL encoded filenames
Solution provided by Umherirrender
2010-02-13 15:08:25 +00:00
Platonides 54e735a748 Follow-up r61154. Use StringUtils::escapeRegexReplacement() instead of manually replacing the characters. 2010-01-27 11:25:23 +00:00
Platonides df8dcaad5b Follow up r61149. Using preg_quote on $inReplaceTo replaces too much. However, we need to avoid \1 and $1 backreferences, since there won't be any (the user does no regex search, all parenthesis will be escaped). 2010-01-16 23:52:48 +00:00
Sam Reed 9e6fd9432e (bug 22115) Explode: Subject does not need to be quoted.
Apply supplied patch by Christopher Baker
2010-01-16 21:03:38 +00:00
Tim Starling bce79e84cb When $wgLocaltimezone is null, make #timel match the behaviour of {{LOCALTIME}} in trunk: use the server's default timezone instead of UTC. Won't throw E_STRICT after the r60825 change to Setup.php. 2010-01-08 01:51:00 +00:00
Yaron Koren 2aeda8c33d Fixed most of the calls to killMarkers() 2009-06-11 03:05:49 +00:00
Aryeh Gregor aa27785023 Make r51509 work with older MediaWiki versions too
After discussion with Tim.  The back-compat stuff here seems pretty
useless -- why can't people with old versions of MediaWiki just keep the
old feature sets, and upgrade MediaWiki to get new features for
extensions?  We branch extensions for a reason.
2009-06-05 17:14:03 +00:00
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