Commit 3bf28439 authored by Luke081515's avatar Luke081515

Allow supressing

* Allows suppressing of initial version output
* Make Debug still displaying the output
* Make TestCore supress the output
parent cd697ff7
......@@ -63,7 +63,7 @@ class Core extends Password {
* @param $pUseHTTPS - [optional: true] if false, http will be used
* @param $assert - [optional: bot] if set to "user" instead, you can use a bot without flag
*/
public function initcurlArgs($job, $pUseHTTPS = true, $assert = "bot", $debugMode = false) {
public function initcurlArgs($job, $pUseHTTPS = true, $assert = "bot", $supress = false, $debugMode = false) {
if ($debugMode) {
$this->debugMode = true;
}
......@@ -81,7 +81,9 @@ class Core extends Password {
throw new Exception("Curl initialization failed.");
else
$this->curlHandle = $curl;
echo "\n***** Starting up....\nVersion: " . $this->version . "\n*****";
if (!$supress) {
echo "\n***** Starting up....\nVersion: " . $this->version . "\n*****";
}
$this->ua = "User:" . $this->username . " - " . $this->job . " - " . $this->version;
// change if you need more, default is 5
$this->setMaxlag(5);
......
......@@ -18,7 +18,7 @@ class Debug extends Core {
} else {
$debug = false;
}
$this->initcurlArgs('Debug', true, $assert, $debug);
$this->initcurlArgs('Debug', true, $assert, false, $debug);
$this->login();
do {
$this->debug($this->askRequired("Name of the function you want to debug:"));
......
......@@ -19,7 +19,7 @@ class TestCore extends Core {
$this->setSite($loginData[1]);
$this->setUsername($loginData[2]);
$this->setPassword($loginData[3]);
$this->initcurlArgs('TestCore', true);
$this->initcurlArgs('TestCore', true, "bot", true);
$this->login();
}
/** execute
......
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