Filip has uploaded a new change for review. ( 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, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/QuizGame refs/changes/86/333386/1 diff --git a/QuestionGameHome.body.php b/QuestionGameHome.body.php index 36096ea..f68e67d 100644 --- a/QuestionGameHome.body.php +++ b/QuestionGameHome.body.php @@ -52,6 +52,10 @@ return false; } + 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..fc4f144 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": "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 a8476b8..c9ecf41 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -11,6 +11,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", + "quizgame-error-socialprofile": "Error message shown when SocialProfle extension is not installed.", + "quizgame-error-socialprofile-title": "Title for `quizgame-error-socialprofile`.", "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: newchange Gerrit-Change-Id: I85e3cdb630c9cf6c13fc2611f25e9abe0fcff056 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/QuizGame Gerrit-Branch: master Gerrit-Owner: Filip <r...@protonmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits