From 303b1097a5b8cec38b95d37193cd8e4dc9b38e84 Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Mon, 18 Jun 2018 12:40:59 -0400 Subject: [PATCH] HOR-4674 --- workflow/engine/controllers/pmTablesProxy.php | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/workflow/engine/controllers/pmTablesProxy.php b/workflow/engine/controllers/pmTablesProxy.php index d9a802283..f58fb7bcd 100644 --- a/workflow/engine/controllers/pmTablesProxy.php +++ b/workflow/engine/controllers/pmTablesProxy.php @@ -926,19 +926,20 @@ class pmTablesProxy extends HttpProxyController $exportTraceback = []; foreach ($tablesToExport as $table) { + $numberRecords = 0; if ($table->_DATA) { - $tableRecord = $additionalTables->load($table->ADD_TAB_UID); $tableData = $additionalTables->getAllData($table->ADD_TAB_UID, null, null, false); - $table->ADD_TAB_NAME = $tableRecord['ADD_TAB_NAME']; - - array_push($exportTraceback, [ - 'uid' => $table->ADD_TAB_UID, - 'name' => $table->ADD_TAB_NAME, - 'num_regs' => $tableData['count'], - 'schema' => $table->_SCHEMA ? 'yes' : 'no', - 'data' => $table->_DATA ? 'yes' : 'no' - ]); + $numberRecords = $tableData['count']; } + $tableRecord = $additionalTables->load($table->ADD_TAB_UID); + $table->ADD_TAB_NAME = $tableRecord['ADD_TAB_NAME']; + array_push($exportTraceback, [ + 'uid' => $table->ADD_TAB_UID, + 'name' => $table->ADD_TAB_NAME, + 'num_regs' => $numberRecords, + 'schema' => $table->_SCHEMA ? 'yes' : 'no', + 'data' => $table->_DATA ? 'yes' : 'no' + ]); } $trace = "TABLE UID TABLE NAME\tREGS\tSCHEMA\tDATA\n";