Skip to content
Snippets Groups Projects
Commit d12bde1e authored by Tomasz Wolniewicz's avatar Tomasz Wolniewicz
Browse files

Merge branch 'master' into 'master'

Fixes to API

See merge request !14
parents 21a3a91a 0ef46138
Branches
Tags
1 merge request!14Fixes to API
...@@ -101,7 +101,7 @@ class API { ...@@ -101,7 +101,7 @@ class API {
foreach ($supportedOptions as $opt) { foreach ($supportedOptions as $opt) {
$this->assignOpt($opt); $this->assignOpt($opt);
} }
// print_r($this->opts); Utils::debug(5, $this->opts, "OPTS: ", "\n");
} }
private function optionError($optName) { private function optionError($optName) {
...@@ -300,15 +300,18 @@ class API { ...@@ -300,15 +300,18 @@ class API {
if ($optValue != 1 && $optValue != 2) { if ($optValue != 1 && $optValue != 2) {
$optValue = 0; $optValue = 0;
} }
break;
case 'details': case 'details':
if ($optValue != 1) { if ($optValue != 1) {
$optValue = 0; $optValue = 0;
} }
break;
case 'valid_sec': case 'valid_sec':
$optValue = filter_var($optValue, FILTER_SANITIZE_NUMBER_INT); $optValue = filter_var($optValue, FILTER_SANITIZE_NUMBER_INT);
if ($optValue == '') { if ($optValue == '') {
$optValue = 0; $optValue = 0;
} }
break;
default: default:
} }
$this->opts[$optName] = $optValue; $this->opts[$optName] = $optValue;
...@@ -608,7 +611,6 @@ class API { ...@@ -608,7 +611,6 @@ class API {
if ($this->opts['help'] == 1) { if ($this->opts['help'] == 1) {
return ""; return "";
} }
Utils::debug(5, $this->opts, "OPTS: ", "\n");
$edugain = new eduGAIN(5, $this->fed_id, true); $edugain = new eduGAIN(5, $this->fed_id, true);
$edugain->load_federations_state(); $edugain->load_federations_state();
if ($this->opts['only_errors'] > 0) { if ($this->opts['only_errors'] > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment