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

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 {
*/
public function __construct($dbIndexData = false, $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->db = new Database($dbIndexData);
$this->store = Store::getInstance('', $phpUnit);
}
......
......@@ -42,6 +42,8 @@ class File {
* @throws \UserReportException
*/
public function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->session = Session::getInstance($phpUnit);
$this->store = Store::getInstance('', $phpUnit);
......
......@@ -61,6 +61,7 @@ class Dirty {
*/
public function __construct($phpUnit = false, $dbIndexData = false, $dbIndexQfq = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->session = Session::getInstance($phpUnit);
$this->client = Client::getParam();
if (!isset($this->client[DIRTY_RECORD_HASH_MD5])) {
......
......@@ -51,6 +51,7 @@ class DragAndDrop {
*/
public function __construct(array $formSpec = array(), $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$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!
......
......@@ -55,6 +55,8 @@ class FormAction {
* @throws \UserReportException
*/
public function __construct(array $formSpec, Database $db, $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->formSpec = $formSpec;
$this->primaryTableName = Support::setIfNotSet($formSpec, F_TABLE_NAME);
......
......@@ -37,6 +37,7 @@ class TypeAhead {
*/
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_PREFETCH] = isset($_GET[TYPEAHEAD_API_PREFETCH]) ? $_GET[TYPEAHEAD_API_PREFETCH] : '';
$this->vars[TYPEAHEAD_API_SIP] = isset($_GET[TYPEAHEAD_API_SIP]) ? $_GET[TYPEAHEAD_API_SIP] : '';
......
......@@ -117,6 +117,8 @@ class QuickFormQuery {
* @throws \UserReportException
*/
public function __construct(array $t3data = array(), $phpUnit = false, $inlineReport = true) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->phpUnit = $phpUnit;
$this->inlineReport = $inlineReport;
......
......@@ -78,6 +78,7 @@ class Download {
*/
public function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->session = Session::getInstance($phpUnit);
$this->store = Store::getInstance('', $phpUnit);
$this->db = new Database();
......
......@@ -67,6 +67,7 @@ class Html2Pdf {
*/
public function __construct(array $config = array(), $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
if (count($config) == 0) {
$config = Config::readConfig('');
}
......
......@@ -221,6 +221,8 @@ class Link {
* @throws \UserReportException
*/
public function __construct(Sip $sip, $dbIndexData = DB_INDEX_DEFAULT, $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->phpUnit = $phpUnit;
if ($phpUnit) {
......
......@@ -38,6 +38,8 @@ class Monitor {
* @throws \UserReportException
*/
public function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->store = Store::getInstance();
$this->session = Session::getInstance($phpUnit);
}
......
......@@ -125,6 +125,7 @@ class Report {
*/
public function __construct(array $t3data, Evaluate $eval, $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->phpUnit = $phpUnit;
Support::setIfNotSet($t3data, "uid", 0);
......
......@@ -66,6 +66,10 @@ class SendMail {
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 .= 'TO: ' . ($mailConfig[SENDMAIL_TOKEN_RECEIVER] ?? '') . PHP_EOL;
$addBody .= 'CC: ' . ($mailConfig[SENDMAIL_TOKEN_RECEIVER_CC] ?? '') . PHP_EOL;
......
......@@ -42,6 +42,8 @@ class Thumbnail {
* @throws \UserReportException
*/
public function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->store = Store::getInstance();
$this->inkscape = $this->store->getVar(SYSTEM_CMD_INKSCAPE, STORE_SYSTEM);
......
......@@ -50,6 +50,7 @@ class Save {
* @throws \UserReportException
*/
public function __construct(array $formSpec, array $feSpecAction, array $feSpecNative, array $feSpecNativeRaw) {
$this->formSpec = $formSpec;
$this->feSpecAction = $feSpecAction;
$this->feSpecNative = $feSpecNative;
......
......@@ -34,6 +34,7 @@ class Session
*/
private function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
if (self::$phpUnit !== null) {
throw new \CodeException("Try to set flag phpunit again - that should not happen.", ERROR_CODE_SHOULD_NOT_HAPPEN);
}
......
......@@ -27,6 +27,7 @@ class Sip {
*/
public function __construct($phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->phpUnit = $phpUnit;
}
......
......@@ -59,6 +59,7 @@ class AutoCron {
*/
public function __construct($verbose = false, $phpUnit = false) {
#TODO: rewrite $phpUnit to: "if (!defined('PHPUNIT_QFQ')) {...}"
$this->verbose = $verbose;
$this->phpUnit = $phpUnit;
......
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