summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_tests.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-12-27 16:58:43 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-12-27 16:58:43 -0500
commitdb10a1eb1fb1da87d1403b7c9b6658b880ca5d1b (patch)
tree3e5dafb5cdfe24a775ddd9a12e04f7ef5de20a7b /pts-core/functions/pts-functions_tests.php
parent502ac8e9fb41cfc4fb24222e3ec0d1c2f3833ed8 (diff)
downloadphoronix-test-suite-upstream-db10a1eb1fb1da87d1403b7c9b6658b880ca5d1b.tar.gz
phoronix-test-suite-upstream-db10a1eb1fb1da87d1403b7c9b6658b880ca5d1b.tar.xz
phoronix-test-suite-upstream-db10a1eb1fb1da87d1403b7c9b6658b880ca5d1b.zip
pts-core: Eliminate use of most preg_ functions
Diffstat (limited to 'pts-core/functions/pts-functions_tests.php')
-rw-r--r--pts-core/functions/pts-functions_tests.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/pts-core/functions/pts-functions_tests.php b/pts-core/functions/pts-functions_tests.php
index 0530cde..61ec7bc 100644
--- a/pts-core/functions/pts-functions_tests.php
+++ b/pts-core/functions/pts-functions_tests.php
@@ -613,12 +613,12 @@ function pts_test_version_compatible($version_compare = "")
{
$compatible = true;
- if(!empty($version_compare) && function_exists("preg_replace"))
+ if(!empty($version_compare))
{
- $current = preg_replace("/[^0-9]/", "", PTS_VERSION);
+ $current = pts_remove_chars(PTS_VERSION, true, false, false);
$version_compare = explode("-", $version_compare);
- $support_begins = preg_replace("/[^0-9]/", "", trim($version_compare[0]));
+ $support_begins = pts_remove_chars(trim($version_compare[0]), true, false, false);
if(count($version_compare) == 2)
{
@@ -628,8 +628,7 @@ function pts_test_version_compatible($version_compare = "")
{
$support_ends = PTS_VERSION;
}
-
- $support_ends = preg_replace("/[^0-9]/", "", $support_ends);
+ $support_ends = pts_remove_chars(trim($support_ends), true, false, false);
$compatible = $current >= $support_begins && $current <= $support_ends;
}