Commit graph

735 commits

Author SHA1 Message Date
Ilmari Karonen
c05f5dcafe more minor tweaking to context link code, +comment 2006-07-26 19:33:13 +00:00
Ilmari Karonen
bbc5776faa further simplify context link code; use non-greedy matching instead of modifying the character class 2006-07-26 18:20:12 +00:00
Ilmari Karonen
d44217416d simplify context link handling in pstPass2(); don't use three regexps where one will do 2006-07-26 18:09:04 +00:00
Tim Starling
43b2fb56b6 Merged localisation-work branch:
* Made lines from initialiseMessages() appear as list items during installation
* Moved the bulk of the localisation data from the Language*.php files to the Messages*.php files. Deleted most of the Languages*.php files.
* Introduced "stub global" framework to provide deferred initialisation of core modules. 
* Removed placeholder values for $wgTitle and $wgArticle, these variables will now be null during the initialisation process, until they are set by index.php or another entry point.
* Added DBA cache type, for BDB-style caches. 
* Removed custom date format functions, replacing them with a format string in the style of PHP's date(). Used string identifiers instead of integer identifiers, in both the language files and user preferences. Migration should be transparent in most cases.
* Simplified the initialisation API for LoadBalancer objects.
* Removed the broken altencoding feature.
* Moved default user options and toggles from Language to User. Language objects are still able to define default preference overrides and extra user toggles, via a slightly different interface.
* Don't include the date option in the parser cache rendering hash unless $wgUseDynamicDates is enabled.
* Merged LanguageUtf8 with Language. Removed LanguageUtf8.php. 
* Removed inclusion of language files from the bottom of Language.php. This is now consistently done from Language::factory(). 
* Add the name of the executing maintenance script to the debug log. Start the profiler during maintenance scripts.
* Added "serialized" directory, for storing precompiled data in serialized form.
2006-07-26 07:15:39 +00:00
Tim Starling
5fae7ad49b Made OutputPage::tryParserCache() use addParserOutputNoText(), this fixes {{DISPLAYTITLE:}} and any similar entity. Added accessor for the subtitle in ParserOutput. 2006-07-24 05:25:12 +00:00
Brion Vibber
ba78b052b0 Revert 15733 and 15719 for the moment; I see some eval'd string code and other thinsg which make me nervous and I don't think anybody's reviewed this 2006-07-19 20:13:39 +00:00
Robert Stojnić
6c02619402 Commiting patch r15625:15661 from branches/SerbianVariants.
Enable titles in fixed variants (e.g. -{Title}-), rewrote
the Parser code for variants (do a single query for all 
variants of all links, instead 1 query per link per variant).
2006-07-18 19:36:25 +00:00
Tim Starling
8831c8e13d MagicWord initialisation deferred. 2006-07-14 16:36:35 +00:00
Tim Starling
6dc8e2b09f Fixed Parser::setFunctionHook(), broken by last commit. Passed parserTests.php either way due to conincidence. Also fixed a couple of comments broken by perl script^W^W meticulous hand-editing. 2006-07-14 16:08:16 +00:00
Tim Starling
cdbbe0ad4a Got rid of the MagicWord indexing constants (MAG_xxx), replaced them by string indexing, like messages. The associated change to the extensions, i.e. removing the MagicWordMagicWords hook and using string instead of integer indices, is in fact compatible with MW 1.6 and 1.7, which tells you something about the utility of the hook function. 2006-07-14 15:39:23 +00:00
Brion Vibber
843f9a8eb7 * Pre-strip characters ignored in IDNs from URLs so they can't be used to break the blacklists for regular URLs
Moved shared behavior of URL fixing from two Parser functions into Sanitizer::cleanUrl
This would be a good place to add some validation...
2006-07-11 19:54:20 +00:00
Antoine Musso
65290ec3b6 Fix ugly hack. Assume PHP5 does a nice job with references. 2006-07-11 17:46:30 +00:00
Antoine Musso
29946e5f61 Some evil whitespaces. Sorry. 2006-07-11 17:40:11 +00:00
Antoine Musso
ab8b197963 Some new strictness with PHP5 2006-07-11 14:03:17 +00:00
Antoine Musso
fa813bd470 Fix #6622: image::newFromTitle deprecated but still used 2006-07-10 19:49:22 +00:00
Brion Vibber
dcfb49111d * (bug 6299) Maintain parser's revision ID across recursive calls to fix
{{REVISIONID}} when Cite extension is used
2006-07-10 18:25:56 +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
Antoine Musso
c4cbef35ec static E_STRICT warnings 2006-07-10 15:08:51 +00:00
Brion Vibber
0148602a91 * (bug 6560) Avoid PHP notice when trimming ISBN whitespace 2006-07-06 17:09:10 +00:00
Tim Starling
9514688876 More profiling sections 2006-07-04 08:11:44 +00:00
Rob Church
6757b518c1 When parsing, if we encounter a blacklisted image, add the image to the output anyway, otherwise the imagelinks table is not quite correct. 2006-07-04 03:40:37 +00:00
Tim Starling
514122332d Got rid of about 20 regex calls in braceSubstitution() relating to function-like constructs, replaced them with a hashtable lookup styled after the parser function extension interface. The function bodies were moved to CoreParserFunctions.php. Disabled PAGESINNAMESPACE by default, yet another O(N) count of page table rows. 2006-07-03 11:07:00 +00:00
Tim Starling
56d3b87bd0 Better extension function synonym cache 2006-07-03 03:29:57 +00:00
Tim Starling
d470007a89 Function synonym cache for faster lookup of internationalised parser function extensions 2006-07-02 17:43:32 +00:00
Tim Starling
2ff288720c Various performance and initialisation issues:
* Made autoloader work for unserialize()
* Made XmlFunctions.php and HttpFunctions.php autoloadable modules, via Http:: and Xml::
* Made Image class autoloadable, global functions moved to ImageFunctions.php where they can be loaded on every invocation.
* Removed some unnecessary require_once() calls
* Deferred $wgValidSkinNames initialisation
* Fixed a couple of silly construct/initialise splits. My idea from C++ experience, bad practice in PHP.
* Deferred skin initialisation in ParserOptions
* Removed $wgMwRedir during an attempt to make MagicWord autoloadable. Didn't complete that, but removing the global is still the right direction.
2006-07-02 15:57:59 +00:00
Niklas Laxström
165955b292 * Added formatnum magic word 2006-06-29 13:37:06 +00:00
Rob Church
0106842e64 * (bug 6201) Treat spaces as underscores in parameters to {{ns:}} 2006-06-29 00:36:01 +00:00
Rotem Liss
bca1ed3db9 ParserFunctions are now set using magic words; backwards compatibility is retained. 2006-06-25 21:24:14 +00:00
Rob Church
5b8647d770 * Revert apparent breakage 2006-06-24 21:56:05 +00:00
Rotem Liss
92d3f2527c Now should set the parser functions as magic words via the appropriate hooks (MagicWordMagicWords, MagicWordwgVariableIDs and LanguageGetMagic). Backwards compatibility is retained. This allows us to translate the parser functions. 2006-06-24 14:40:25 +00:00
Rob Church
3d291f615b Cripple the wiki text stuff for now. It doesn't SEEM dangerous but I haven't tested the lot. 2006-06-24 00:27:16 +00:00
Rob Church
73be040a7a * (bug 2316) Add "caption" attribute to <gallery> tag
* Allow setting the skin object that ImageGallery will use; needed during parse operations (the skin must come from the ParserOptions, not $wgUser)
* Prod a few skin files and increment some cache-smashers
2006-06-24 00:12:34 +00:00
Rob Church
63099f6408 Missing $this-> 2006-06-23 21:54:31 +00:00
Antoine Musso
d0dbebb4c1 Remove ~{3,5} in Nickname when saving the preferences. Make sure
sig in sig get removed even when fancy username is disabled or
nickname is empty.
2006-06-23 19:50:55 +00:00
Antoine Musso
6b7a67266c typo 2006-06-23 18:23:01 +00:00
Tim Starling
b739dc6de2 Fixed issues with careless use of Sanitizer::decodeCharReferences(), added a parser test case for one of them. 2006-06-23 09:20:44 +00:00
Brion Vibber
c86110d645 * (bug 6398) Work around apparent PCRE bug breaking section editing when massively-indented preformatted text immediately followed a header 2006-06-21 23:13:05 +00:00
Brion Vibber
44d6ff48e9 Revert 14849; breaks standard time keywords and provides no alternatives either 2006-06-20 21:03:47 +00:00
Rotem Liss
b0099858a3 (bug 5727) Time magic words should use $wgLocaltimezone instead of UTC:
1. Not using anymore the functions wfTimestamp (for {{CURRENTTIME}}) and wfTimestampNow (for {{CURRENTTIMESTAMP}}) for the time magic words, because they output a UTC date; instead, using the built-in function "date" with the parameters "YmdHis".
2. Fix number 1 makes the time magic words OK when using the server default timezone (actually, all of them were OK except {{CURRENTIME}} and {{CURRENTTIMESTAMP}}), but the problem is still exist when setting $wgLocaltimezone, as it isn't noticed. Therefore, setting the timezone to "TZ" enviroment variable like in the signature, getting the various dates and times by "date" function, then setting the "TZ" to its previous value.
2006-06-20 18:29:54 +00:00
Rob Church
718783df19 Fix {{NUMBEROFADMINS}} magic word 2006-06-17 22:36:12 +00:00
Tim Starling
859a3e942e Avoid fatal error on invalid title 2006-06-17 08:55:44 +00:00
Niklas Laxström
7818d542f0 * (bug 6300) Bug fixes for sr: variants
* Patch from Robert Stojnic
2006-06-16 22:30:39 +00:00
Rob Church
907125da5c Introduce {{NUMBEROFADMINS}} magic word 2006-06-16 13:58:42 +00:00
Magnus Manske
7f2155fa9e Bug 6031 (feature request for __NOGALLERY__ on category pages) fixed 2006-06-13 11:37:09 +00:00
Magnus Manske
17dddf5313 bug 2700 (preSaveTransform not working in gallery links) fixed 2006-06-13 10:11:12 +00:00
Rob Church
6a5d22374a (bug 5932) Introduce {{PAGESINNAMESPACE}} magic word 2006-06-12 12:38:41 +00:00
Brion Vibber
a5ac8a50c2 HTML normalization: use double-quotes on RFC and PMID quotes for consistency with upcoming normalizer's output 2006-06-12 06:04:51 +00:00
Brion Vibber
3487221d36 * Fix regression(?) in behavior of initial-whitespace-pre in <center> 2006-06-09 21:59:26 +00:00
Niklas Laxström
4c085983f2 * {{PLURAL}} can now take up to five forms. Needed for some languages 2006-06-08 19:42:07 +00:00
Rob Church
9b5ddbb646 (bug 5945) Introduce {{CONTENTLANGUAGE}} magic word 2006-06-08 13:30:35 +00:00