|
|
|
@ -17,10 +17,11 @@ class ApiUserQuestsGetNotification extends ApiBase {
|
|
|
|
|
$this->dieWithError('apierror-mustbeloggedin-generic', 'login-required');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$sesssionManager = SessionManager::getGlobalSession();
|
|
|
|
|
if ($sesssionManager->exists(QuestsUtils::SESSION_KEY_QUEST_COMPLETE_NOTIFICATION)) {
|
|
|
|
|
$notificationData = $sesssionManager->get(QuestsUtils::SESSION_KEY_QUEST_COMPLETE_NOTIFICATION);
|
|
|
|
|
$sessionManager = SessionManager::getGlobalSession();
|
|
|
|
|
if ($sessionManager->exists(QuestsUtils::SESSION_KEY_QUEST_COMPLETE_NOTIFICATION)) {
|
|
|
|
|
$notificationData = $sessionManager->get(QuestsUtils::SESSION_KEY_QUEST_COMPLETE_NOTIFICATION);
|
|
|
|
|
$this->getResult()->addValue(['userquestsgetnotification'], 'notification', $notificationData);
|
|
|
|
|
$sessionManager->remove(QuestsUtils::SESSION_KEY_QUEST_COMPLETE_NOTIFICATION);
|
|
|
|
|
} else {
|
|
|
|
|
$this->getResult()->addValue(['userquestsgetnotification'], 'notification', null);
|
|
|
|
|
}
|
|
|
|
|