From c87ae7e74d7133da065ba011efaa1e63f592df07 Mon Sep 17 00:00:00 2001 From: kindlm Date: Wed, 6 Dec 2023 18:06:46 +0100 Subject: [PATCH 01/81] Suche Person in OE; OE in Rechteliste OE-Suche --- .../benutzerberechtigung_uebersicht.php | 284 +++++++++++++----- 1 file changed, 213 insertions(+), 71 deletions(-) diff --git a/vilesci/stammdaten/benutzerberechtigung_uebersicht.php b/vilesci/stammdaten/benutzerberechtigung_uebersicht.php index 0be268b70..95ea75082 100644 --- a/vilesci/stammdaten/benutzerberechtigung_uebersicht.php +++ b/vilesci/stammdaten/benutzerberechtigung_uebersicht.php @@ -29,17 +29,20 @@ require_once('../../include/benutzer.class.php'); require_once('../../include/berechtigung.class.php'); require_once ('../../include/organisationseinheit.class.php'); require_once ('../../include/benutzerfunktion.class.php'); +require_once ('../../include/funktion.class.php'); echo ' Berechtigungen Uebersicht -'; + +'; include('../../include/meta/jquery.php'); include('../../include/meta/jquery-tablesorter.php'); echo ' + + + +
+

+ +
+ + \ No newline at end of file diff --git a/application/views/errors/json/html/error_db.php b/application/views/errors/json/html/error_db.php new file mode 100644 index 000000000..dce6a7572 --- /dev/null +++ b/application/views/errors/json/html/error_db.php @@ -0,0 +1,49 @@ +

', $msg); + +$msgs = []; + +$error = [ + 'heading' => $heading +]; + +/** NOTE(chris): extract Error Number and SQL + * @see: DB_driver.php:692 + */ +if (substr(current($msg), 0, 14) == 'Error Number: ') { + $code = substr(array_shift($msg), 14); + if ($code) + $error['code'] = (int)$code; + $msgs[] = array_shift($msg); + $error['sql'] = array_shift($msg); +} + +/** NOTE(chris): extract Line Number and Filename + * @see: DB_driver.php:1782 + * @see: DB_driver.php:1783 + */ +if (count($msg) >= 2) { + if (substr(end($msg), 0, 13) == 'Line Number: ' && substr(prev($msg), 0, 10) == 'Filename: ') { + $error['line'] = (int)substr(array_pop($msg), 13); + $error['filename'] = substr(array_pop($msg), 10); + } +} + +foreach ($msg as $m) + $msgs[] = $m; + + +if (count($msgs) == 1) + $error['message'] = current($msgs); +else + $error['messages'] = $msgs; + +$g_result->addError($error, FHCAPI_Controller::ERROR_TYPE_DB); +$g_result->setStatus(FHCAPI_Controller::STATUS_ERROR); diff --git a/application/views/errors/json/html/error_exception.php b/application/views/errors/json/html/error_exception.php new file mode 100644 index 000000000..7984bd13e --- /dev/null +++ b/application/views/errors/json/html/error_exception.php @@ -0,0 +1,27 @@ + $message, + 'class' => get_class($exception), + 'filename' => $exception->getFile(), + 'line' => $exception->getLine() +]; + +if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === true) { + $error['backtrace'] = []; + foreach (debug_backtrace() as $err) { + if (isset($err['file']) && strpos($err['file'], realpath(BASEPATH)) !== 0) { + $error['backtrace'][] = [ + 'file' => $err['file'], + 'line' => $err['line'], + 'function' => $err['function'] + ]; + } + } +} + +$g_result->addError($error, FHCAPI_Controller::ERROR_TYPE_EXCEPTION); +$g_result->setStatus(FHCAPI_Controller::STATUS_ERROR); diff --git a/application/views/errors/json/html/error_general.php b/application/views/errors/json/html/error_general.php new file mode 100644 index 000000000..e69494463 --- /dev/null +++ b/application/views/errors/json/html/error_general.php @@ -0,0 +1,20 @@ +

', $msg); + +$error = [ + 'heading' => $heading +]; +if (count($msg) == 1) + $error['message'] = current($msg); +else + $error['messages'] = $msg; + +$g_result->addError($error, FHCAPI_Controller::ERROR_TYPE_GENERAL); +$g_result->setStatus(FHCAPI_Controller::STATUS_ERROR); diff --git a/application/views/errors/json/html/error_php.php b/application/views/errors/json/html/error_php.php new file mode 100644 index 000000000..91f2abf3c --- /dev/null +++ b/application/views/errors/json/html/error_php.php @@ -0,0 +1,31 @@ + $message, + 'severity' => $severity, + 'filename' => $filepath, + 'line' => $line +]; + +if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE === true) { + $error['backtrace'] = []; + foreach (debug_backtrace() as $err) { + if (isset($err['file']) && strpos($err['file'], realpath(BASEPATH)) !== 0) { + $error['backtrace'][] = [ + 'file' => $err['file'], + 'line' => $err['line'], + 'function' => $err['function'] + ]; + } + } +} + +// TODO(chris): change type with severity +$g_result->addError($error, 'php'); + +if (((E_ERROR | E_PARSE | E_COMPILE_ERROR | E_CORE_ERROR | E_USER_ERROR) & $severity) === $severity) { + $g_result->setStatus('error'); +} From 5e99ff9c8bc420912407cb9c38641aae51485a74 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 29 Jan 2024 14:29:39 +0100 Subject: [PATCH 10/81] - uebersicht erweitert - job angepasst --- system/filtersupdate.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/filtersupdate.php b/system/filtersupdate.php index cc9abfb98..a044a3616 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -378,7 +378,8 @@ $filters = array( {"name" : "FoerderfallId"}, {"name" : "LeistungsdatenId"}, {"name" : "startjahr"}, - {"name" : "endjahr"} + {"name" : "endjahr"}, + {"name" : "Uebermittelt"} ], "filters": [] } From ea9e58a640f662d443ce0ed0bc30855a34dbebd0 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Tue, 30 Jan 2024 10:41:45 +0100 Subject: [PATCH 11/81] Bugfix: Typo --- application/core/FHCAPI_Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/core/FHCAPI_Controller.php b/application/core/FHCAPI_Controller.php index ea187a4b5..39cd853ac 100644 --- a/application/core/FHCAPI_Controller.php +++ b/application/core/FHCAPI_Controller.php @@ -155,7 +155,7 @@ class FHCAPI_Controller extends FHC_Controller { $this->output->set_status_header(REST_Controller::HTTP_BAD_REQUEST); $this->addError($errors, self::ERROR_TYPE_VALIDATION); - $this->setStatus(self::STATUS_FAILED); + $this->setStatus(self::STATUS_FAIL); exit(EXIT_ERROR); } From b010cbb35d1873a32bcce7d42a85bf9017b2a221 Mon Sep 17 00:00:00 2001 From: cgfhtw Date: Tue, 30 Jan 2024 10:42:12 +0100 Subject: [PATCH 12/81] FhcAlert: CSS --- public/css/Fhc.css | 17 ++++++++++++++++- public/js/plugin/FhcAlert.js | 6 +++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/public/css/Fhc.css b/public/css/Fhc.css index 9342be5a3..7a209b661 100644 --- a/public/css/Fhc.css +++ b/public/css/Fhc.css @@ -1,6 +1,21 @@ -.text-prewrap { +.fhc-alert.p-toast-center { + width: 35rem; + max-width: 100vw; +} +.fhc-alert.p-toast-top-right { + max-width: calc(100vw - 40px); +} +.fhc-alert.p-toast-top-right .p-toast-detail, +.fhc-alert.p-toast-center .p-toast-message-text .card { + white-space: pre-wrap; +} + +.text-preline { white-space: pre-line; } +.text-prewrap { + white-space: pre-wrap; +} .btn-p-0 { padding: 0 .375rem; diff --git a/public/js/plugin/FhcAlert.js b/public/js/plugin/FhcAlert.js index 079039aed..cb9c4c4e8 100644 --- a/public/js/plugin/FhcAlert.js +++ b/public/js/plugin/FhcAlert.js @@ -133,8 +133,8 @@ const helperApp = Vue.createApp({ helperAppContainer.parentElement.removeChild(helperAppContainer); }, template: ` - - + +