get next and previous Questgroups for correct Seminary (fixes #92)
This commit is contained in:
parent
980ed7d014
commit
fa2dc75be6
3 changed files with 27 additions and 24 deletions
|
|
@ -92,7 +92,7 @@
|
|||
// Only check permissions if Character has not entered Quest before
|
||||
if(!$this->Questgroups->hasCharacterEnteredQuestgroup($questgroup['id'], $character['id']))
|
||||
{
|
||||
$previousQuestgroup = $this->Questgroups->getPreviousQuestgroup($questgroup['id']);
|
||||
$previousQuestgroup = $this->Questgroups->getPreviousQuestgroup($seminary['id'], $questgroup['id']);
|
||||
if(!is_null($previousQuestgroup)) {
|
||||
if(!$this->Questgroups->hasCharacterSolvedQuestgroup($previousQuestgroup['id'], $character['id'])) {
|
||||
throw new \nre\exceptions\AccessDeniedException();
|
||||
|
|
@ -316,7 +316,6 @@
|
|||
);
|
||||
|
||||
// Upload moodpic
|
||||
var_dump($moodpic);
|
||||
if(!is_null($moodpic))
|
||||
{
|
||||
$mediaId = $this->Media->createQuestgrouppicture(
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@
|
|||
if(count($previousQuests) == 0)
|
||||
{
|
||||
// Previous Questgroup
|
||||
$previousQuestgroup = $this->Questgroups->getPreviousQuestgroup($questgroup['id']);
|
||||
$previousQuestgroup = $this->Questgroups->getPreviousQuestgroup($seminary['id'], $questgroup['id']);
|
||||
if(!is_null($previousQuestgroup) && !$this->Questgroups->hasCharacterSolvedQuestgroup($previousQuestgroup['id'], $character['id'])) {
|
||||
throw new \nre\exceptions\AccessDeniedException();
|
||||
}
|
||||
|
|
@ -309,7 +309,7 @@
|
|||
{
|
||||
if(is_null($relatedQuesttext))
|
||||
{
|
||||
$nextQuestgroup = $this->Questgroups->getNextQuestgroup($questgroup['id']);
|
||||
$nextQuestgroup = $this->Questgroups->getNextQuestgroup($seminary['id'], $questgroup['id']);
|
||||
if(!is_null($nextQuestgroup)) {
|
||||
$nextQuestgroup['hierarchy'] = $this->Questgroupshierarchy->getHierarchyForQuestgroup($nextQuestgroup['id']);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue