From f59c29a006318d2f2eecd048102f56b03e58fe87 Mon Sep 17 00:00:00 2001 From: star7th Date: Mon, 29 Jul 2024 20:32:37 +0800 Subject: [PATCH] bug --- .../Api/Controller/ExportController.class.php | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/server/Application/Api/Controller/ExportController.class.php b/server/Application/Api/Controller/ExportController.class.php index c6f18e147..9a11f8dca 100644 --- a/server/Application/Api/Controller/ExportController.class.php +++ b/server/Application/Api/Controller/ExportController.class.php @@ -52,13 +52,23 @@ public function word() if ($cat_id == $value2['cat_id']) { $pages = $value2['pages']; $catalogs = $value2['catalogs']; - } - } - if ($value2['catalogs']) { - foreach ($value2['catalogs'] as $key3 => $value3) { - if ($cat_id == $value3['cat_id']) { - $pages = $value3['pages']; - $catalogs = $value3['catalogs']; + } else { + if ($value2['catalogs']) { + foreach ($value2['catalogs'] as $key3 => $value3) { + if ($cat_id == $value3['cat_id']) { + $pages = $value3['pages']; + $catalogs = $value3['catalogs']; + } else { + if ($value3['catalogs']) { + foreach ($value3['catalogs'] as $key4 => $value4) { + if ($cat_id == $value4['cat_id']) { + $pages = $value4['pages']; + $catalogs = $value4['catalogs']; + } + } + } + } + } } } }