Loading src/Helpers/Build.php +2 −1 Original line number Original line Diff line number Diff line Loading @@ -209,7 +209,8 @@ $tmp = explode(" ", file_get_contents($path . '.md5sum')); $tmp = explode(" ", file_get_contents($path . '.md5sum')); $ret = $tmp[0]; $ret = $tmp[0]; } elseif ($this->commandExists('md5sum')) { } elseif ($this->commandExists('md5sum')) { exec('md5sum ' . $path. ' > '.$path.'.md5sum'); $dir = rtrim($path, $this->filename); exec("cd $dir && md5sum " . $this->filename. ' > '.$path.'.md5sum'); $tmp = explode(" ", file_get_contents($path . '.md5sum')); $tmp = explode(" ", file_get_contents($path . '.md5sum')); $ret = $tmp[0]; $ret = $tmp[0]; } else { } else { Loading src/Helpers/Builds.php +23 −32 Original line number Original line Diff line number Diff line Loading @@ -176,19 +176,11 @@ if (count($files) > 2) { if (count($files) > 2) { foreach ($files as $file) { foreach ($files as $file) { $filename = pathinfo($file, PATHINFO_FILENAME); // Skip all files except for the ones that match the pattern // filename starting with e- and ending with .zip are considered as valid files if (preg_match("/IMG/i", $filename)) { if (!preg_match("/^e-[0-9\.]+-(.*)-$device\.zip$/i", $file)) { continue; } if (preg_match("/latest/i", $filename)) { continue; continue; } } $extension = pathinfo($file, PATHINFO_EXTENSION); if ($extension == 'zip') { $build = null; $build = null; // If APC is enabled // If APC is enabled Loading Loading @@ -216,7 +208,6 @@ } } } } } } } $this->logger->debug('Total execution time of getBuilds in seconds'); $this->logger->debug('Total execution time of getBuilds in seconds'); } } Loading Loading
src/Helpers/Build.php +2 −1 Original line number Original line Diff line number Diff line Loading @@ -209,7 +209,8 @@ $tmp = explode(" ", file_get_contents($path . '.md5sum')); $tmp = explode(" ", file_get_contents($path . '.md5sum')); $ret = $tmp[0]; $ret = $tmp[0]; } elseif ($this->commandExists('md5sum')) { } elseif ($this->commandExists('md5sum')) { exec('md5sum ' . $path. ' > '.$path.'.md5sum'); $dir = rtrim($path, $this->filename); exec("cd $dir && md5sum " . $this->filename. ' > '.$path.'.md5sum'); $tmp = explode(" ", file_get_contents($path . '.md5sum')); $tmp = explode(" ", file_get_contents($path . '.md5sum')); $ret = $tmp[0]; $ret = $tmp[0]; } else { } else { Loading
src/Helpers/Builds.php +23 −32 Original line number Original line Diff line number Diff line Loading @@ -176,19 +176,11 @@ if (count($files) > 2) { if (count($files) > 2) { foreach ($files as $file) { foreach ($files as $file) { $filename = pathinfo($file, PATHINFO_FILENAME); // Skip all files except for the ones that match the pattern // filename starting with e- and ending with .zip are considered as valid files if (preg_match("/IMG/i", $filename)) { if (!preg_match("/^e-[0-9\.]+-(.*)-$device\.zip$/i", $file)) { continue; } if (preg_match("/latest/i", $filename)) { continue; continue; } } $extension = pathinfo($file, PATHINFO_EXTENSION); if ($extension == 'zip') { $build = null; $build = null; // If APC is enabled // If APC is enabled Loading Loading @@ -216,7 +208,6 @@ } } } } } } } $this->logger->debug('Total execution time of getBuilds in seconds'); $this->logger->debug('Total execution time of getBuilds in seconds'); } } Loading