From d9f8d41032657938a054aeb4cf62cbac3e056747 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 30 Jan 2013 21:18:17 +0000 Subject: [PATCH] Added missing array elements for tag filter --- application/hub/main/filter/class_BaseHubFilter.php | 3 +++ .../class_PackageRequestNodeListAnswerTagFilter.php | 3 ++- application/hub/main/package/class_NetworkPackage.php | 9 ++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/application/hub/main/filter/class_BaseHubFilter.php b/application/hub/main/filter/class_BaseHubFilter.php index fd8d07fee..3653afbd9 100644 --- a/application/hub/main/filter/class_BaseHubFilter.php +++ b/application/hub/main/filter/class_BaseHubFilter.php @@ -62,6 +62,9 @@ class BaseHubFilter extends BaseFilter { // And render the XML content (aka message) $templateInstance->renderXmlContent($messageContent); + // Debug message + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput(str_replace('_', '-', strtoupper($messageType)) . '-TAG: Handling ' . strlen($messageContent) . ' bytes: ' . $messageContent); + /* * The template system now stores all required data as 'general' * variables, so simply get them. If there is an invalid XML node diff --git a/application/hub/main/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php b/application/hub/main/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php index 7b3e0cb8e..bca37da04 100644 --- a/application/hub/main/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php +++ b/application/hub/main/filter/tags/answer/class_PackageRequestNodeListAnswerTagFilter.php @@ -33,7 +33,8 @@ class PackageRequestNodeListAnswerTagFilter extends BaseNodeFilter implements Fi // Init array $this->dataXmlNodes = array( - //XmlRequestNodeListAnswerTemplateEngine::ANNOUNCEMENT_DATA_ANSWER_STATUS => '', + XmlRequestNodeListAnswerTemplateEngine::REQUEST_DATA_SESSION_ID => '', + XmlRequestNodeListAnswerTemplateEngine::REQUEST_DATA_NODE_LIST => '', ); } diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index bf07071e0..b00ba909f 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -1118,12 +1118,15 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R // Get it from the stacker, it is the full array with the processed message $messageArray = $this->getStackerInstance()->popNamed(self::STACKER_NAME_PROCESSED_MESSAGE); - // Create a handler instance from given message type - $handlerInstance = MessageTypeHandlerFactory::createMessageTypeHandlerInstance($messageArray[self::MESSAGE_ARRAY_TYPE]); - // Add type for later easier handling $messageArray[self::MESSAGE_ARRAY_DATA][self::MESSAGE_ARRAY_TYPE] = $messageArray[self::MESSAGE_ARRAY_TYPE]; + // Debug message + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE: messageArray=' . print_r($messageArray, true)); + + // Create a handler instance from given message type + $handlerInstance = MessageTypeHandlerFactory::createMessageTypeHandlerInstance($messageArray[self::MESSAGE_ARRAY_TYPE]); + // Handle message data $handlerInstance->handleMessageData($messageArray[self::MESSAGE_ARRAY_DATA], $this); } -- 2.39.5