diff --git a/book.php b/book.php index c5ce672..c83c3e3 100644 --- a/book.php +++ b/book.php @@ -561,7 +561,7 @@ where data.book = books.id and data.id = ?'); $i = 0; $critArray = array (); foreach (array ("author", "tag", "series", "publisher", "book") as $key) { - if (in_array($key, $config ['cops_ingored_search_scope']) || + if (in_array($key, $config ['cops_ignored_search_scope']) || (!array_key_exists ($key, $query) && !array_key_exists ("all", $query))) { $critArray [$i] = self::BAD_SEARCH; } @@ -654,7 +654,7 @@ function getJson ($complete = false) { } foreach (array ("book", "author", "series", "tag", "publisher") as $key) { - if (in_array($key, $config ['cops_ingored_search_scope'])) { + if (in_array($key, $config ['cops_ignored_search_scope'])) { continue; } switch ($key) { diff --git a/config_default.php b/config_default.php index 48b0a57..ee31a83 100644 --- a/config_default.php +++ b/config_default.php @@ -245,4 +245,4 @@ * - tag * - publisher */ - $config ['cops_ingored_search_scope'] = array (); + $config ['cops_ignored_search_scope'] = array (); diff --git a/test/pageTest.php b/test/pageTest.php index 3b8ceb6..baf3da8 100644 --- a/test/pageTest.php +++ b/test/pageTest.php @@ -510,7 +510,7 @@ class PageTest extends PHPUnit_Framework_TestCase // Match Lewis Caroll & Scarlet $query = "car"; - $config ['cops_ingored_search_scope'] = array ("author"); + $config ['cops_ignored_search_scope'] = array ("author"); $currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage->InitializeContent (); @@ -519,7 +519,7 @@ class PageTest extends PHPUnit_Framework_TestCase $this->assertEquals ("A Study in Scarlet", $currentPage->entryArray [0]->title); $this->assertTrue ($currentPage->ContainsBook ()); - $config ['cops_ingored_search_scope'] = array (); + $config ['cops_ignored_search_scope'] = array (); $currentPage = Page::getPage ($page, $qid, $query, $n); $currentPage->InitializeContent ();