From 9752cbde1201f3e7b74dc67310cc5cd840a17443 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Mon, 28 Mar 2005 16:38:59 +0000 Subject: merge in PEAR 1.3.5 --- pear/scripts/pearcmd.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'pear/scripts') diff --git a/pear/scripts/pearcmd.php b/pear/scripts/pearcmd.php index b7d10e5e12..ff9366142e 100644 --- a/pear/scripts/pearcmd.php +++ b/pear/scripts/pearcmd.php @@ -29,7 +29,7 @@ if ('@include_path@' != '@'.'include_path'.'@') { } ini_set('allow_url_fopen', true); if (!ini_get('safe_mode')) { - set_time_limit(0); + @set_time_limit(0); } ob_implicit_flush(true); ini_set('track_errors', true); @@ -75,6 +75,11 @@ if ($progname == 'gpear' || $progname == 'pear-gtk') { PEAR_Command::setFrontendType($fetype); $ui = &PEAR_Command::getFrontendObject(); PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ui, "displayFatalError")); +if (ini_get('safe_mode')) { + $ui->outputData('WARNING: running in safe mode requires that all files created ' . + 'be the same uid as the current script. PHP reports this script is uid: ' . + @getmyuid() . ', and current user is: ' . @get_current_user()); +} $pear_user_config = ''; $pear_system_config = ''; @@ -212,9 +217,6 @@ function usage($error = null, $helpsubject = null) $put = cmdHelp($helpsubject); } else { $put = - "Usage: $progname [options] command [command-options] \n". - "Type \"$progname help options\" to list all options.\n". - "Type \"$progname help \" to get the help for the specified command.\n". "Commands:\n"; $maxlen = max(array_map("strlen", $all_commands)); $formatstr = "%-{$maxlen}s %s\n"; @@ -222,6 +224,11 @@ function usage($error = null, $helpsubject = null) foreach ($all_commands as $cmd => $class) { $put .= sprintf($formatstr, $cmd, PEAR_Command::getDescription($cmd)); } + $put .= + "Usage: $progname [options] command [command-options] \n". + "Type \"$progname help options\" to list all options.\n". + "Type \"$progname help shortcuts\" to list all command shortcuts.\n". + "Type \"$progname help \" to get the help for the specified command."; } fputs($stderr, "$put\n"); fclose($stderr); -- cgit v1.2.1