From 58e24e184923dccdfaf0fed537dda61f2b1bdf7b Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 15 Jul 2021 11:37:22 +0300 Subject: [PATCH] fix problem default category --- app/routes/books.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/routes/books.php b/app/routes/books.php index f0a2ae3..d52172e 100644 --- a/app/routes/books.php +++ b/app/routes/books.php @@ -36,11 +36,19 @@ function product_kuri($slug){ } -function category_kuri($category = 'knigi', $filter = 'all', $page = 1){ +function category_kuri($category = '', $filter = 'all', $page = 1){ - if (SUBSTATUS == 1) - $category = 'gazeta'; + if ($category == ''){ + + if (SUBSTATUS == 1){ + $category = 'gazeta'; + } + else { + $category = 'knigi'; + } + + } $cats = api_cats(); $books = api_books_kuri($category, $filter, $page);