summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_tests.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-10-09 13:41:34 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-10-09 13:41:34 -0400
commita3c3298174acb6f96fc627bf971ca1405964ac4a (patch)
tree6505f143529414b715bde5634f39f582f0036d2d /pts-core/functions/pts-functions_tests.php
parent76f231905a92c13188a3d6629393eb3ec93c4548 (diff)
downloadphoronix-test-suite-upstream-a3c3298174acb6f96fc627bf971ca1405964ac4a.tar.gz
phoronix-test-suite-upstream-a3c3298174acb6f96fc627bf971ca1405964ac4a.tar.xz
phoronix-test-suite-upstream-a3c3298174acb6f96fc627bf971ca1405964ac4a.zip
pts-core: Fix pts_test_version_compatible()
Diffstat (limited to 'pts-core/functions/pts-functions_tests.php')
-rw-r--r--pts-core/functions/pts-functions_tests.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/pts-core/functions/pts-functions_tests.php b/pts-core/functions/pts-functions_tests.php
index c0070e6..767a2f5 100644
--- a/pts-core/functions/pts-functions_tests.php
+++ b/pts-core/functions/pts-functions_tests.php
@@ -346,19 +346,19 @@ function pts_test_version_compatible($version_compare = "")
if(!empty($version_compare))
{
- $current = explode(".", preg_replace("/[^.0-9]/", "", PTS_VERSION));
+ $current = preg_replace("/[^0-9]/", "", PTS_VERSION);
$version_compare = explode("-", $version_compare);
- $support_begins = explode(".", preg_replace("/[^.0-9]/", "", trim($version_compare[0])));
+ $support_begins = preg_replace("/[^0-9]/", "", trim($version_compare[0]));
if(count($version_compare) == 2)
$support_ends = trim($version_compare[1]);
else
$support_ends = PTS_VERSION;
- $support_ends = explode(".", preg_replace("/[^.0-9]/", "", $support_ends));
+ $support_ends = preg_replace("/[^0-9]/", "", $support_ends);
- if($current[0] >= $support_begins[0] && $current[0] <= $support_ends[0] && $current[1] >= $support_begins[1] && $current[1] <= $support_ends[1] && $current[2] >= $support_begins[2] && $current[2] <= $support_ends[2])
+ if($current >= $support_begins && $current <= $support_ends)
$compatible = true;
else
$compatible = false;