Merge branch 'ent-8314-no-sale-actualizacion-parche-en-update-manager-de-los-nodos' into 'develop'

allow online patches in decimal format

See merge request artica/pandorafms!4556
This commit is contained in:
Daniel Rodriguez 2021-11-30 09:21:07 +00:00
commit 23becba397
2 changed files with 3 additions and 3 deletions

View File

@ -835,7 +835,7 @@ class Client
function ($carry, $item) { function ($carry, $item) {
$matches = []; $matches = [];
if (is_array($item) !== true if (is_array($item) !== true
&& preg_match('/(\d+)\.tar/', $item, $matches) > 0 && preg_match('/([\d\.\d]+?)\.tar/', $item, $matches) > 0
) { ) {
$carry[] = [ $carry[] = [
'version' => $matches[1], 'version' => $matches[1],

View File

@ -75,8 +75,8 @@ class RepoDisk extends Repo
$this->files = []; $this->files = [];
while ($file_name = readdir($dh)) { while ($file_name = readdir($dh)) {
// Files must contain a version number. // Files must contain a version number.
if (preg_match('/(\d+)\_x86_64.'.$this->extension.'$/', $file_name, $utimestamp) === 1 if (preg_match('/([\d\.]+?)\_x86_64.'.$this->extension.'$/', $file_name, $utimestamp) === 1
|| preg_match('/(\d+)\.'.$this->extension.'$/', $file_name, $utimestamp) === 1 || preg_match('/([\d\.]+?)\.'.$this->extension.'$/', $file_name, $utimestamp) === 1
) { ) {
// Add the file to the repository. // Add the file to the repository.
$this->files[$utimestamp[1]] = $file_name; $this->files[$utimestamp[1]] = $file_name;