Bug fix
This commit is contained in:
parent
93264e75ac
commit
0a23b3dae3
@ -39,13 +39,13 @@ class ReferenceController extends AbstractController
|
|||||||
|
|
||||||
$bible = self::$emi->getRepository(Bible::class)->findRange($bible, [$passage_start, $passage_end]);
|
$bible = self::$emi->getRepository(Bible::class)->findRange($bible, [$passage_start, $passage_end]);
|
||||||
$passage = "{$passage_start}-{$passage_end}";
|
$passage = "{$passage_start}-{$passage_end}";
|
||||||
$label = "{$bible[0]->getLabel()} {$bible[0]->getChapter()}:{$passage}";
|
$label = "{$bible[0]->getLabel()}\n{$bible[0]->getChapter()}:{$passage}";
|
||||||
} elseif (is_int($passage)) {
|
} elseif (is_int($passage)) {
|
||||||
$bible = self::$emi->getRepository(Bible::class)->findBy(['book' => $book, 'chapter' => $chapter, 'verse' => $passage]);
|
$bible = self::$emi->getRepository(Bible::class)->findBy(['book' => $book, 'chapter' => $chapter, 'verse' => $passage]);
|
||||||
$label = "{$bible[0]->getLabel()} {$bible[0]->getChapter()}:{$passage}";
|
$label = "{$bible[0]->getLabel()}\n{$bible[0]->getChapter()}:{$passage}";
|
||||||
} elseif ($passage === false) {
|
} elseif ($passage === false) {
|
||||||
$bible = self::$emi->getRepository(Bible::class)->findBy(['book' => $book, 'chapter' => $chapter]);
|
$bible = self::$emi->getRepository(Bible::class)->findBy(['book' => $book, 'chapter' => $chapter]);
|
||||||
$label = "{$bible[0]->getLabel()} {$bible[0]->getChapter()}";
|
$label = "{$bible[0]->getLabel()}\n{$bible[0]->getChapter()}";
|
||||||
|
|
||||||
$passage = null;
|
$passage = null;
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ class Bible implements JsonSerializable
|
|||||||
$book = "{$tmp[0]}";
|
$book = "{$tmp[0]}";
|
||||||
|
|
||||||
if(count($tmp) > 2) {
|
if(count($tmp) > 2) {
|
||||||
$book = "{$tmp[0]}{$tmp[1]}";
|
$book = "{$tmp[0]} {$tmp[1]}";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $book;
|
return $book;
|
||||||
|
Loading…
Reference in New Issue
Block a user