From 43ffe9ff7730d835d627c9121a878d490cf4e478 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 22 Feb 2013 00:59:32 +0000 Subject: [PATCH] Remember searchInstance here --- application/hub/main/nodes/class_BaseHubNode.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/application/hub/main/nodes/class_BaseHubNode.php b/application/hub/main/nodes/class_BaseHubNode.php index 3a70b2959..1819c95bb 100644 --- a/application/hub/main/nodes/class_BaseHubNode.php +++ b/application/hub/main/nodes/class_BaseHubNode.php @@ -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()); } } -- 2.39.5