Commit graph

14 commits

Author SHA1 Message Date
Tim Starling
2f12a58d93 * Introduced StringUtils.php, populated it with some generic string functions, both new and collected from various other files.
* Removed some backtracking regexes with an O(N^2) worst case, replaced with StringUtils::delimiterReplace(). There is a beneficial functional difference: /*/ is no longer considered to be a complete CSS comment.
* Changed the parser strip state from an array to an object. This should hopefully avoid the PHP bugs with array references. StripState uses the new ReplacementArray to do the replacements, thereby supporting FSS. 
* Removed DatabaseFunctions.php from the default startup sequence. Moved wfGetDB() to GlobalFunctions.php.
* Introduced the SiteStats class, with a collection of cached site stats accessor functions.
* Removed all global functions from Parser.php, they don't belong there.
* Made LanguageConverter use the new ReplacementArray class instead of managing its own FSS objects.
2006-11-21 09:53:45 +00:00
Brion Vibber
e0b7262afc Revert r17367 "(bug 7723) Add ic: parser function, with alias tc:, which capitalises the first letter of each word."
Feature creep with no apparent usefulness; would produce obviously incorrect results for mixed-case or all-caps words.
2006-11-03 08:36:28 +00:00
Andrew Garrett
dc223c593f * (bug 7723) Add ic: parser function, with alias tc:, which capitalises the first letter of each word. 2006-11-03 05:25:10 +00:00
Tim Starling
ac28d6f10a Added {{#special:}} parser function, to give the local default title for special pages 2006-10-31 13:25:47 +00:00
Tim Starling
efdd9ae981 Made {{INT:}} a core parser function instead of a special case. The syntax and behaviour is largely unchanged. 2006-09-30 04:53:36 +00:00
Jimmy Collins
ae0e481579 (bug 7059) 'anchorencode' colon function needs one more replace '+' -> '_' 2006-09-27 18:24:08 +00:00
Rob Church
df1e411f4b * (bug 7059) Introduce "anchorencode" colon function 2006-08-30 07:51:44 +00:00
Rob Church
67bca85656 (bug 7158) Regression in padding function behaviour, blah blah, I hate users, blah blah 2006-08-29 03:24:33 +00:00
Rob Church
8cd80c8d4c PADLEFT/PADRIGHT:
* Enforce a reasonable maximum length to cover most uses while preventing some dickhead from doing a 500 thousand character expansion
* Use the first padding character only for similar reasons
* (bug 7081) More input validation and checking
2006-08-21 11:07:58 +00:00
Rob Church
a64ab02471 (bug 7080) PHP notices on bad input to padleft/padright 2006-08-21 03:25:32 +00:00
Rob Church
73ee792c4d * (bug 7044) Introduce "padleft" and "padright" colon functions 2006-08-18 17:30:35 +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
Tim Starling
cd1e5bab85 fixed raw suffix 2006-07-03 13:55:52 +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