projects / phoronix-test-suite.git / commitdiff
Build Results
 
Summary

Description: Unnamed repository; edit this file to name it for gitweb.
Last Change: Wed 2/3/10 13:04

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Wed 2/3/10 13:04
Michael Larabel  
phoromatic: Add... 
Wed 2/3/10 12:38
Michael Larabel  
phoromatic: Add... 
Wed 2/3/10 12:27
Michael Larabel  
phoromatic: Add... 
Wed 2/3/10 9:26
Michael Larabel  
pts: Drop MD5 hashes in... 
Tue 2/2/10 23:43
Michael Larabel  
phoromatic: Add... 
Tue 2/2/10 23:35
Michael Larabel  
pts-core: Phoromatic... 
 
> --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php
index 74fb542
..3f853bd 100644
--- a/pts-core/functions/pts-functions.php
+++ b/pts-core/functions/pts-functions.php
@@ -363,19 +363,26 @@ function pts_trim_double($double$accuracy 2)
 }
 function 
pts_bool_question($question$default true)
 {
-    do
+    if(
defined("PTS_BATCH_MODE"))
     {
-        echo 
$question " ";
-        
$input trim(strtolower(fgets(STDIN)));
+        
$answer $default;
     }
-    while(
$input != "y" && $input != "n" && $input != "");
-
-    if(
$input == "y")
-        
$answer true;
-    else if(
$input == "n")
-        
$answer false;
     else
-        
$answer $default;
+    {
+        do
+        {
+            echo 
$question " ";
+            
$input trim(strtolower(fgets(STDIN)));
+        }
+        while(
$input != "y" && $input != "n" && $input != "");
+
+        if(
$input == "y")
+            
$answer true;
+        else if(
$input == "n")
+            
$answer false;
+        else
+            
$answer $default;
+    }

     return 
$answer;
 }
<
 
Phoronix.com
Linux Driver Forums
Copyright © 2010 by Phoronix Media