summaryrefslogtreecommitdiff
path: root/includes/exception/UserNotLoggedIn.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-06-04 07:31:04 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-06-04 07:58:39 +0200
commitf6d65e533c62f6deb21342d4901ece24497b433e (patch)
treef28adf0362d14bcd448f7b65a7aaf38650f923aa /includes/exception/UserNotLoggedIn.php
parentc27b2e832fe25651ef2410fae85b41072aae7519 (diff)
Update to MediaWiki 1.25.1
Diffstat (limited to 'includes/exception/UserNotLoggedIn.php')
-rw-r--r--includes/exception/UserNotLoggedIn.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/exception/UserNotLoggedIn.php b/includes/exception/UserNotLoggedIn.php
index 03ba0b20..02fca3d8 100644
--- a/includes/exception/UserNotLoggedIn.php
+++ b/includes/exception/UserNotLoggedIn.php
@@ -25,8 +25,9 @@
* 'exception-nologin' as a title and 'exception-nologin-text' for the message.
*
* @note In order for this exception to redirect, the error message passed to the
- * constructor has to be explicitly added to LoginForm::validErrorMessages. Otherwise,
- * the user will just be shown the message rather than redirected.
+ * constructor has to be explicitly added to LoginForm::validErrorMessages or with
+ * the LoginFormValidErrorMessages hook. Otherwise, the user will just be shown the message
+ * rather than redirected.
*
* @par Example:
* @code
@@ -52,7 +53,8 @@
class UserNotLoggedIn extends ErrorPageError {
/**
- * @note The value of the $reasonMsg parameter must be put into LoginForm::validErrorMessages
+ * @note The value of the $reasonMsg parameter must be put into LoginForm::validErrorMessages or
+ * set with the LoginFormValidErrorMessages Hook.
* if you want the user to be automatically redirected to the login form.
*
* @param string $reasonMsg A message key containing the reason for the error.
@@ -77,7 +79,7 @@ class UserNotLoggedIn extends ErrorPageError {
public function report() {
// If an unsupported message is used, don't try redirecting to Special:Userlogin,
// since the message may not be compatible.
- if ( !in_array( $this->msg, LoginForm::$validErrorMessages ) ) {
+ if ( !in_array( $this->msg, LoginForm::getValidErrorMessages() ) ) {
parent::report();
}