Show a valid error when ContactPage is configured incorrectly

Bug: T75697
Change-Id: Ia3b0183c268354a46ea1a03eacffc58bd049a332
This commit is contained in:
glaisher 2015-05-10 21:45:13 +05:00
parent ec95572cb2
commit fc3fa2026d
3 changed files with 7 additions and 3 deletions

View File

@ -75,7 +75,7 @@ class SpecialContact extends UnlistedSpecialPage {
$config = $this->getTypeConfig();
if( !$config['RecipientUser'] ) {
$this->getOutput()->showErrorPage( 'nosuchspecialpage', 'nospecialpagetext' );
$this->getOutput()->showErrorPage( 'contactpage-config-error-title', 'contactpage-config-error' );
return;
}

View File

@ -18,5 +18,7 @@
"contactpage-formfootnotes": "(needed if you want an answer)",
"contactpage-includeip": "Include my IP address in this message.",
"contactpage-usermailererror": "Mail object returned error:",
"contactpage-captcha-error": "CAPTCHA error"
"contactpage-captcha-error": "CAPTCHA error",
"contactpage-config-error-title": "Contact form error",
"contactpage-config-error": "A contact form is either not configured for this page or is configured incorrectly."
}

View File

@ -23,5 +23,7 @@
"contactpage-formfootnotes": "Message to notify users that an email address is needed if an answer is required",
"contactpage-includeip": "Used as checkbox label in the ContactPage form.",
"contactpage-usermailererror": "Error message displayed when no email could be sent by the MediWiki UserMailer script.",
"contactpage-captcha-error": "Error message displayed when there was a CAPTCHA error (i.e. the user failed to enter the correct CAPTCHA, or didn't enter one at all, etc.)"
"contactpage-captcha-error": "Error message displayed when there was a CAPTCHA error (i.e. the user failed to enter the correct CAPTCHA, or didn't enter one at all, etc.)",
"contactpage-config-error-title": "Page title of Special:Contact when the requested form is configured incorrectly.",
"contactpage-config-error": "Used as the content of Special:Contact when the requested form is configured incorrectly."
}