Commit 9feceaea authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Neues Ausgabeformat eingeführt:

out=result-count	=>	gibt nichts weiter zurück, als die Ergebniszahl
Dieser Wert kann nun von Nagios verwendet werden um bescheid zu geben, wenn etwas mit MetaGer nicht mehr stimmt.
parent cbb8457d
...@@ -140,6 +140,9 @@ class MetaGer ...@@ -140,6 +140,9 @@ class MetaGer
->with('suspendheader', "yes") ->with('suspendheader', "yes")
->with('browser', (new Agent())->browser()); ->with('browser', (new Agent())->browser());
break; break;
case 'result-count':
return sizeof($viewResults);
break;
default: default:
return view('metager3') return view('metager3')
->with('eingabe', $this->eingabe) ->with('eingabe', $this->eingabe)
...@@ -938,7 +941,7 @@ class MetaGer ...@@ -938,7 +941,7 @@ class MetaGer
} }
$this->out = $request->input('out', "html"); $this->out = $request->input('out', "html");
# Standard output format html # Standard output format html
if ($this->out !== "html" && $this->out !== "json" && $this->out !== "results" && $this->out !== "results-with-style") { if ($this->out !== "html" && $this->out !== "json" && $this->out !== "results" && $this->out !== "results-with-style" && $this->out !== "result-count") {
$this->out = "html"; $this->out = "html";
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment