From 8e71db21a2c0d6f41c9af8f6bfcfbf4bc8c97930 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 17 Aug 2012 21:20:23 +0000 Subject: [PATCH] Added two generic elements to node-list table --- .../database/wrapper/node/class_NodeListDatabaseWrapper.php | 4 ++++ .../handler/answer-status/class_BaseAnserStatusHandler.php | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/application/hub/main/database/wrapper/node/class_NodeListDatabaseWrapper.php b/application/hub/main/database/wrapper/node/class_NodeListDatabaseWrapper.php index f5f860ab8..8b55018a1 100644 --- a/application/hub/main/database/wrapper/node/class_NodeListDatabaseWrapper.php +++ b/application/hub/main/database/wrapper/node/class_NodeListDatabaseWrapper.php @@ -25,6 +25,10 @@ class NodeListDatabaseWrapper extends BaseDatabaseWrapper implements NodeListWra // Table names const DB_TABLE_NODE_LIST = 'node_list'; + // Table columns + const DB_COLUMN_ANSWER_STATUS = 'last_answer_status'; + const DB_COLUMN_MESSAGE_TYPE = 'last_message_type'; + // Other constants const INVALID_IP_PORT = 'invalid:invalid'; diff --git a/application/hub/main/handler/answer-status/class_BaseAnserStatusHandler.php b/application/hub/main/handler/answer-status/class_BaseAnserStatusHandler.php index 93d24ed21..3d579a0f0 100644 --- a/application/hub/main/handler/answer-status/class_BaseAnserStatusHandler.php +++ b/application/hub/main/handler/answer-status/class_BaseAnserStatusHandler.php @@ -66,7 +66,9 @@ class BaseAnserStatusHandler extends BaseHandler { * @return void */ public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) { - die(__METHOD__.chr(10)); + // Add some generic data all messageData arrays provide + $dataSetInstance->addCriteria(NodeListDatabaseWrapper::DB_COLUMN_ANSWER_STATUS, $messageData[XmlAnnouncementAnswerTemplateEngine::ANNOUNCEMENT_DATA_ANSWER_STATUS]); + $dataSetInstance->addCriteria(NodeListDatabaseWrapper::DB_COLUMN_MESSAGE_TYPE , $messageData[NetworkPackage::MESSAGE_ARRAY_TYPE]); } } -- 2.39.5