From faaf0551b5dbc64ea69d79481f8f08a2078994e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 21 Feb 2013 23:49:27 +0000 Subject: [PATCH] 'virigin' is now the correct state at this point --- .../hub/main/helper/dht/class_DhtBootstrapHelper.php | 4 ++-- application/hub/main/states/dht/class_BaseDhtState.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/application/hub/main/helper/dht/class_DhtBootstrapHelper.php b/application/hub/main/helper/dht/class_DhtBootstrapHelper.php index d3d797b4f..ee3afc770 100644 --- a/application/hub/main/helper/dht/class_DhtBootstrapHelper.php +++ b/application/hub/main/helper/dht/class_DhtBootstrapHelper.php @@ -81,8 +81,8 @@ class DhtBootstrapHelper extends BaseHubSystemHelper implements HelpableDht { * @return void */ public function sendPackage (Distributable $dhtInstance) { - // Sanity check: Is the dht in the approx. state? (init) - $dhtInstance->getStateInstance()->validateDhtStateIsInitialized(); + // Sanity check: Is the dht in the approx. state? (virgin) + $dhtInstance->getStateInstance()->validateDhtStateIsVirgin(); // Compile the template, this inserts the loaded dht data into the gaps. $this->getTemplateInstance()->compileTemplate(); diff --git a/application/hub/main/states/dht/class_BaseDhtState.php b/application/hub/main/states/dht/class_BaseDhtState.php index 8a1223acf..a78f9dc16 100644 --- a/application/hub/main/states/dht/class_BaseDhtState.php +++ b/application/hub/main/states/dht/class_BaseDhtState.php @@ -34,15 +34,15 @@ class BaseDhtState extends BaseState { } /** - * Validates whether the DHT state is 'init' or throws an exception if it + * Validates whether the DHT state is 'virgin' or throws an exception if it * is every other state. * * @return void - * @throws InvalidStateException If the state is not 'active' + * @throws InvalidStateException If the state is not 'virgin' */ - public function validateDhtStateIsInitialized () { + public function validateDhtStateIsVirgin () { // Just compare it... - if (!$this instanceof DhtInitState) { + if (!$this instanceof DhtVirginState) { // Throw the exception throw new InvalidStateException($this, self::EXCEPTION_INVALID_STATE); } // END - if -- 2.39.5