Added isPatch declaration back in, renamed isNewBuild to isNewerBuild and simplified its return statement based on conversation with preed. See bug 357892.

This commit is contained in:
mike.morgan%oregonstate.edu 2006-11-01 01:01:16 +00:00
Родитель 5873a96e26
Коммит 6ef8a78506
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -65,6 +65,9 @@ class Patch extends AUS_Object {
// Array the defines which channels are flagged as 'nightly' channels.
var $nightlyChannels;
// Valid patch flag.
var $isPatch;
// Is this patch a complete or partial patch?
var $patchType;
@ -284,8 +287,8 @@ class Patch extends AUS_Object {
* @param string $build
* @return boolean
*/
function isNewBuild($build) {
return ($this->build>$build) ? true : false;
function isNewerBuild($build) {
return ($this->build>$build);
}
/**
@ -355,12 +358,12 @@ class Patch extends AUS_Object {
// For nightlies, we only want to deliver the complete patch if the destination build is newer than the client build.
if ($this->isNightlyChannel($channel) && $this->isComplete()) {
return $this->isNewBuild($build);
return $this->isNewerBuild($build);
}
// For nightlies, we only want to deliver the partial patch if the destination build for the partial patch is equal to the build in the complete patch (which will always point to the latest).
elseif ($this->isNightlyChannel($channel) && $this->isPartial()) {
return $this->isNewBuild($build);
return $this->isNewerBuild($build);
} else {
return $this->isPatch;
}