jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/333386 )
Change subject: Added clear error message when SocialProfile extension is not
installed.
......................................................................
Added clear error message when SocialProfile extension is not installed.
Bug: T155405
Change-Id: I85e3cdb630c9cf6c13fc2611f25e9abe0fcff056
---
M QuestionGameHome.body.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 10 insertions(+), 0 deletions(-)
Approvals:
Jack Phoenix: Looks good to me, approved
jenkins-bot: Verified
diff --git a/QuestionGameHome.body.php b/QuestionGameHome.body.php
index 36096ea..d5f78c0 100644
--- a/QuestionGameHome.body.php
+++ b/QuestionGameHome.body.php
@@ -52,6 +52,12 @@
return false;
}
+ // https://phabricator.wikimedia.org/T155405
+ // Throws error message when SocialProfile extension is not
installed
+ if( !class_exists( 'UserStats' ) ) {
+ throw new ErrorPageError(
'quizgame-error-socialprofile-title', 'quizgame-error-socialprofile' );
+ }
+
// Blocked through Special:Block? No access for you either!
if( $user->isBlocked() ) {
throw new UserBlockedError( $user->getBlock() );
diff --git a/i18n/en.json b/i18n/en.json
index 6ef59b9..46d9de7 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -14,6 +14,8 @@
"quizgame-unflag": "Un-flag",
"quizgame-unflag-confirm": "Are you sure you want to un-flag this quiz
game?",
"quizgame-unprotect": "Unprotect",
+ "quizgame-error-socialprofile":
"[https://www.mediawiki.org/wiki/Extension:SocialProfile SocialProfile
extension] is not installed. Please install this extension and try again.",
+ "quizgame-error-socialprofile-title": "SocialProfile extension is not
installed.",
"quizgame-admin-panel-title": "Admin panel",
"quizgame-admin-back": "< Back to never ending quiz",
"quizgame-admin-flagged": "Flagged questions",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 3952ad3..1ac8318 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -13,6 +13,8 @@
"quizgame-unflag": "Link title; un-flagging returns a flagged quiz into
the pool of available quizzes, allowing users to play it again",
"quizgame-unflag-confirm": "Confirmation message shown in the un-flag
dialog",
"quizgame-unprotect": "Link title\n{{Identical|Unprotect}}",
+ "quizgame-error-socialprofile": "Error message shown when SocialProfle
extension is not installed.",
+ "quizgame-error-socialprofile-title": "Title for
<code>quizgame-error-socialprofile</code>.",
"quizgame-admin-panel-title": "Link title",
"quizgame-admin-back": "Link title on the admin panel; clicking on this
link takes you back to the question game from the administrative functions",
"quizgame-admin-flagged": "Header title on the admin panel of QuizGame",
--
To view, visit https://gerrit.wikimedia.org/r/333386
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I85e3cdb630c9cf6c13fc2611f25e9abe0fcff056
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/QuizGame
Gerrit-Branch: master
Gerrit-Owner: Filip <[email protected]>
Gerrit-Reviewer: Filip <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: SamanthaNguyen <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits