mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 14:56:07 +00:00
Checking in fallback patch, plus the removal of the if-else that rhelmer spotted earlier. See bug 344742.
This commit is contained in:
parent
f2a1a681f6
commit
531eaaedc2
@ -175,6 +175,22 @@ class Patch extends AUS_Object {
|
||||
return true;
|
||||
}
|
||||
|
||||
// If our channel matches our regexp for fallback channels, let's try to fallback.
|
||||
if (preg_match('/^\w+\-cck\-\w+$/',$channel)) {
|
||||
|
||||
// Partner fallback channel to be used if the partner-specific update doesn't exist or work.
|
||||
$buf = array();
|
||||
$buf = split('-cck-',$channel);
|
||||
$fallbackChannel = $buf[0];
|
||||
|
||||
// Do a check for the fallback update. If we find a valid fallback update, we can offer it.
|
||||
if (!empty($fallbackChannel) && $this->setPath($product,$platform,$locale,$version,$build,3,$fallbackChannel) && file_exists($this->path) && filesize($this->path) > 0) {
|
||||
$this->setSnippet($this->path);
|
||||
$this->setVar('isPatch',true,true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Determine the branch of the client's version.
|
||||
$branchVersion = $this->getBranch($version);
|
||||
|
||||
@ -195,7 +211,7 @@ class Patch extends AUS_Object {
|
||||
|
||||
|
||||
// Otherwise, check for the partial snippet info. If an update exists, pass it along.
|
||||
elseif ($this->isPartial() && $this->isNightlyChannel($channel) && $this->setPath($product,$platform,$locale,$branchVersion,$build,2,$channel) && file_exists($this->path) && filesize($this->path) > 0) {
|
||||
if ($this->isPartial() && $this->isNightlyChannel($channel) && $this->setPath($product,$platform,$locale,$branchVersion,$build,2,$channel) && file_exists($this->path) && filesize($this->path) > 0) {
|
||||
$this->setSnippet($this->path);
|
||||
$this->setVar('isPatch',true,true);
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user