diff --git a/author.php b/author.php index abaa480..7dc8927 100644 --- a/author.php +++ b/author.php @@ -53,7 +53,7 @@ order by substr (upper (sort), 1, 1)", "substr (upper (sort), 1, 1) as title, co { array_push ($entryArray, new Entry ($post->title, Author::getEntryIdByLetter ($post->title), str_format (localize("authorword", $post->count), $post->count), "text", - array ( new LinkNavigation ("?page=".parent::PAGE_AUTHORS_FIRST_LETTER."&id=". rawurlencode ($post->title))))); + array ( new LinkNavigation ("?page=".parent::PAGE_AUTHORS_FIRST_LETTER."&id=". rawurlencode ($post->title))), "", $post->count)); } return $entryArray; } @@ -78,7 +78,7 @@ order by substr (upper (sort), 1, 1)", "substr (upper (sort), 1, 1) as title, co $author = new Author ($post->id, $post->name, $post->sort); array_push ($entryArray, new Entry ($post->sort, $author->getEntryId (), str_format (localize("bookword", $post->count), $post->count), "text", - array ( new LinkNavigation ($author->getUri ())))); + array ( new LinkNavigation ($author->getUri ())), "", $post->count)); } return $entryArray; } diff --git a/test/pageTest.php b/test/pageTest.php index 325a5a0..ae0713c 100644 --- a/test/pageTest.php +++ b/test/pageTest.php @@ -91,6 +91,7 @@ class PageTest extends PHPUnit_Framework_TestCase $this->assertCount (9, $currentPage->entryArray); $this->assertEquals ("Type1", $currentPage->entryArray [6]->title); $this->assertEquals ("Alphabetical index of the 2 tags", $currentPage->entryArray [6]->content); + $this->assertEquals (2, $currentPage->entryArray [6]->numberOfElement); $config['cops_calibre_custom_column'] = array ("type2"); @@ -100,6 +101,7 @@ class PageTest extends PHPUnit_Framework_TestCase $this->assertCount (9, $currentPage->entryArray); $this->assertEquals ("Type2", $currentPage->entryArray [6]->title); $this->assertEquals ("Alphabetical index of the 3 tags", $currentPage->entryArray [6]->content); + $this->assertEquals (3, $currentPage->entryArray [6]->numberOfElement); $config['cops_calibre_custom_column'] = array ("type4"); @@ -109,6 +111,7 @@ class PageTest extends PHPUnit_Framework_TestCase $this->assertCount (9, $currentPage->entryArray); $this->assertEquals ("Type4", $currentPage->entryArray [6]->title); $this->assertEquals ("Alphabetical index of the 2 tags", $currentPage->entryArray [6]->content); + $this->assertEquals (2, $currentPage->entryArray [6]->numberOfElement); $config['cops_calibre_custom_column'] = array ("type1", "type2", "type4"); @@ -236,6 +239,7 @@ class PageTest extends PHPUnit_Framework_TestCase $this->assertEquals ("Authors", $currentPage->title); $this->assertCount (5, $currentPage->entryArray); $this->assertEquals ("C", $currentPage->entryArray [0]->title); + $this->assertEquals (1, $currentPage->entryArray [0]->numberOfElement); $this->assertFalse ($currentPage->ContainsBook ()); }