diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-23 18:14:24 -0500 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-23 18:14:24 -0500 |
commit | 2442442d0b3d158cf98b3c60e89daf46e278305c (patch) | |
tree | 2eeb3a8fafaba092a8d833f5ded936e2af8b2269 /pts-core/functions/pts-functions-run.php | |
parent | 848de8d7681052a81a232378ea6806f672111d76 (diff) | |
download | phoronix-test-suite-upstream-2442442d0b3d158cf98b3c60e89daf46e278305c.tar.gz phoronix-test-suite-upstream-2442442d0b3d158cf98b3c60e89daf46e278305c.tar.xz phoronix-test-suite-upstream-2442442d0b3d158cf98b3c60e89daf46e278305c.zip |
pts-core: Improve usability for those without the PHP preg_* functions
Diffstat (limited to 'pts-core/functions/pts-functions-run.php')
-rw-r--r-- | pts-core/functions/pts-functions-run.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pts-core/functions/pts-functions-run.php b/pts-core/functions/pts-functions-run.php index cff7971..412d1e5 100644 --- a/pts-core/functions/pts-functions-run.php +++ b/pts-core/functions/pts-functions-run.php @@ -159,7 +159,14 @@ function pts_promt_user_tags($default_tags = "") if(!IS_BATCH_MODE) { echo "\nTags are optional and used on Phoronix Global for making it easy to share, search, and organize test results. Example tags could be the type of test performed (i.e. WINE tests) or the hardware used (i.e. Dual Core SMP).\n\nEnter the tags you wish to provide (separated by commas): "; - $tags_input .= trim(preg_replace("/[^a-zA-Z0-9s, -]/", "", fgets(STDIN))); + $tags_input .= fgets(STDIN); + + if(function_exists("preg_replace")) + { + $tags_input = preg_replace("/[^a-zA-Z0-9s, -]/", "", $tags_input); + } + + $tags_input = trim($tags_input); } if(empty($tags_input)) |