MWException: Fix sitename appearing twice in <title>
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 14 Mar 2014 05:02:45 +0000 (06:02 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 31 Mar 2014 18:49:54 +0000 (11:49 -0700)
commit03d4947289bffbcee0fad0a5a1480f29bcfb8bf1
tree5d147f62db91787985e9d32da192efb00c759718
parent6fc8831652d47c688612b077db0a315e03e512ce
MWException: Fix sitename appearing twice in <title>

The MWException::getPageTitle method is wrapping the page title
in the 'pagetitle' ($1 - sitename) message, but OutputPage does
this as well when outputing <title>.

OutputPage::prepareErrorPage takes the first parameter as page
title (unwrapped, appears in <h1>,) and the second optional one
is for <title>, which (if omitted, like before) results in
pagetitle being applied by OutputPage.

Now that we specify them separately, this also removes the
sitename from the <h1> on the page, which always looked weird.

It also fixes DBQueryError (extends MWException) where previously
no sitename was added, it just returns 'databaseerror' from
its DBQueryError::getPageTitle() method.

Change-Id: I85d65d89e72b4497a050f440524ff6f959518b88
includes/exception/MWException.php