]> git.mxchange.org Git - hub.git/commitdiff
No node_ prefix as it makes session id look-ups invalid
authorRoland Häder <roland@mxchange.org>
Tue, 12 Feb 2013 05:19:00 +0000 (05:19 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 12 Feb 2013 05:19:00 +0000 (05:19 +0000)
application/hub/main/dht/node/class_NodeDhtFacade.php
application/hub/main/handler/message-types/anouncement/class_NodeMessageAnnouncementHandler.php
application/hub/main/handler/message-types/answer/class_NodeMessageAnnouncementAnswerHandler.php
application/hub/main/handler/message-types/answer/class_NodeMessageRequestNodeListAnswerHandler.php
application/hub/main/handler/message-types/class_
application/hub/main/handler/message-types/requests/class_NodeMessageRequestNodeListHandler.php
application/hub/main/handler/message-types/self-connect/class_NodeMessageSelfConnectHandler.php

index 227c99e00e9d8c9d6ae024491e7ecd04ac440474..b71b7eaa36b8543e79d1c10c1eff2e080712a188 100644 (file)
@@ -119,7 +119,7 @@ class NodeDhtFacade extends BaseDht implements Distributable, Registerable {
                        assert(isset($messageData[$key]));
 
                        // Add criteria
-                       $searchInstance->addCriteria('node_' . str_replace('my-', '', $key), $messageData[$key]);
+                       $searchInstance->addCriteria(str_replace('my-', '', $key), $messageData[$key]);
                } // END - foreach
 
                // Only one entry is fine
index f83f7fa66c4b93b03ca3ce7371dbda0cffd1a712..f1f954c90adc2c1548a6fcfcc3decece4cb30c35 100644 (file)
@@ -116,13 +116,16 @@ class NodeMessageAnnouncementHandler extends BaseMessageHandler implements Handl
         * @return      void
         */
        public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+               // Add generic first
+               parent::addArrayToDataSet($dataSetInstance, $messageData);
+
                // Add all ements
                foreach ($this->messageDataElements as $key) {
                        // Is it there?
                        assert(isset($messageData[$key]));
 
                        // Add it
-                       $dataSetInstance->addCriteria('node_' . $key, $messageData[$key]);
+                       $dataSetInstance->addCriteria($key, $messageData[$key]);
                } // END - foreach
        }
 
index cd2db6bd297f4d7fd8484a1e5d9671d2bb3bd4e2..c0b1461dbf3a29d3ced4478692d49866eeb680d6 100644 (file)
@@ -119,6 +119,9 @@ class NodeMessageAnnouncementAnswerHandler extends BaseMessageHandler implements
         * @return      void
         */
        public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+               // Add generic first
+               parent::addArrayToDataSet($dataSetInstance, $messageData);
+
                // Add all ements
                foreach ($this->messageDataElements as $key) {
                        // Is it there?
@@ -128,7 +131,7 @@ class NodeMessageAnnouncementAnswerHandler extends BaseMessageHandler implements
                         * Add it, but remove any 'my-' prefixes as they are not used in
                         * database layer.
                         */
-                       $dataSetInstance->addCriteria('node_' . str_replace('my-', '', $key), $messageData[$key]);
+                       $dataSetInstance->addCriteria(str_replace('my-', '', $key), $messageData[$key]);
                } // END - foreach
        }
 
index e8cf9f6c374db523fa956ee86020c389273b75b7..0eaed3b517b3b4a09eb3140a1d8a883cf0c3a4f3 100644 (file)
@@ -103,6 +103,9 @@ class NodeMessageRequestNodeListAnswerHandler extends BaseMessageHandler impleme
         * @return      void
         */
        public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+               // Add generic first
+               parent::addArrayToDataSet($dataSetInstance, $messageData);
+
                // Debug message
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('ANSWER-HANDLER: messageData=' . print_r($messageData, true));
 
@@ -118,7 +121,7 @@ class NodeMessageRequestNodeListAnswerHandler extends BaseMessageHandler impleme
                         * Add it, but remove any 'my-' prefixes as they are not used in
                         * database layer.
                         */
-                       $dataSetInstance->addCriteria('node_' . str_replace('my-', '', $key), $messageData[$key]);
+                       $dataSetInstance->addCriteria(str_replace('my-', '', $key), $messageData[$key]);
                } // END - foreach
        }
 
index 98b417ed7323730f2ec290ab1a031f1c2ebc5971..d36ac50cc8aa0b64fef47dea74b30db9de55a5eb 100644 (file)
@@ -85,7 +85,7 @@ class NodeMessage???Handler extends BaseMessageHandler implements HandleableMess
                        assert(isset($messageData[$key]));
 
                        // Add it
-                       $dataSetInstance->addCriteria('node_' . $key, $messageData[$key]);
+                       $dataSetInstance->addCriteria($key, $messageData[$key]);
                } // END - foreach
        }
 
index 91678068be409996f04e65270b59ad3de9a1bcca..1c1f08b170d2f326dda20ca23b2d53bf8e9ba55a 100644 (file)
@@ -98,13 +98,16 @@ class NodeMessageRequestNodeListHandler extends BaseMessageHandler implements Ha
         * @return      void
         */
        public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+               // Add generic first
+               parent::addArrayToDataSet($dataSetInstance, $messageData);
+
                // Add all ements
                foreach ($this->messageDataElements as $key) {
                        // Is it there?
                        assert(isset($messageData[$key]));
 
                        // Add it
-                       $dataSetInstance->addCriteria('node_' . $key, $messageData[$key]);
+                       $dataSetInstance->addCriteria($key, $messageData[$key]);
                } // END - foreach
        }
 
index 81c7d830a33e8e21d807490af6cc249de682bbb6..fe8a5af72307e070953850d664217698b0bb99d2 100644 (file)
@@ -82,6 +82,9 @@ class NodeMessageSelfConnectHandler extends BaseMessageHandler implements Handle
         * @throws      UnsupportedOperationException   If this method is called
         */
        public function addArrayToDataSet (StoreableCriteria $dataSetInstance, array $messageData) {
+               // Add generic first
+               parent::addArrayToDataSet($dataSetInstance, $messageData);
+
                // Please don't call this method!
                throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }