Update documentation of what a "section" is
authorThiemo Mättig <thiemo.maettig@wikimedia.de>
Thu, 12 Jun 2014 14:05:18 +0000 (16:05 +0200)
committerThiemo Mättig <thiemo.maettig@wikimedia.de>
Thu, 12 Jun 2014 16:13:23 +0000 (18:13 +0200)
commitf6cff5e392f178942407cbf56b58de825d37d022
tree1935926a1639fbb8a9070ef623201a1c941ba3bc
parent75c08916b02ac87066f6b7a5549f3f72d757ee86
Update documentation of what a "section" is

There are so many slightly different understandings of what a
"section" is or can be. I'm aware the documentation was improved
just a few weeks ago. I still find it incomplete and confusing.

1. I renamed it to $sectionId to make it more clear what it
really is.

2. Sections are usually numbers. 0, 1 and so on. There is no
reason to disallow the use of ints or even floats (this works
because the string representation of 0.0 is "0"). The code never
disallowed numbers.

3. 'T1' never was supported, as far as I can tell. 'T-1' is
supported. See Parser::extractSections().

4. null and false and '' all mean "the whole page" in
WikiPage::replaceSectionAtRev() but for some reason this meaning got
lost in WikitextContent::replaceSection(). I made it the same again.

Change-Id: Icc3997722d2ed742bf7703cd7c06d09199225720
includes/WikiPage.php
includes/content/AbstractContent.php
includes/content/Content.php
includes/content/WikitextContent.php
includes/htmlform/HTMLForm.php
includes/parser/Parser.php
languages/LanguageConverter.php