restore compatibility with iOS and Android
This commit is contained in:
@@ -305,6 +305,12 @@ class NetBiblio extends WebService
|
|||||||
throw new WebException("CallArg", "Argument must be valid JSON.", -42);
|
throw new WebException("CallArg", "Argument must be valid JSON.", -42);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The iOS and Android applications still uses 'category' instead of 'genre'
|
||||||
|
if(isset($queryArray['category']) && is_array($queryArray['category'])) {
|
||||||
|
$queryArray['genre'] = $queryArray['category'];
|
||||||
|
unset($queryArray['category']);
|
||||||
|
}
|
||||||
|
|
||||||
$bs = new BookSearch();
|
$bs = new BookSearch();
|
||||||
|
|
||||||
if (isset($queryArray['queryType'])) {
|
if (isset($queryArray['queryType'])) {
|
||||||
@@ -370,6 +376,12 @@ class NetBiblio extends WebService
|
|||||||
return AudioBook::ListOfGenres();
|
return AudioBook::ListOfGenres();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function ListOfCategories()
|
||||||
|
{
|
||||||
|
// this method exists for compatibility purpose with the Android and iOS applications
|
||||||
|
return $this->ListOfGenres();
|
||||||
|
}
|
||||||
|
|
||||||
public function ListOfTypes()
|
public function ListOfTypes()
|
||||||
{
|
{
|
||||||
return array_filter(AudioBook::listOfTypes(), function ($t) {
|
return array_filter(AudioBook::listOfTypes(), function ($t) {
|
||||||
|
|||||||
Reference in New Issue
Block a user