mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix bug
This commit is contained in:
parent
2fc3fe94a0
commit
57afba3901
@ -392,7 +392,7 @@ class JsonRequestHandlerController extends AppController {
|
||||
$result['warnings'] = $transaction->getWarnings();
|
||||
}
|
||||
// success
|
||||
return $this->returnJson(['state' => 'success']);
|
||||
return $this->returnJson($result);
|
||||
} else {
|
||||
|
||||
$this->sendEMailTransactionFailed($transaction, 'save');
|
||||
|
||||
@ -10,21 +10,21 @@ class TransactionBase {
|
||||
static $tables = [];
|
||||
|
||||
public function getErrors() {
|
||||
return $this->errors;
|
||||
return $this->errors;
|
||||
}
|
||||
|
||||
public function getWarnings() {
|
||||
return $this->warnings;
|
||||
}
|
||||
public function addError($functionName, $errorName) {
|
||||
array_push($this->errors, [$functionName => $errorName]);
|
||||
array_push($this->errors, [$functionName => $errorName]);
|
||||
}
|
||||
public function addWarning($functionName, $warningName) {
|
||||
$this->warnings[] = [$functionName => $warningName];
|
||||
array_push($this->warnings, [$functionName => $warningName]);
|
||||
}
|
||||
|
||||
public function addErrors($errors) {
|
||||
$this->errors = array_merge($this->errors, $errors);
|
||||
$this->errors = array_merge($this->errors, $errors);
|
||||
}
|
||||
|
||||
public function addWarnings($warnings) {
|
||||
@ -32,17 +32,17 @@ class TransactionBase {
|
||||
}
|
||||
|
||||
public function hasErrors() {
|
||||
return count($this->errors) > 0;
|
||||
return count($this->errors) > 0;
|
||||
}
|
||||
|
||||
public function hasWarnings() {
|
||||
return count($this->warnings) > 0;
|
||||
}
|
||||
public static function getTable($tableName) {
|
||||
if(!isset(self::$tables[$tableName])) {
|
||||
self::$tables[$tableName] = TableRegistry::getTableLocator()->get($tableName);
|
||||
}
|
||||
return self::$tables[$tableName];
|
||||
if(!isset(self::$tables[$tableName])) {
|
||||
self::$tables[$tableName] = TableRegistry::getTableLocator()->get($tableName);
|
||||
}
|
||||
return self::$tables[$tableName];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user