From a1fcc93f4e89febee902c997fa18d7d3c3493416 Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 17 May 2018 20:08:59 -0400 Subject: [PATCH] Fix missing categories on admin_main export --- inc/export_functions.inc.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/inc/export_functions.inc.php b/inc/export_functions.inc.php index 9021d0b6..df272bda 100644 --- a/inc/export_functions.inc.php +++ b/inc/export_functions.inc.php @@ -30,6 +30,17 @@ function hesk_export_to_XML($sql, $export_selected = false) $admins[$row['id']] = $row['name']; } + // Get category names + if ( ! isset($my_cat)) + { + $my_cat = array(); + $res2 = hesk_dbQuery("SELECT `id`, `name` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."categories` WHERE " . hesk_myCategories('id') . " ORDER BY `cat_order` ASC"); + while ($row=hesk_dbFetchAssoc($res2)) + { + $my_cat[$row['id']] = hesk_msgToPlain($row['name'], 1); + } + } + // This will be the export directory $export_dir = HESK_PATH.$hesk_settings['cache_dir'].'/';