]> git.mxchange.org Git - hub.git/commitdiff
Remember searchInstance here
authorRoland Häder <roland@mxchange.org>
Fri, 22 Feb 2013 00:59:32 +0000 (00:59 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 22 Feb 2013 00:59:32 +0000 (00:59 +0000)
application/hub/main/nodes/class_BaseHubNode.php

index 3a70b2959f1af7d264f005807cc71579ff87b5c2..1819c95bbdc57c456584fb864ac97e9fb6240cec 100644 (file)
@@ -313,6 +313,9 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                $searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_TYPE, $this->getRequestInstance()->getRequestElement('mode'));
                $searchInstance->setLimit(1);
 
+               // Remember it for later usage
+               $this->setSearchInstance($searchInstance);
+
                // Get a random string
                $randomString = $this->generateRamdomString(255);
 
@@ -344,7 +347,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                                 * "tables". This allows a smooth update for the underlaying
                                 * database table.
                                 */
-                               $this->generatePrivateKeyAndHash($searchInstance);
+                               $this->generatePrivateKeyAndHash($this->getSearchInstance());
                        } else {
                                // Get the node id from result and set it
                                $this->setPrivateKey(base64_decode($this->getField(NodeInformationDatabaseWrapper::DB_COLUMN_PRIVATE_KEY)));
@@ -358,7 +361,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
                         * Generate it in a private method (no confusion with 'private
                         * method access' and 'private key' here! ;-)).
                         */
-                       $this->generatePrivateKeyAndHash($searchInstance);
+                       $this->generatePrivateKeyAndHash($this->getSearchInstance());
                }
        }