mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
WebModuleRequirement: Strip leading v
from a module's version
This commit is contained in:
parent
43cb5f587a
commit
335dde7b68
@ -19,7 +19,13 @@ class WebModuleRequirement extends Requirement
|
|||||||
}
|
}
|
||||||
|
|
||||||
$module = $mm->getModule($name, false);
|
$module = $mm->getModule($name, false);
|
||||||
$this->setStateText(sprintf(mt('setup', '%s version: %s'), $this->getAlias(), $module->getVersion()));
|
|
||||||
return version_compare($module->getVersion(), $version, $op);
|
$moduleVersion = $module->getVersion();
|
||||||
|
if ($moduleVersion[0] === 'v') {
|
||||||
|
$moduleVersion = substr($moduleVersion, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->setStateText(sprintf(mt('setup', '%s version: %s'), $this->getAlias(), $moduleVersion));
|
||||||
|
return version_compare($moduleVersion, $version, $op);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user