summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_shell.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-10-30 21:14:44 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-10-30 21:14:44 -0400
commite65d11cc04e05a81f2cb60a296ef4367bd307a93 (patch)
tree3b8f1583a75cbecb59716e14020f81739a06969e /pts-core/functions/pts-functions_shell.php
parent6ccdcd98b799ad7370a327f4d387ae80e69975aa (diff)
downloadphoronix-test-suite-upstream-e65d11cc04e05a81f2cb60a296ef4367bd307a93.tar.gz
phoronix-test-suite-upstream-e65d11cc04e05a81f2cb60a296ef4367bd307a93.tar.xz
phoronix-test-suite-upstream-e65d11cc04e05a81f2cb60a296ef4367bd307a93.zip
pts-core: Reorder a few functions
Diffstat (limited to 'pts-core/functions/pts-functions_shell.php')
-rw-r--r--pts-core/functions/pts-functions_shell.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_shell.php b/pts-core/functions/pts-functions_shell.php
index f2ccfd7..f59e3f3 100644
--- a/pts-core/functions/pts-functions_shell.php
+++ b/pts-core/functions/pts-functions_shell.php
@@ -21,6 +21,32 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+function display_web_browser($URL, $alt_text = null, $default_open = false)
+{
+ // Launch the web browser
+ if($alt_text == null)
+ {
+ $text = "Do you want to view the results in your web browser";
+ }
+ else
+ {
+ $text = $alt_text;
+ }
+
+ if(!$default_open)
+ {
+ $view_results = pts_bool_question($text . " (y/N)?", false, "OPEN_BROWSER");
+ }
+ else
+ {
+ $view_results = pts_bool_question($text . " (Y/n)?", true, "OPEN_BROWSER");
+ }
+
+ if($view_results)
+ {
+ pts_run_shell_script("pts-core/scripts/launch-browser.sh", $URL);
+ }
+}
function pts_download($download, $to)
{
$to_file = basename($to);