Loading src/Helpers/Builds.php +17 −7 Original line number Diff line number Diff line Loading @@ -182,7 +182,7 @@ // Get the file list and parse it $files = scandir($dir); if (count($files) > 2) { $all_builds = array(); foreach ($files as $file) { // Skip all files except for the ones that match the pattern // filename starting with e- and ending with .zip are considered as valid files Loading @@ -204,17 +204,27 @@ } else { $build = new Build($file, $dir, $this->logger, $shouldDisplayPatch); } if ($build->includeInResults($this->postData['params'], $this->currenteOSVersion)) { array_push($this->builds, $build); } array_push($all_builds, $build); $sourceIncremental = isset($this->postData['params']['source_incremental']) ? $this->postData['params']['source_incremental'] : NULL; if ($build->isValid($this->postData['params']) && $sourceIncremental && strcmp($sourceIncremental, $build->getIncremental()) === 0) { $this->currentBuild = $build; $this->logger->info($build->getIncremental().' is the current build'); if($this->currenteOSVersion === -1){ //get current version from build.prop $this->currenteOSVersion = $this->currentBuild->getVersion(); } } } $this->logger->debug('Current version: '.$this->currenteOSVersion); foreach ($all_builds as $build){ if ($build->includeInResults($this->postData['params'], $this->currenteOSVersion)) { array_push($this->builds, $build); } } } $this->logger->debug('Total execution time of getBuilds in seconds'); } Loading Loading
src/Helpers/Builds.php +17 −7 Original line number Diff line number Diff line Loading @@ -182,7 +182,7 @@ // Get the file list and parse it $files = scandir($dir); if (count($files) > 2) { $all_builds = array(); foreach ($files as $file) { // Skip all files except for the ones that match the pattern // filename starting with e- and ending with .zip are considered as valid files Loading @@ -204,17 +204,27 @@ } else { $build = new Build($file, $dir, $this->logger, $shouldDisplayPatch); } if ($build->includeInResults($this->postData['params'], $this->currenteOSVersion)) { array_push($this->builds, $build); } array_push($all_builds, $build); $sourceIncremental = isset($this->postData['params']['source_incremental']) ? $this->postData['params']['source_incremental'] : NULL; if ($build->isValid($this->postData['params']) && $sourceIncremental && strcmp($sourceIncremental, $build->getIncremental()) === 0) { $this->currentBuild = $build; $this->logger->info($build->getIncremental().' is the current build'); if($this->currenteOSVersion === -1){ //get current version from build.prop $this->currenteOSVersion = $this->currentBuild->getVersion(); } } } $this->logger->debug('Current version: '.$this->currenteOSVersion); foreach ($all_builds as $build){ if ($build->includeInResults($this->postData['params'], $this->currenteOSVersion)) { array_push($this->builds, $build); } } } $this->logger->debug('Total execution time of getBuilds in seconds'); } Loading