Skip to content

Commit

Permalink
Two first chapters having the same id (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grandt committed Feb 21, 2016
1 parent 944420b commit 09c94c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/PHPePub/Core/EPub.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ private function setUp() {
$this->ncx = new Ncx(null, null, null, $this->languageCode, $this->writingDirection);
$this->opf = new Opf();

$this->chapterCount = 0;

$this->ncx->setBook($this);
}

Expand Down Expand Up @@ -959,7 +961,7 @@ private function initialize() {
$this->ncx->setVersion($this->bookVersion);
$this->opf->setVersion($this->bookVersion);
$this->opf->addItem("ncx", "book.ncx", Ncx::MIMETYPE);
$this->chapterCount = 0;
// $this->chapterCount = 0;

$this->ncx->setLanguageCode($this->languageCode);
$this->ncx->setWritingDirection($this->writingDirection);
Expand Down

0 comments on commit 09c94c6

Please sign in to comment.