Commit graph

220 commits

Author SHA1 Message Date
umherirrender
b5511c68c3 (bug 34355) add a variable and parser function for the namespace number
Change-Id: Ie162cfda7ddd38d4278ceee5fd23f5a4e579cb96
2012-04-03 13:25:06 -07:00
Alexandre Emsenhuber
e6812a869a * (bug 35446) Using "{{nse:}}" with an invalid namespace name no longer throws a PHP warning
Change-Id: I8e7611cdb03558af13ec5b96e02857ff5b16b571
2012-03-26 20:27:18 +02:00
Tim Starling
13b514edae Fixed a few "strip tag exposed" bugs.
* Introduced Parser::killMarkers() based on the concept from StringFunctions. Used it in cases where markerStripCallback() doesn't make sense semantically, namely grammar, padleft, padright and anchorencode. Used markerStripCallback() in other cases.
* Changed headline unstrip order as suggested by P.Copp on bug 18295
* In CPF::lc() and CPF::uc(), removed the is_callable(). This was a temporary testing hack committed by me in r30109, which allowed me to do differential testing against a copy of the parser from before that revision.
2012-03-20 04:39:09 +00:00
Robin Pepermans
b13e9ad861 fix typo in r112479 2012-03-01 17:57:15 +00:00
Robin Pepermans
44d2c73bf5 Combine getLanguageNames and getTranslatedLanguageNames into one function which is much easier and more logical to use. Does not contain any actual changes yet in what the function does.
* Reduces the overly long code in r107002, and reduces code for {{#language:}}
* Fixes the language list in Special:Translate which contained languages that gave "invalid code" when selecting
2012-02-27 11:59:24 +00:00
Sam Reed
9990b77058 Add missing wfProfileOut( __METHOD__ ); 2012-02-16 02:01:00 +00:00
Sam Reed
2ec09c5165 More return documentation 2012-02-09 21:35:05 +00:00
Tim Starling
a444986c45 * Optimise {{GENDER}} so that it doesn't need to load the user options if only one form is given. For some reason (presumably some detail of how translatewiki.net works) such {{GENDER}} invocations are extremely common.
* Updated Language::gender() documentation accordingly
2012-02-08 06:09:58 +00:00
Antoine Musso
fc6bc233be Fix doxygen docs before REL1_19 branching 2012-02-01 20:53:38 +00:00
Aaron Schulz
5a6559d8b1 Reverted r108743 per CR comment. This should at least be discussed first. 2012-01-12 19:41:18 +00:00
Sam Reed
a5c200a25b Kill "* @return void" 2012-01-12 19:12:24 +00:00
Brion Vibber
c1906d53de Provisional revert r106573, r106559: may be the wrong thing to do, and should probably come with regression tests if added. 2011-12-20 21:24:06 +00:00
Robin Pepermans
e9033cbf82 Follow-up r106559: it's better to set the preference for own MediaWiki names in Language::getTranslatedLanguageNames. More consistent and saves some code :)
Also update Babel to use that function.
2011-12-18 17:58:47 +00:00
Robin Pepermans
8cae5ee72d Make the output consistent when no second parameter is given and second parameter equals first parameter. This gives preference to names defined in MediaWiki, but when it is not in MediaWiki, it also sees whether there is one defined in the translated language names. 2011-12-18 12:17:12 +00:00
Platonides
dc38ecd003 Bug 31098: Template loop through MediaWiki: messages (int: function) not being detected.
The trick is not to replaceVariables() ourselves, but to leave that to the preprocessor,
which is then correctly detecting the loop.
2011-10-29 22:22:51 +00:00
Alexandre Emsenhuber
bd548f36e9 * Changed ParserOptions to store a Language object instead of only a string, avoids object -> string -> object conversion
* ParserOptions::getUserLang() will still return a string for compatibility, added ParserOptions::getUserLangObj() to get the object
* Added ParserOptions::newFromUserAndLang() and ParserOptions::newFromContext() to easily get a ParserOptions object when a context is available or when someone wants to force the language
* Updated OutputPage and Preferences to use newFromContext() and WikiPage to use newFromUserAndLang()
* ParserOptions::setUserLang() still accepts either a string or a Language object, but changed the calls to pass an object instead of a string
* Changed Parser::getFunctionLang() to return the Language object from ParserOptions when parsing interface messages rather than $wgLang directly and updated the documentation to say that $wgLang should not be used directly (as $wgUser, $wgTitle and $wgRequest)
2011-10-19 14:16:01 +00:00
Brian Wolff
2f2d9bd0c5 (follow-up r96767) Make {{DEFAULTSORT:..|noerror}} and noreplace i18n-izable.
Hopefully i did this right. I've never added a magic word before...
2011-09-11 20:32:58 +00:00
Brian Wolff
62eb447b9b (bug 16755) Add syntax to DEFAULTSORT - {{DEFAULTSORT:Foo|noerror}} and {{DEFAULTSORT:Bar|noreplace}}
to in both cases prevent the "A sortkey already was specified earlier in the page, yadda yadda" message and in the second case, also do not replace the sortkey
if one was already specified.
2011-09-11 02:20:20 +00:00
Roan Kattouw
fbc65f8972 Per CR on r44412 and my promise in the commit summary of r94990, stop abusing $wgInternalServer (intended for Squid URLs) for IRC/e-mail URLs and introduce $wgCanonicalServer for these purposes instead. This revision introduces two new hooks for WMF hacks, in exchange for making the core code saner.
* Introduce $wgCanonicalServer, which should typically be a fully qualified version of $wgServer but in practice can be anything that you'd like to be used in IRC/e-mail notifs
** Default value is $wgServer, expanded to http:// if protocol-relative
** This means you can easily set HTTPS as the 'default' protocol to use in IRC and e-mail notifs by setting $wgCanonicalServer to https://example.com
* Introduce Title::getCanonicalURL(). Similar to getInternalURL(), including a hook for WMF usage (which will be needed as long as secure.wikimedia.org is used)
** Also add escapeCanonicalURL(). Due to some ridiculous accident of history, the other escapeFooURL() functions don't have a $variant parameter; I decided not to follow that bad example
* Reinstate the spirit of r44406 and r44412: instead of calling getInternalURL() (or getCanonicalURL()) and regexing the title parameter out, obtain the path to index.php using $wgCanonicalServer . $wgScript and append params to that. Sadly, we need to add a hook here to support the secure server hack for WMF, but that's the price of saner code in this case
* Introduce the {{canonicalurl:}} and {{canonicalurle:}} parser functions, which work just like {{fullurl:}} and {{fullurle:}} except that they use getCanonicalURL() instead of getFullURL()
* Use {{canonicalurl:}} in the enotif_body message, fixing bug 29993 (protocol-relative URLs appear in e-mail notifications)
2011-08-19 11:23:17 +00:00
Roan Kattouw
ae7d7676fb Fix r93820: PROT_ -> PROTO_ 2011-08-03 13:11:42 +00:00
Roan Kattouw
6adb2e86a5 Some random URL protocol forcing for protocol-relative URLs 2011-08-03 12:58:21 +00:00
Mark A. Hershberger
e201e2307d w/s changes: “svn diff -x-w” is clean 2011-08-01 15:40:02 +00:00
Niklas Laxström
e7035be35f ping r91875 2011-07-11 18:05:32 +00:00
Niklas Laxström
59a5f7e292 * (bug 16699) {{#language:}} accepts second parameter to specify the language in
which the language name is wanted. Coverage depends on the cldr extension.
2011-07-11 12:23:39 +00:00
Niklas Laxström
74deda8865 Fu r90453. Updates comments 2011-06-20 10:19:52 +00:00
Niklas Laxström
9988444a9f Proposed fix for bug 29450. Don't use the current user's gender for invalid users.
Any ideas how to write tests for this?
2011-06-20 10:04:55 +00:00
Max Semenik
12565a5994 Fix type in code doc from r82433 2011-06-17 20:02:39 +00:00
Sam Reed
e514478ba5 Fix function level comments that start with /* not /** 2011-05-21 19:35:16 +00:00
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Krinkle
3b5d666da7 Change getUrl to getFullUrl for {{filepath:Filename.jpg}} of non-thumbd local files. This way it matches the paths for thumbnails and for foreign files. (bug 28618) 2011-04-23 19:38:53 +00:00
Chad Horohoe
783d4e0862 Remove @static from all over the place. That's what the static keyword is for, this being PHP5 and all 2011-04-21 00:07:09 +00:00
Happy-melon
2c9cfd7cce Refactor the factory/i18n/list/etc static methods from SpecialPage into their own class; there's no reason we need to be parsing them in every single SpecialPage subclass. Leave all the methods as stubs in SpecialPage.php; if we required PHP 5.3 they could be replaced by a a __callStatic() magic method, but that doesn't work on PHP 5.2.
Also make a few changes to the functions available.  SpecialPageFactory::resolveAlias() now takes an optional subpage and returns array(<name>,<subpage>).  Similarly merge getPage() and getPageByAlias().  There were many examples of (extensions particularly) making dubious assumptions about the presence or absence of subpages or canonical-ness.

I didn't deprecate SpecialPage::getTitleFor() as it's got over six hundred calls.  I'm rather undecided on the best position of getPage()/executePath().  Although the latter needs cleanup anyway.
2011-04-17 11:31:11 +00:00
Sam Reed
7d98280f3e More function and variable documentation 2011-02-19 01:02:56 +00:00
Sam Reed
da3b3fbae4 More return type documentation 2011-02-08 23:18:13 +00:00
Alexandre Emsenhuber
dfd6988313 Use wfMessage() instead of wfMsgGetKey() 2011-02-04 16:52:26 +00:00
Alexandre Emsenhuber
51c6afc751 * Replaced $wgMessageCache by MessageCache::singleton(); since we only use one instance of this class (as for ParserCache, LinkCache)
* MessageCache::singleton() calls wfGetMessageCacheStorage() directly instead of using $messageMemc, just in case this would be called before that variable is set
* Per TimStarling: also removed deprecated methods in MessageCache class: addMessages() and related, [get|set|enable|disable]Transform(), loadAllMessages(), loadMessageFile() and some others. Same for the legacyData stuff in LocalisationCache that was only used by MessageCache::addMessages() and related. 
* Converted remaining extensions
2011-01-26 15:42:04 +00:00
Krinkle
0552353f1f Follow-up per r80813 CR 2011-01-23 14:34:19 +00:00
Krinkle
3cc14d4bf8 Bug 26870 - add width/height param to {{filepath:}}
* In addition to r80381
* Expanded comments in SpecialFilePath a little bit
2011-01-23 13:09:15 +00:00
Ilmari Karonen
7e5472dea3 followup r80511: make {{PAGENAMEE}} and friends also call wfEscapeWikiText() (why is the code duplicated, anyway??) 2011-01-18 20:15:50 +00:00
Alexandre Emsenhuber
510309e4ab * (bug 19006) {{REVISIONUSER}} no longer acts like {{CURRENTUSER}} in some cases
* Removed other usages of $wgUser in Parser stuff, as stated in doc
* Added mechanism to get an User object in Parser, based either on the object given in Paser::preSaveTransform() or the ParserOptions otherwise
2010-12-10 18:17:20 +00:00
Chad Horohoe
ba134fca3a Revert r73976 (Implements bug 24343 "localurl discards section id"). Per BZ feedback, this doesn't actually fix the original issue, it adds a new parser function to work around the issue. 2010-10-23 15:32:31 +00:00
Platonides
ed779ae90a Use the accessor for getting mOptions.
I'm not touching the accesses from the preprocessors since 
I don't know if the call could add a penalty.
2010-10-15 23:10:05 +00:00
Antoine Musso
c9ed45c948 Implements bug 24343 "localurl discards section id".
* parser hook 'linkurl' which use Title::getLinkUrl()
* very basic tests for the Title class
2010-09-29 19:51:48 +00:00
Ryan Kaldari
4b4a065501 fixing per comments at r70517 2010-09-29 17:25:17 +00:00
Alexandre Emsenhuber
dc50e1a4bf * Added file description headers
* Added @file where needed
2010-08-22 14:31:05 +00:00
Sam Reed
380b6725d5 Remove some unused variables
Move variable in languages/classes/LanguageKu.php into commented code (used in comment)
2010-08-13 20:58:16 +00:00
Platonides
9e96f8db77 Parser should only use content messages. 2010-08-12 13:23:28 +00:00
Platonides
e1e71bde41 Make intfunction go accross the ParserOptions.
Things like calling setUserLang( true ) to use the content language are unsupported and shouldn't be done.
2010-08-05 18:43:49 +00:00
Conrad Irwin
e3e24db382 (bug 17857) Make {{anchorencode}} work in a manner more similar to the way that
section links are created by the parser. Also useful for (bug 18431).
2010-06-20 23:43:39 +00:00
Alexandre Emsenhuber
1ec45bef2e Fixed some doxygen warnings 2010-06-09 14:57:59 +00:00
Chad Horohoe
6d993be4c5 Partial revert r67707, included half-baked patch 2010-06-09 11:54:18 +00:00
Chad Horohoe
44229b50e6 Fixed a bunch of silly instances of [^!=]==\s*(true|false) 2010-06-09 11:44:05 +00:00
Conrad Irwin
481ddf27f9 Bug 22474, urlencode now takes a parameter to change escaping style 2010-04-08 00:29:58 +00:00
Alexandre Emsenhuber
6067875881 Typo in comment 2010-03-18 11:42:26 +00:00
Alexandre Emsenhuber
70969c83ce * (bug 22772) {{#special:}} parser function now works with subpages 2010-03-16 19:47:24 +00:00
Tim Starling
f5b882aadc Moving Conrad's recent parser work out to a branch. Reverted r62434, r62416, r62150, r62111, r62085, r62081, r62080, r62077, r62076, r62069, r62049, r62035. 2010-02-19 05:19:32 +00:00
Alexandre Emsenhuber
e254b8e971 Fixed some doxygen warnings 2010-02-14 21:23:38 +00:00
Platonides
eb433b42a0 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
Alexandre Emsenhuber
f0683f8e08 Whitespaces fixes 2010-02-11 14:57:43 +00:00
Chad Horohoe
5fd1b2e4ba Cleanup r62111, don't pass by reference 2010-02-08 11:30:17 +00:00
Conrad Irwin
7a1fc37382 partial revert for r62081. Make {{PIPETRICK}} like {{PAGENAME}}, add {{PIPETRICKE}}. fix r62077 better. 2010-02-08 02:07:15 +00:00
Conrad Irwin
0443dd4c5c Fixes for r62077
{{pipetrick:}} -> {{#pipetrick:}} per IAlex
 clearer documentation per Siebrand
 parser test for new magic word.
2010-02-07 13:17:05 +00:00
Conrad Irwin
d036809f36 Bug 7264 - Magic word to give Page Title as if pipe-trick performed on it {{pipetrick:}} 2010-02-07 02:36:32 +00:00
Tobias
a197b768dd introducing new CoreParserFunction nse as an url-friendly equivalent to ns. bug 12920 2009-08-02 18:16:56 +00:00
Ryan Schmidt
12153478ef * DISPLAYTITLE fixes:
** DISPLAYTITLE now parses the single-quote items of wiki markup (bold and italic).
** Remove UNIQ markers from the output due to people putting tags in there (nowiki, ref, etc.).
** Forbid hr and br elements from being in DISPLAYTITLE as well.
2009-06-08 16:53:39 +00:00
Tim Starling
6cc78e5d4b Revert r51200, r51253, r51254, addition of {{NUMBEROFCONTRIBS:...}} parser function. See CodeReview r51200. Not very well implemented and probably a bad idea anyway. 2009-06-06 02:49:32 +00:00
Tim Starling
9cb35f8036 Reverted r49575, {{revisionid:...}} due to unresolved CR comments and the general cache-breaking insanity of the concept. 2009-06-03 17:09:50 +00:00
Tim Starling
1179421217 Reverted r48984. Fragile, doesn't work if memcached is enabled. See CodeReview. 2009-06-03 14:51:08 +00:00
Tim Starling
df41d898a7 Profiling for CPF::gender() 2009-06-03 06:28:19 +00:00
Alex Z
19a90fd8a7 On second thought, use idFromName and edits() instead, load() loads a whole bunch of stuff we don't need 2009-05-31 19:06:04 +00:00
Alex Z
12fb35058e Some followup to r51200:
* Save a query by not using User::edits()
* Mark as an expensive function (it needs at least 1 query for each use)
* Use number formatting/raw option rather than pointless wfEscapeWikiText()
2009-05-31 18:55:38 +00:00
X!
784dc5cc9a (bug 19012) Added {{NUMBEROFCONTRIBS}} variable 2009-05-30 17:27:16 +00:00
Siebrand Mazeland
8e23949bee Proper casing for getDBkey() 2009-05-24 08:29:10 +00:00
Ryan Schmidt
54f5b23182 Follow-up on r49330
* re-add $wgRestrictDisplayTitle
* revert r49610
* prevent block-level and other such tags from being used in DISPLAYTITLE (while still allowing tags such as <sup> and <sub>)
2009-04-19 23:48:50 +00:00
Roan Kattouw
30c3ce9f9a (bug 6092) Add parser function equivalents of {{REVISIONID}}, {{REVISIONTIMESTAMP}} (and friends) and {{REVISIONUSER}} magic words. These parser functions are marked as expensive and cache their results 2009-04-16 21:46:49 +00:00
Remember the dot
e4d211703c (bug 12998) Allow <sup>, <sub>, etc. in DISPLAYTITLE 2009-04-09 05:15:43 +00:00
Philip Tzou
3cf3ea5f0b Add group convertsion support for LanguageConverter. New magic word "{{GROUPCONVERT:xxx}}" enabled for this new feature. You can set related conversion rules in [[MediaWiki:Groupconversiontable-xxx]]. 2009-03-29 08:55:45 +00:00
Andrew Garrett
27ea934436 Convert formatdate to a hashed parserfunction 2009-03-25 12:27:04 +00:00
Brion Vibber
1a58e8f93e Fix up r48728 "Allow User: prefix in parameter to GENDER parser function"
Wasn't checking return value for null, or actually calling the getNamespace() method correctly.
2009-03-24 23:04:51 +00:00
Andrew Garrett
80e4139017 Allow User: prefix in parameter to GENDER parser function 2009-03-24 06:58:43 +00:00
Chad Horohoe
8f25eccecb Documenting this, because it makes no sense. 2009-03-18 21:32:58 +00:00
Andrew Garrett
72acc9b179 Tweak r48249 -- allow specification of the default format, and require the date to take up the entire argument. 2009-03-10 05:19:05 +00:00
Andrew Garrett
b9ffb5a7e9 * (bug 4582) Provide preference-based autoformatting of unlinked dates with the dateformat
parser function.
2009-03-10 01:07:47 +00:00
Alexandre Emsenhuber
d710765f6f Renamed CoreParserFunctions::namespace() to CoreParserFunctions::mwnamespace() to not break PHP 5.3, was throwing an E_PARSE: "Unexpected T_NAMESPACE" 2009-03-04 18:59:28 +00:00
Brion Vibber
ae0b528972 Revert r46628, r46639 for now "Don't allow padding parser functions to be used to truncate strings."
Doesn't seem to be a compelling reason to add this special-case restriction at this time, and there appear to be ways to work around it anyway, so let's not play the arms race. :)
2009-02-18 02:24:55 +00:00
Aaron Schulz
7a5ca259be Rename new ACTIVEUSERS word to NUMBEROFACTIVEUSERS 2009-02-17 23:05:04 +00:00
Andrew Garrett
802c88e188 Add ACTIVEUSERS magic-word, complement to NUMBEROFUSERS. 2009-02-04 22:16:35 +00:00
Alex Z
a4fafb006b (bug 8249) Followup to r46630, add parser function versions of the various PAGENAME magic words 2009-01-31 22:25:01 +00:00
Andrew Garrett
cff78fbda1 Fix r46628 -- I'd misunderstood the nature of the hack. People wanted to append the string to be truncated to an empty string, not the reverse. 2009-01-31 11:43:42 +00:00
Alex Z
a01e861968 Allow the {{NAMESPACE}}, {{TALKSPACE}}, and {{SUBJECTSPACE}} magic words (and their urlencoding versions) to be used as parser functions to return the desired namespace for a given title. 2009-01-31 01:35:18 +00:00
Andrew Garrett
8d6213da2a Don't allow padding parser functions to be used to truncate strings. This breaks in some situations, and also encourages its use to reconstruct StringFunctions with core parser functions, which is undesirable for performance and usability reasons. 2009-01-31 00:46:38 +00:00
Niklas Laxström
6613060f33 * (bug 13040) {{GENDER:}} magic word for interface messages 2009-01-26 09:48:17 +00:00
Aryeh Gregor
7f1b040248 (bug 16852) padleft and padright now handle multibyte characters and multicharacter pad strings
Patch by RememberTheDot, with adjustments to comments by me
2009-01-14 17:54:52 +00:00
Alex Z
a445dd5e11 (bug 9947) Add PROTECTIONLEVEL parser function to return the protection level for a given action (e.g. edit, move) for the current page. 2009-01-08 23:21:06 +00:00
Brion Vibber
880d68b28c Pull back r45181 "(Bug 12998) Weaken DISPLAYTITLE restictions (patch by rememberthedot@gmail.com)" for now.
Escaping issues per comment http://www.mediawiki.org/wiki/Special:Code/MediaWiki/45181#c1046
2008-12-31 16:49:38 +00:00
Aaron Schulz
d0aeaa55ff (Bug 12998) Weaken DISPLAYTITLE restictions (patch by rememberthedot@gmail.com) 2008-12-30 12:22:15 +00:00
Aaron Schulz
cacf972906 (Bug 16678) localurl/fullurl for Media: titles should return the File: title's path 2008-12-23 21:12:43 +00:00
Raimond Spekking
566145e89b * (bug 13835) Fix rendering of {{filepath:Wiki.png|nowiki}}
Patch by Olaf Lenz
2008-12-23 11:59:37 +00:00
Aaron Schulz
f8e8aba2a9 Reduce queries for pagesize thingy 2008-12-11 01:33:27 +00:00
Aaron Schulz
d57050f8fc Fix this broken crap some more 2008-12-11 01:17:17 +00:00
Aaron Schulz
e375c09596 (bug 16589) CoreParserFunctions error causes 500 2008-12-10 23:27:25 +00:00
Brion Vibber
95211ac850 Revert r44271 "(bug 12998) Weaken DISPLAYTITLE restictions (patch by 'rememberthedot@gmail.com')"
Behavior seems a bit hard to predict, as far as what's going to go in the header and what in the browser window etc. Pulling it back for further testing and discussion.
2008-12-10 23:21:28 +00:00
Aaron Schulz
af10d34286 (bug 12998) Weaken DISPLAYTITLE restictions (patch by 'rememberthedot@gmail.com') 2008-12-06 18:00:17 +00:00
Raimond Spekking
e31e85265f Fix for r43077:
* Use wfMsg to show error message in user preference language. wfMsgForContent does not make sense
* Rename new message name to MediaWiki code standards. Use dash and not underscore
2008-11-02 18:46:27 +00:00
Ilmari Karonen
a3fbf7fc49 Emit a warning message if a single page has multiple conflicting {{DEFAULTSORT:}} keys.
(Also, replace wfMsg() with wfMsgForContent() for the unknown_extension_tag message.)
2008-11-02 14:21:04 +00:00
Nicolas Dumazet
10263f3f68 Adding function hook for numberofviews 2008-10-28 09:24:52 +00:00
Nicolas Dumazet
6198592553 (bug 13701) {{NUMBEROFVIEWS}} magic word to show number of total views. 2008-10-19 04:11:02 +00:00
Ilmari Karonen
dbcdc32293 Make the {{ns:}} core parser function accept localized namespace names and aliases. Also change the output to use spaces
instead of underscores so that it matches the output of {{NAMESPACE}} and related magic words.
2008-10-09 00:56:26 +00:00
Tim Starling
42f56126cb (bug 14229) Trim attribute name in #tag 2008-10-06 07:37:37 +00:00
Alexandre Emsenhuber
5815d83236 Replace arguments before replacing variables in {{int:...}} parser function, for compatibility with messages that require it 2008-08-28 08:08:31 +00:00
Roan Kattouw
406dbbb47e (bug 13471) Added NUMBERINGROUP magic word. Patch by Soxred93 2008-08-28 00:04:57 +00:00
Daniel Kinzler
98520b17ee add new option $wgRestrictDisplayTitle 2008-08-17 21:08:58 +00:00
Tim Starling
db6aa1a614 Don't use $wgParser when {{int:}} is called, use $parser->replaceVariables() instead. Removes an unnecessary potential $wgTitle reference, and fixes Parser_DiffTest. 2008-08-15 16:02:00 +00:00
Brion Vibber
75b58962c6 Revert r38221, 38238 -- "Add new parser function {{apiurl}}. Also, add new global $wgApiScript because manually constructing the api script's path seemed like a bad idea."
I don't really like this in general; the API isn't meant for the UI and there should be little to no call to link to it from body content.

Additionally, I believe we're trying to move all new parser functions to the convention of using the # prefix to avoid conflict with the template namespace.
2008-07-30 19:45:35 +00:00
Chad Horohoe
50adaf75a7 I love case-sensitivity. Don't you? 2008-07-30 14:09:02 +00:00
Chad Horohoe
5fb49ecb12 Add new parser function {{apiurl}}. Also, add new global $wgApiScript because manually constructing the api script's path seemed like a bad idea. 2008-07-30 07:46:25 +00:00
Chad Horohoe
14a80040bf Deprecate SiteStats::admins() in favor of SiteStats::numberingroup('sysop'). Should make bug 13471 easy. 2008-07-28 15:49:44 +00:00
Brion Vibber
4aedae2126 Revert r37567 for nwo ("(bug 8604) padright: and similar functions fail with non-ASCII arguments")
This implements an mb_str_pad fallback function, but there is no mb_str_pad in PHP documentation, and the doc comments are really weird -- it says it returns an integer!
If this function is created from whole cloth and doesn't exist in PHP, it should be given a MediaWiki style name and not be done with a function_exists check as though it were a compat function.
2008-07-12 14:05:04 +00:00
Niklas Laxström
9ba65533b5 * (bug 8604) padright: and similar functions fail with non-ASCII arguments 2008-07-11 18:08:18 +00:00
Tim Starling
c6b902f180 * Reorganised the includes directory, creating subdirectories db, parser and specials
* Wrote a tool to check the integrity of the autoloader class list, fixed some issues that came up.
* Start the autoloader before LocalSettings.php, so that when an extension writer thinks an inefficient one-file special page extension is the way to go, they don't have to use explicit includes to make the class inheritance work. Should continue to work with $IP set in LocalSettings.php as long as $IP is set before extensions are included.
2008-06-16 20:21:26 +00:00
Renamed from includes/CoreParserFunctions.php (Browse further)