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

Merge branch 'cherry-pick-0ef46138' into 'psnc-production'

Fixes to API

See merge request !15
parents f34d63a4 3b0b9d5c
Branches
Tags 0.130
1 merge request!15Fixes 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