Provide detailed information about invalid titles
authorBartosz Dziewoński <matma.rex@gmail.com>
Sat, 25 Apr 2015 22:43:37 +0000 (00:43 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 30 Apr 2015 21:50:07 +0000 (23:50 +0200)
commit708918ccbf7ecae70dbf077d7460787d35993f5e
tree68f854b652814990ab886c82b8e96e04c59365c6
parent89cf404ec42dd2ae356166b6fe0b7bdb76d3eca9
Provide detailed information about invalid titles

includes/Title.php
* The private method Title::secureAndSplit() now throws a
  MalformedTitleException instead of returning false on invalid
  titles.
* Added Title::newFromTextThrow(), which behaves exactly like
  Title::newFromText() but throws MalformedTitleException instead of
  returning null on invalid titles.

includes/title/MediaWikiTitleCodec.php
* Provide more information with the thrown MalformedTitleExceptions.

includes/MediaWiki.php
* Use the new Title::newFromTextThrow() to get detailed error
  information, display it.

Change-Id: I4da8ecb457a77473e32d745ba48ab8505b35e45f
includes/MediaWiki.php
includes/Title.php
includes/exception/BadTitleError.php
includes/title/MalformedTitleException.php
includes/title/MediaWikiTitleCodec.php
languages/i18n/en.json
languages/i18n/qqq.json
tests/phpunit/includes/TitleTest.php