Commit 9146f8ca authored by Carsten  Rose's avatar Carsten Rose
Browse files

Add TODO to replace variable $phpUnit with "if (!defined('PHPUNIT_QFQ')) {...}"

parent f33915fe
Pipeline #2281 passed with stages
in 2 minutes and 45 seconds
...@@ -39,6 +39,7 @@ class Delete { ...@@ -39,6 +39,7 @@ class Delete {
*/ */
public function __construct($dbIndexData = false, $phpUnit = false) { public function __construct($dbIndexData = false, $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->db = new Database($dbIndexData); $this->db = new Database($dbIndexData);
$this->store = Store::getInstance('', $phpUnit); $this->store = Store::getInstance('', $phpUnit);
} }
......
...@@ -42,6 +42,8 @@ class File { ...@@ -42,6 +42,8 @@ class File {
* @throws \UserReportException * @throws \UserReportException
*/ */
public function __construct($phpUnit = false) { public function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->session = Session::getInstance($phpUnit); $this->session = Session::getInstance($phpUnit);
$this->store = Store::getInstance('', $phpUnit); $this->store = Store::getInstance('', $phpUnit);
......
...@@ -61,6 +61,7 @@ class Dirty { ...@@ -61,6 +61,7 @@ class Dirty {
*/ */
public function __construct($phpUnit = false, $dbIndexData = false, $dbIndexQfq = false) { public function __construct($phpUnit = false, $dbIndexData = false, $dbIndexQfq = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->session = Session::getInstance($phpUnit); $this->session = Session::getInstance($phpUnit);
$this->client = Client::getParam(); $this->client = Client::getParam();
if (!isset($this->client[DIRTY_RECORD_HASH_MD5])) { if (!isset($this->client[DIRTY_RECORD_HASH_MD5])) {
......
...@@ -51,6 +51,7 @@ class DragAndDrop { ...@@ -51,6 +51,7 @@ class DragAndDrop {
*/ */
public function __construct(array $formSpec = array(), $phpUnit = false) { public function __construct(array $formSpec = array(), $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->formSpec = $formSpec; $this->formSpec = $formSpec;
$dbIndex = DB_INDEX_DEFAULT; //Hier muss noch die aktuelle DB ermittelt werden (kann im Form angegeben sein) - Gerade im Formular FORM Editor genau testen! $dbIndex = DB_INDEX_DEFAULT; //Hier muss noch die aktuelle DB ermittelt werden (kann im Form angegeben sein) - Gerade im Formular FORM Editor genau testen!
......
...@@ -55,6 +55,8 @@ class FormAction { ...@@ -55,6 +55,8 @@ class FormAction {
* @throws \UserReportException * @throws \UserReportException
*/ */
public function __construct(array $formSpec, Database $db, $phpUnit = false) { public function __construct(array $formSpec, Database $db, $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->formSpec = $formSpec; $this->formSpec = $formSpec;
$this->primaryTableName = Support::setIfNotSet($formSpec, F_TABLE_NAME); $this->primaryTableName = Support::setIfNotSet($formSpec, F_TABLE_NAME);
......
...@@ -37,6 +37,7 @@ class TypeAhead { ...@@ -37,6 +37,7 @@ class TypeAhead {
*/ */
public function __construct($phpUnit = false) { public function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->vars[TYPEAHEAD_API_QUERY] = isset($_GET[TYPEAHEAD_API_QUERY]) ? $_GET[TYPEAHEAD_API_QUERY] : ''; $this->vars[TYPEAHEAD_API_QUERY] = isset($_GET[TYPEAHEAD_API_QUERY]) ? $_GET[TYPEAHEAD_API_QUERY] : '';
$this->vars[TYPEAHEAD_API_PREFETCH] = isset($_GET[TYPEAHEAD_API_PREFETCH]) ? $_GET[TYPEAHEAD_API_PREFETCH] : ''; $this->vars[TYPEAHEAD_API_PREFETCH] = isset($_GET[TYPEAHEAD_API_PREFETCH]) ? $_GET[TYPEAHEAD_API_PREFETCH] : '';
$this->vars[TYPEAHEAD_API_SIP] = isset($_GET[TYPEAHEAD_API_SIP]) ? $_GET[TYPEAHEAD_API_SIP] : ''; $this->vars[TYPEAHEAD_API_SIP] = isset($_GET[TYPEAHEAD_API_SIP]) ? $_GET[TYPEAHEAD_API_SIP] : '';
......
...@@ -117,6 +117,8 @@ class QuickFormQuery { ...@@ -117,6 +117,8 @@ class QuickFormQuery {
* @throws \UserReportException * @throws \UserReportException
*/ */
public function __construct(array $t3data = array(), $phpUnit = false, $inlineReport = true) { public function __construct(array $t3data = array(), $phpUnit = false, $inlineReport = true) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->phpUnit = $phpUnit; $this->phpUnit = $phpUnit;
$this->inlineReport = $inlineReport; $this->inlineReport = $inlineReport;
......
...@@ -78,6 +78,7 @@ class Download { ...@@ -78,6 +78,7 @@ class Download {
*/ */
public function __construct($phpUnit = false) { public function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->session = Session::getInstance($phpUnit); $this->session = Session::getInstance($phpUnit);
$this->store = Store::getInstance('', $phpUnit); $this->store = Store::getInstance('', $phpUnit);
$this->db = new Database(); $this->db = new Database();
......
...@@ -67,6 +67,7 @@ class Html2Pdf { ...@@ -67,6 +67,7 @@ class Html2Pdf {
*/ */
public function __construct(array $config = array(), $phpUnit = false) { public function __construct(array $config = array(), $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
if (count($config) == 0) { if (count($config) == 0) {
$config = Config::readConfig(''); $config = Config::readConfig('');
} }
......
...@@ -221,6 +221,8 @@ class Link { ...@@ -221,6 +221,8 @@ class Link {
* @throws \UserReportException * @throws \UserReportException
*/ */
public function __construct(Sip $sip, $dbIndexData = DB_INDEX_DEFAULT, $phpUnit = false) { public function __construct(Sip $sip, $dbIndexData = DB_INDEX_DEFAULT, $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->phpUnit = $phpUnit; $this->phpUnit = $phpUnit;
if ($phpUnit) { if ($phpUnit) {
......
...@@ -38,6 +38,8 @@ class Monitor { ...@@ -38,6 +38,8 @@ class Monitor {
* @throws \UserReportException * @throws \UserReportException
*/ */
public function __construct($phpUnit = false) { public function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->store = Store::getInstance(); $this->store = Store::getInstance();
$this->session = Session::getInstance($phpUnit); $this->session = Session::getInstance($phpUnit);
} }
......
...@@ -125,6 +125,7 @@ class Report { ...@@ -125,6 +125,7 @@ class Report {
*/ */
public function __construct(array $t3data, Evaluate $eval, $phpUnit = false) { public function __construct(array $t3data, Evaluate $eval, $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->phpUnit = $phpUnit; $this->phpUnit = $phpUnit;
Support::setIfNotSet($t3data, "uid", 0); Support::setIfNotSet($t3data, "uid", 0);
......
...@@ -66,6 +66,10 @@ class SendMail { ...@@ -66,6 +66,10 @@ class SendMail {
if (!empty($redirectAllMail)) { if (!empty($redirectAllMail)) {
foreach ([SENDMAIL_TOKEN_RECEIVER, SENDMAIL_TOKEN_RECEIVER_CC, SENDMAIL_TOKEN_RECEIVER_BCC] as $key) {
$mailConfig[$key] = (strlen($mailConfig[$key]) > 1023) ? str_replace(',', ', ', $mailConfig[$key]) : $mailConfig[$key];
}
$addBody = "All QFQ outgoing mails are caught and redirected to you." . PHP_EOL . "Original receiver(s) are ..." . PHP_EOL; $addBody = "All QFQ outgoing mails are caught and redirected to you." . PHP_EOL . "Original receiver(s) are ..." . PHP_EOL;
$addBody .= 'TO: ' . ($mailConfig[SENDMAIL_TOKEN_RECEIVER] ?? '') . PHP_EOL; $addBody .= 'TO: ' . ($mailConfig[SENDMAIL_TOKEN_RECEIVER] ?? '') . PHP_EOL;
$addBody .= 'CC: ' . ($mailConfig[SENDMAIL_TOKEN_RECEIVER_CC] ?? '') . PHP_EOL; $addBody .= 'CC: ' . ($mailConfig[SENDMAIL_TOKEN_RECEIVER_CC] ?? '') . PHP_EOL;
......
...@@ -42,6 +42,8 @@ class Thumbnail { ...@@ -42,6 +42,8 @@ class Thumbnail {
* @throws \UserReportException * @throws \UserReportException
*/ */
public function __construct($phpUnit = false) { public function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->store = Store::getInstance(); $this->store = Store::getInstance();
$this->inkscape = $this->store->getVar(SYSTEM_CMD_INKSCAPE, STORE_SYSTEM); $this->inkscape = $this->store->getVar(SYSTEM_CMD_INKSCAPE, STORE_SYSTEM);
......
...@@ -50,6 +50,7 @@ class Save { ...@@ -50,6 +50,7 @@ class Save {
* @throws \UserReportException * @throws \UserReportException
*/ */
public function __construct(array $formSpec, array $feSpecAction, array $feSpecNative, array $feSpecNativeRaw) { public function __construct(array $formSpec, array $feSpecAction, array $feSpecNative, array $feSpecNativeRaw) {
$this->formSpec = $formSpec; $this->formSpec = $formSpec;
$this->feSpecAction = $feSpecAction; $this->feSpecAction = $feSpecAction;
$this->feSpecNative = $feSpecNative; $this->feSpecNative = $feSpecNative;
......
...@@ -34,6 +34,7 @@ class Session ...@@ -34,6 +34,7 @@ class Session
*/ */
private function __construct($phpUnit = false) { private function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
if (self::$phpUnit !== null) { if (self::$phpUnit !== null) {
throw new \CodeException("Try to set flag phpunit again - that should not happen.", ERROR_CODE_SHOULD_NOT_HAPPEN); throw new \CodeException("Try to set flag phpunit again - that should not happen.", ERROR_CODE_SHOULD_NOT_HAPPEN);
} }
......
...@@ -27,6 +27,7 @@ class Sip { ...@@ -27,6 +27,7 @@ class Sip {
*/ */
public function __construct($phpUnit = false) { public function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->phpUnit = $phpUnit; $this->phpUnit = $phpUnit;
} }
......
...@@ -59,6 +59,7 @@ class AutoCron { ...@@ -59,6 +59,7 @@ class AutoCron {
*/ */
public function __construct($verbose = false, $phpUnit = false) { public function __construct($verbose = false, $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->verbose = $verbose; $this->verbose = $verbose;
$this->phpUnit = $phpUnit; $this->phpUnit = $phpUnit;
......
Supports Markdown
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