This commit is contained in:
Sébastien Lucas 2013-12-09 09:16:37 +01:00
parent d6d63e7ee3
commit 2a20fa688e
3 changed files with 5 additions and 5 deletions

View File

@ -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) {

View File

@ -245,4 +245,4 @@
* - tag
* - publisher
*/
$config ['cops_ingored_search_scope'] = array ();
$config ['cops_ignored_search_scope'] = array ();

View File

@ -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 ();