Send the header only once .... not proud about it. re #34

This commit is contained in:
Sébastien Lucas 2013-10-13 22:00:35 +02:00
parent 62a3aead5b
commit 1e51f11c6d

View file

@ -592,7 +592,6 @@ function getJson ($complete = false) {
"tag" => $arrayTag) as $key => $array) {
$i = 0;
$pagequery = Base::PAGE_OPENSEARCH_QUERY;
foreach ($array as $entry) {
if (count($array) > 0) {
// Comment to help the perl i18n script
// str_format (localize("bookword", count($array))
@ -603,6 +602,7 @@ function getJson ($complete = false) {
"class" => "tt-header",
"navlink" => "index.php?page={$pagequery}&query={$query}&db={$database}&scope={$key}"));
}
foreach ($array as $entry) {
if ($entry instanceof EntryBook) {
array_push ($out, array ("class" => "", "title" => $entry->title, "navlink" => $entry->book->getDetailUrl ()));
} else {