Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove --debug option

  • Loading branch information...
commit 806a603898b574b863c8f013f643a3903ea12dfa 1 parent 544d117
@ccesario authored
Showing with 5 additions and 13 deletions.
  1. +5 −13 pfsensebkp/pfsensebkp.php
View
18 pfsensebkp/pfsensebkp.php
@@ -105,7 +105,6 @@ function showHelp()
--help :: Show this message
--config <config file> :: XML config file
- --debug :: Debug process
";
echo $helpProgram;
@@ -126,8 +125,6 @@ function printMessage($message)
// gets the data from a URL
function do_backup($configHost = array())
{
- global $debugprocess;
-
if (($configHost) && (is_array($configHost))) {
$host_address=$configHost['address'];
@@ -159,12 +156,10 @@ function do_backup($configHost = array())
// debug
// display communication with server
- if ($debugprocess) {
- curl_setopt($ch, CURLOPT_VERBOSE, true);
- //$fp = fopen("debug.tmp", "w");
- //curl_setopt($ch, CURLOPT_STDERR, $fp);
- }
-
+ curl_setopt($ch, CURLOPT_VERBOSE, true);
+ //$fp = fopen("debug.tmp", "w");
+ //curl_setopt($ch, CURLOPT_STDERR, $fp);
+
if ($host_protocol == 'https') {
//check if certificate is valid
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
@@ -260,14 +255,11 @@ function do_backup($configHost = array())
if( $totalArgv > 1 ) {
for( $param = 1; $param < $totalArgv; $param++ ) {
switch($argv[$param]) {
+
case '--help':
showHelp();
break;
- case '--debug':
- $debugprocess = true;
- break;
-
case '--config':
if (!$argv[($param + 1)]) {
printMessage("Incorrect params");
Please sign in to comment.
Something went wrong with that request. Please try again.