Merge branch 'master' into feature-28089/plausichecks_in_extension_hinzufuegen

This commit is contained in:
KarpAlex
2023-05-06 02:03:07 +02:00
51 changed files with 4479 additions and 1437 deletions
@@ -4,6 +4,8 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
class Plausichecks extends Auth_Controller
{
const GENERIC_ISSUE_OCCURED_TEXT = 'Issue aufgetreten';
public function __construct()
{
parent::__construct(
@@ -94,6 +96,7 @@ class Plausichecks extends Auth_Controller
if (!isEmptyArray($fehlertext_params))
{
// replace placeholder with params, if present
if (count($fehlertext_params) != substr_count($fehlerText, '%s'))
$this->terminateWithJsonError('Wrong number of parameters for Fehlertext, fehler_kurzbz ' . $fehler_kurzbz);
@@ -108,6 +111,15 @@ class Plausichecks extends Auth_Controller
$issueObj->type = $fehlerTyp;
$allIssues[$fehler_kurzbz][] = $issueObj;
}
else // if no issue text found, use generic text
{
$fehlerText = self::GENERIC_ISSUE_OCCURED_TEXT;
}
// add generic parameters to issue text
if (isset($person_id)) $fehlerText .= "; person_id: $person_id";
if (isset($oe_kurzbz)) $fehlerText .= "; oe_kurzbz: $oe_kurzbz";
$issueTexts[$fehler_kurzbz][] = $fehlerText;
}
}
}