diff --git a/Mage/Task/BuiltIn/Releases/RollbackTask.php b/Mage/Task/BuiltIn/Releases/RollbackTask.php
index 3f053d7..e5b845d 100644
--- a/Mage/Task/BuiltIn/Releases/RollbackTask.php
+++ b/Mage/Task/BuiltIn/Releases/RollbackTask.php
@@ -23,12 +23,6 @@ use Mage\Task\Releases\RollbackAware;
*/
class RollbackTask extends AbstractTask implements IsReleaseAware
{
- /**
- * The Relase ID to Rollback To
- * @var integer
- */
- protected $release = null;
-
/**
* (non-PHPdoc)
* @see \Mage\Task\AbstractTask::getName()
@@ -38,24 +32,13 @@ class RollbackTask extends AbstractTask implements IsReleaseAware
return 'Rollback release [built-in]';
}
- /**
- * Sets the Release ID to Rollback To
- * @param integer $releaseId
- * @return \Mage\Task\BuiltIn\Releases\RollbackTask
- */
- public function setRelease($releaseId)
- {
- $this->release = $releaseId;
- return $this;
- }
-
/**
* Gets the Release ID to Rollback To
* @return integer
*/
- public function getRelease()
+ public function getReleaseId()
{
- return $this->release;
+ return $this->getConfig()->getReleaseId();
}
/**
@@ -79,25 +62,25 @@ class RollbackTask extends AbstractTask implements IsReleaseAware
rsort($releases);
$releaseIsAvailable = false;
- if ($this->getRelease() == '') {
+ if ($this->getReleaseId() == '') {
$releaseId = $releases[0];
$releaseIsAvailable = true;
- } else if ($this->getRelease() <= 0) {
- $index = $this->getRelease() * -1;
+ } else if ($this->getReleaseId() <= 0) {
+ $index = $this->getReleaseId() * -1;
if (isset($releases[$index])) {
$releaseId = $releases[$index];
$releaseIsAvailable = true;
}
} else {
- if (in_array($this->getRelease(), $releases)) {
- $releaseId = $this->getRelease();
+ if (in_array($this->getReleaseId(), $releases)) {
+ $releaseId = $this->getReleaseId();
$releaseIsAvailable = true;
}
}
if (!$releaseIsAvailable) {
- Console::output('Release ' . $this->getRelease() . ' is invalid or unavailable for ' . $this->getConfig()->getHost() . ' ... FAIL');
+ Console::output('Release ' . $this->getReleaseId() . ' is invalid or unavailable for ' . $this->getConfig()->getHost() . ' ... FAIL');
} else {
Console::output('Rollback release on ' . $this->getConfig()->getHost() . '');