* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls
Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"
Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.
Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
Being able to get the message key and parameters from a Message object
is needed to be able to report errors from the API in an abstract,
language neutral way.
Change-Id: I8ee9da4005db7cb0a487457127f1e24fb11dbd66
MessageContent can take either a Message or a message key in
the constructor. Since Message::content() is an instance method,
it makes sense to pass the instance itself rather than just
the key. This fixes cases where RawMessage::content() is called,
since passing RawMessage's key to MessageContent will not work
properly.
Change-Id: Ic3b935e5ac997df07eea40b438445ebd5024e306
PHP doesn't allow __toString to throw exceptions and will
trigger a fatal error if it does. So, catch any exceptions
and try to report them using wfWarn.
Change-Id: I52d38e9a927da4db18f4733fd207f9396adedf94
Rather than calling mainLoginForm() and returning false,
the addNewaccountInternal() function now returns a Status
on failure. mainLoginForm() is then called in addNewAccount()
and addNewAccountMailPassword() instead. This allows for
processing of the account creation form without submitting
anything to $wgOut.
Change-Id: I402c6bebcfe276233cc1f9e16efbe55a034b2181
Per Tim Starling's comment on bug 41400, I replaced the throw (when a
message parameter is invalid) with a call to trigger_error().
The string [INVALID] is used as a placeholder to make it clear from
the output that an error has occurred.
Change-Id: I974d55d44d392c956e7de6d243da9d8dc07d8833
This introduces the ContentHandler facility into MediaWiki,
see docs/contenthandler.txt.
For convenient review, a squashed version is available at
https://gerrit.wikimedia.org/r/27191
The ContentHandler facility is a major building block of the Wikidata project.
It has been discussed repeatedly on wikitech-l.
Change-Id: I3804e2d5f6f59e6a39db80744bdf61bfe8c14f98
Minor side change 1: fix preservation of infinite expiry time when reblocking:
the hardcoded value "indefinite" did not match with the default value
specified in ipboptions "infinite"
Minor side change 2: fix link in includes/Message.php's documentation
Change-Id: Icb1edabd8bb3dd1020c023b27b1270b9d2735b06
- If the message does not exist, do an early return from the toString method, instead of going through replaceParameter and format comparisons.
- Avoid getMessageText method.
- If the format is plain, do not escape the angle brackets.
Change-Id: I4561ee75d991ef8df3399ab17e5d75cb81f63f8f
* Removed OutputPage::setPageTitleMsg() and OutputPage::setHTMLTitleMsg() and make OutputPage::setPageTitle() and OutputPage::setHTMLTitle() accept a Message object
* Updated core calls (including some that I missed last time because of non-matching case)
* Added Message::setContext() and use it in RequestContext so that I don't need to duplicate the call in OutputPage
* Yes, I'm calling $this->msg() on places and then setting the context one more time in OutputPage::setPageTitle() or OutputPage::setHTMLTitle(), but at least I won't be confused about which objects $
<ialex> Reedy: that rev is breaking usage of {{PAGENAME}} in messages, such as in MediaWiki:Noarticles
Allowing optional passing in of a Title object (like it may be set in Message), but if it's not set, or not a title object, fall back and use $wgTitle (I'm sorry!)
We need a title object for parsing, do one against the message key
Doesn't seem to be the best way, but it's the most applicable. If I abused $wgTitle, Chad would come and beat me too ;)
* (bug 16129) Transcluded special pages expose strip markers when they output parsed messages
Also adding some related documentation during my travels around the code