From fc3fa2026de9d11498437a83dcc3183bb144638a Mon Sep 17 00:00:00 2001 From: glaisher Date: Sun, 10 May 2015 21:45:13 +0500 Subject: [PATCH] Show a valid error when ContactPage is configured incorrectly Bug: T75697 Change-Id: Ia3b0183c268354a46ea1a03eacffc58bd049a332 --- ContactPage_body.php | 2 +- i18n/en.json | 4 +++- i18n/qqq.json | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ContactPage_body.php b/ContactPage_body.php index 29e1ea3..d3d91de 100644 --- a/ContactPage_body.php +++ b/ContactPage_body.php @@ -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; } diff --git a/i18n/en.json b/i18n/en.json index e92938d..e1ca39e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -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." } diff --git a/i18n/qqq.json b/i18n/qqq.json index 1f25237..abea85d 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -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." }