MediaWiki
REL1_39
BadTitleError.php
Go to the documentation of this file.
1
<?php
34
class
BadTitleError
extends
ErrorPageError
{
42
public
function
__construct
(
$msg
=
'badtitletext'
,
$params
= [] ) {
43
if
(
$msg
instanceof
MalformedTitleException
) {
44
$errorMessage =
$msg
->getErrorMessage();
45
if
( !$errorMessage ) {
46
parent::__construct(
'badtitle'
,
'badtitletext'
, [] );
47
}
else
{
48
$errorMessageParams =
$msg
->getErrorMessageParameters();
49
parent::__construct(
'badtitle'
, $errorMessage, $errorMessageParams );
50
}
51
}
else
{
52
parent::__construct(
'badtitle'
,
$msg
,
$params
);
53
}
54
}
55
59
public
function
report
( $action = self::SEND_OUTPUT ) {
60
global
$wgOut
;
61
$wgOut
->setStatusCode( 404 );
62
parent::report( $action );
63
}
64
}
$wgOut
if(!defined( 'MW_NO_SESSION') &&! $wgCommandLineMode $wgOut
Definition
Setup.php:497
BadTitleError
Show an error page on a badtitle.
Definition
BadTitleError.php:34
BadTitleError\__construct
__construct( $msg='badtitletext', $params=[])
Definition
BadTitleError.php:42
BadTitleError\report
report( $action=self::SEND_OUTPUT)
to override
Definition
BadTitleError.php:59
ErrorPageError
An error page which can definitely be safely rendered using the OutputPage.
Definition
ErrorPageError.php:30
ErrorPageError\$msg
$msg
Definition
ErrorPageError.php:33
ErrorPageError\$params
$params
Definition
ErrorPageError.php:33
MalformedTitleException
MalformedTitleException is thrown when a TitleParser is unable to parse a title string.
Definition
MalformedTitleException.php:26
includes
exception
BadTitleError.php
Generated on Mon Dec 2 2024 06:23:02 for MediaWiki by
1.10.0