From 66de1e18f8db28e0b6d4fd926082a13da7bcda20 Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 1 Aug 2017 18:25:23 +0200 Subject: [PATCH] - Removed /core from URL - If UDf are not set in DB UDF view will not display them - Removed placeholder from multiple dropdown widget - Dropdown widget has null value as placeholder - Added permission system/udf to checksystem --- application/controllers/system/UDF.php | 22 ++-- application/core/DB_Model.php | 163 +++++++++++++++--------- application/libraries/WidgetLib.php | 26 +++- application/models/system/UDF_model.php | 30 +++++ application/views/system/udf.php | 7 +- application/widgets/UDFWidget.php | 37 +++++- content/udf.js.php | 2 +- system/dbupdate_3.3.php | 14 ++ 8 files changed, 216 insertions(+), 85 deletions(-) diff --git a/application/controllers/system/UDF.php b/application/controllers/system/UDF.php index de65b01a9..4f08ad576 100644 --- a/application/controllers/system/UDF.php +++ b/application/controllers/system/UDF.php @@ -55,18 +55,24 @@ class UDF extends VileSci_Controller if (isset($person_id) && is_numeric($person_id)) { - $person = $this->PersonModel->load($person_id); - $personUdfs = $this->PersonModel->getUDFs(); - $personUdfs['person_id'] = $person_id; - $data['personUdfs'] = $personUdfs; + if ($this->PersonModel->hasUDF()) + { + $person = $this->PersonModel->load($person_id); + $personUdfs = $this->PersonModel->getUDFs(); + $personUdfs['person_id'] = $person_id; + $data['personUdfs'] = $personUdfs; + } } if (isset($prestudent_id) && is_numeric($prestudent_id)) { - $prestudent = $this->PrestudentModel->load($prestudent_id); - $prestudentUdfs = $this->PrestudentModel->getUDFs(); - $prestudentUdfs['prestudent_id'] = $prestudent_id; - $data['prestudentUdfs'] = $prestudentUdfs; + if ($this->PrestudentModel->hasUDF()) + { + $prestudent = $this->PrestudentModel->load($prestudent_id); + $prestudentUdfs = $this->PrestudentModel->getUDFs(); + $prestudentUdfs['prestudent_id'] = $prestudent_id; + $data['prestudentUdfs'] = $prestudentUdfs; + } } $this->load->view('system/udf', $data); diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index c24d695a3..8782edc54 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -25,6 +25,8 @@ class DB_Model extends FHC_Model const UDF_ATTRIBUTE_NAME = 'name'; const UDF_TYPE_NAME = 'type'; const UDF_CHKBOX_TYPE = 'checkbox'; + const UDF_DROPDOWN_TYPE = 'dropdown'; + const UDF_MULTIPLEDROPDOWN_TYPE = 'multipledropdown'; const UDF_FIELD_JSON_DESCRIPTION = 'jsons'; // UDF validation attributes @@ -39,6 +41,7 @@ class DB_Model extends FHC_Model // String values of booleans const STRING_TRUE = 'true'; const STRING_FALSE = 'false'; + const STRING_NULL = 'null'; protected $dbTable; // Name of the DB-Table for CI-Insert, -Update, ... protected $pk; // Name of the PrimaryKey for DB-Update, Load, ... @@ -866,89 +869,100 @@ class DB_Model extends FHC_Model /** * Validates UDF value */ - private function _validateUDFs($decodedUDFValidation, $udfName, $udfValue) + private function _validateUDFs($decodedUDFValidation, $udfName, $udfType, $udfValue) { $returnArrayValidation = array(); // returned value - // If $udfValue is not an array, then store it inside a new array - $tmpUdfValues = $udfValue; - if (!is_array($udfValue)) + // + if (((isset($decodedUDFValidation->validation->{DB_Model::UDF_REQUIRED}) + && $decodedUDFValidation->validation->{DB_Model::UDF_REQUIRED} === false) + || !isset($decodedUDFValidation->validation->{DB_Model::UDF_REQUIRED})) + && ($udfType == DB_Model::UDF_DROPDOWN_TYPE || $udfType == DB_Model::UDF_MULTIPLEDROPDOWN_TYPE)) { - $tmpUdfValues = array($udfValue); + $returnArrayValidation = array(); } - - // Loops through all the supplied UDFs values - foreach($tmpUdfValues as $udfValIndx => $udfVal) + else { - // If the single UDF value is not an array or an object - if (!is_array($udfVal) && !is_object($udfVal)) + // If $udfValue is not an array, then store it inside a new array + $tmpUdfValues = $udfValue; + if (!is_array($udfValue)) { - // If the UDF value is numeric (integer, float, double...) - if (is_numeric($udfVal)) + $tmpUdfValues = array($udfValue); + } + + // Loops through all the supplied UDFs values + foreach($tmpUdfValues as $udfValIndx => $udfVal) + { + // If the single UDF value is not an array or an object + if (!is_array($udfVal) && !is_object($udfVal)) { - // If min value attribute is present in the validation for this UDF, - // then checks if the value of this UDF is compliant to this attribute - if (isset($decodedUDFValidation->{DB_Model::UDF_MIN_VALUE}) - && $udfVal < $decodedUDFValidation->{DB_Model::UDF_MIN_VALUE}) + // If the UDF value is numeric (integer, float, double...) + if (is_numeric($udfVal)) { - // validation is failed and the error is stored in $returnArrayValidation - $returnArrayValidation[] = error($udfName, EXIT_VALIDATION_UDF_MIN_VALUE); + // If min value attribute is present in the validation for this UDF, + // then checks if the value of this UDF is compliant to this attribute + if (isset($decodedUDFValidation->{DB_Model::UDF_MIN_VALUE}) + && $udfVal < $decodedUDFValidation->{DB_Model::UDF_MIN_VALUE}) + { + // validation is failed and the error is stored in $returnArrayValidation + $returnArrayValidation[] = error($udfName, EXIT_VALIDATION_UDF_MIN_VALUE); + } + + // If max value attribute is present in the validation for this UDF, + // then checks if the value of this UDF is compliant to this attribute + if (isset($decodedUDFValidation->{DB_Model::UDF_MAX_VALUE}) + && $udfVal > $decodedUDFValidation->{DB_Model::UDF_MAX_VALUE}) + { + // validation is failed and the error is stored in $returnArrayValidation + $returnArrayValidation[] = error($udfName, EXIT_VALIDATION_UDF_MAX_VALUE); + } } - // If max value attribute is present in the validation for this UDF, + $strUdfVal = strval($udfVal); // store in $strUdfVal the string conversion of $udfVal + // If min length attribute is present in the validation for this UDF, // then checks if the value of this UDF is compliant to this attribute - if (isset($decodedUDFValidation->{DB_Model::UDF_MAX_VALUE}) - && $udfVal > $decodedUDFValidation->{DB_Model::UDF_MAX_VALUE}) + if (isset($decodedUDFValidation->{DB_Model::UDF_MIN_LENGTH}) && isset($strUdfVal) + && strlen($strUdfVal) < $decodedUDFValidation->{DB_Model::UDF_MIN_LENGTH}) { // validation is failed and the error is stored in $returnArrayValidation - $returnArrayValidation[] = error($udfName, EXIT_VALIDATION_UDF_MAX_VALUE); + $returnArrayValidation[] = error($udfName, EXIT_VALIDATION_UDF_MIN_LENGTH); } - } - - $strUdfVal = strval($udfVal); // store in $strUdfVal the string conversion of $udfVal - // If min length attribute is present in the validation for this UDF, - // then checks if the value of this UDF is compliant to this attribute - if (isset($decodedUDFValidation->{DB_Model::UDF_MIN_LENGTH}) && isset($strUdfVal) - && strlen($strUdfVal) < $decodedUDFValidation->{DB_Model::UDF_MIN_LENGTH}) - { - // validation is failed and the error is stored in $returnArrayValidation - $returnArrayValidation[] = error($udfName, EXIT_VALIDATION_UDF_MIN_LENGTH); - } - - // If max length attribute is present in the validation for this UDF, - // then checks if the value of this UDF is compliant to this attribute - if (isset($decodedUDFValidation->{DB_Model::UDF_MAX_LENGTH}) && isset($strUdfVal) - && strlen($strUdfVal) > $decodedUDFValidation->{DB_Model::UDF_MAX_LENGTH}) - { - // validation is failed and the error is stored in $returnArrayValidation - $returnArrayValidation[] = error($udfName, EXIT_VALIDATION_UDF_MAX_LENGTH); - } - - // If $udfVal is a string - if (is_string($udfVal)) - { - // Search for a php regular expression in the validation of this UDF, if one is found + + // If max length attribute is present in the validation for this UDF, // then checks if the value of this UDF is compliant to this attribute - if (isset($decodedUDFValidation->{DB_Model::UDF_REGEX}) - && is_array($decodedUDFValidation->{DB_Model::UDF_REGEX})) + if (isset($decodedUDFValidation->{DB_Model::UDF_MAX_LENGTH}) && isset($strUdfVal) + && strlen($strUdfVal) > $decodedUDFValidation->{DB_Model::UDF_MAX_LENGTH}) { - foreach($decodedUDFValidation->{DB_Model::UDF_REGEX} as $regexIndx => $regex) + // validation is failed and the error is stored in $returnArrayValidation + $returnArrayValidation[] = error($udfName, EXIT_VALIDATION_UDF_MAX_LENGTH); + } + + // If $udfVal is a string + if (is_string($udfVal)) + { + // Search for a php regular expression in the validation of this UDF, if one is found + // then checks if the value of this UDF is compliant to this attribute + if (isset($decodedUDFValidation->{DB_Model::UDF_REGEX}) + && is_array($decodedUDFValidation->{DB_Model::UDF_REGEX})) { - if ($regex->language == DB_Model::UDF_REGEX_LANG) + foreach($decodedUDFValidation->{DB_Model::UDF_REGEX} as $regexIndx => $regex) { - if (preg_match($regex->expression, $udfVal) != 1) + if ($regex->language == DB_Model::UDF_REGEX_LANG) { - // validation is failed and the error is stored in $returnArrayValidation - $returnArrayValidation[] = error($udfName, EXIT_VALIDATION_UDF_REGEX); + if (preg_match($regex->expression, $udfVal) != 1) + { + // validation is failed and the error is stored in $returnArrayValidation + $returnArrayValidation[] = error($udfName, EXIT_VALIDATION_UDF_REGEX); + } } } } } } - } - else // otherwise the validation is failed and the error is stored in $returnArrayValidation - { - $returnArrayValidation[] = error($udfName, EXIT_VALIDATION_UDF_NOT_VALID_VAL); + else // otherwise the validation is failed and the error is stored in $returnArrayValidation + { + $returnArrayValidation[] = error($udfName, EXIT_VALIDATION_UDF_NOT_VALID_VAL); + } } } @@ -1012,13 +1026,13 @@ class DB_Model extends FHC_Model // If this is the definition of this UDF if ($decodedUDFDefinition->{DB_Model::UDF_ATTRIBUTE_NAME} == $key) { - // If validation rules are present for this UDF - if (isset($decodedUDFDefinition->validation)) + if (isset($decodedUDFDefinition->validation)) // If validation rules are present for this UDF { // Validation!!! $validate = $this->_validateUDFs( $decodedUDFDefinition->validation, // $decodedUDFDefinition->{DB_Model::UDF_ATTRIBUTE_NAME}, // + $decodedUDFDefinition->{DB_Model::UDF_TYPE_NAME}, $val // ); @@ -1031,7 +1045,23 @@ class DB_Model extends FHC_Model && $decodedUDFDefinition->validation->{DB_Model::UDF_REQUIRED} === true && isset($requiredUDFsArray[$decodedUDFDefinition->{DB_Model::UDF_ATTRIBUTE_NAME}])) { - unset($requiredUDFsArray[$decodedUDFDefinition->{DB_Model::UDF_ATTRIBUTE_NAME}]); + // + if ($decodedUDFDefinition->{DB_Model::UDF_TYPE_NAME} == DB_Model::UDF_CHKBOX_TYPE + && ($val == DB_Model::STRING_FALSE || $val === false)) + { + // NOP + } + // + else if (($decodedUDFDefinition->{DB_Model::UDF_TYPE_NAME} == DB_Model::UDF_DROPDOWN_TYPE + || $decodedUDFDefinition->{DB_Model::UDF_TYPE_NAME} == DB_Model::UDF_MULTIPLEDROPDOWN_TYPE) + && ($val == DB_Model::STRING_NULL || $val == null)) + { + // NOP + } + else + { + unset($requiredUDFsArray[$decodedUDFDefinition->{DB_Model::UDF_ATTRIBUTE_NAME}]); + } } } @@ -1045,6 +1075,14 @@ class DB_Model extends FHC_Model if ($val == DB_Model::STRING_TRUE) $val = true; else if ($val == DB_Model::STRING_FALSE) $val = false; } + else if ($decodedUDFDefinition->{DB_Model::UDF_TYPE_NAME} == DB_Model::UDF_DROPDOWN_TYPE + || $decodedUDFDefinition->{DB_Model::UDF_TYPE_NAME} == DB_Model::UDF_MULTIPLEDROPDOWN_TYPE) + { + if ($val == DB_Model::STRING_NULL) + { + $val = null; + } + } $toBeStoredUDFsArray[$key] = $val; } @@ -1082,7 +1120,7 @@ class DB_Model extends FHC_Model { // If this field is not present in the given parameters // then copy it from the DB without changes - if (!isset($toBeStoredUDFsArray[$fieldName])) + if (!array_key_exists($fieldName, $toBeStoredUDFsArray)) { $toBeStoredUDFsArray[$fieldName] = $fieldValue; } @@ -1090,7 +1128,6 @@ class DB_Model extends FHC_Model } } } - $encodedToBeStoredUDFs = json_encode($toBeStoredUDFsArray); // encode to json if ($encodedToBeStoredUDFs !== false) // if encode was ok { diff --git a/application/libraries/WidgetLib.php b/application/libraries/WidgetLib.php index b60f28f7b..f9480d6c5 100644 --- a/application/libraries/WidgetLib.php +++ b/application/libraries/WidgetLib.php @@ -781,6 +781,8 @@ class DropdownWidget extends Widget // The name of the element of the data array given to the view // this element is used to tell what element of the dropdown is selected const SELECTED_ELEMENT = 'selectedElement'; + // + const HTML_DEFAULT_VALUE = 'null'; const SIZE = 'size'; // const MULTIPLE = 'multiple'; // @@ -795,7 +797,7 @@ class DropdownWidget extends Widget // if (!isset($this->_args[DropdownWidget::SELECTED_ELEMENT])) { - $this->_args[DropdownWidget::SELECTED_ELEMENT] = Widget::HTML_DEFAULT_VALUE; + $this->_args[DropdownWidget::SELECTED_ELEMENT] = DropdownWidget::HTML_DEFAULT_VALUE; } } @@ -804,7 +806,23 @@ class DropdownWidget extends Widget */ public function setMultiple() { - $this->_args[Widget::HTML_ARG_NAME][DropdownWidget::MULTIPLE] = 'multiple'; + $this->_args[Widget::HTML_ARG_NAME][DropdownWidget::MULTIPLE] = DropdownWidget::MULTIPLE; + } + + /** + * + */ + public function isMultipleDropdown() + { + $isMultipleDropdown = false; + + if (isset($this->_args[Widget::HTML_ARG_NAME][DropdownWidget::MULTIPLE]) + && $this->_args[Widget::HTML_ARG_NAME][DropdownWidget::MULTIPLE] == DropdownWidget::MULTIPLE) + { + $isMultipleDropdown = true; + } + + return $isMultipleDropdown; } /** @@ -835,7 +853,7 @@ class DropdownWidget extends Widget * @param string $id value of the attribute value of the empty element */ protected function setElementsArray( - $elements, $emptyElement = false, $stdDescription = '' , $noDataDescription = 'No data found' , $id = Widget::HTML_DEFAULT_VALUE + $elements, $emptyElement = false, $stdDescription = '' , $noDataDescription = 'No data found' , $id = DropdownWidget::HTML_DEFAULT_VALUE ) { $tmpElements = array(); @@ -857,7 +875,7 @@ class DropdownWidget extends Widget } else { - if ($emptyElement === true) + if ($emptyElement === true && $this->isMultipleDropdown() == false) { $tmpElements = $this->addElementAtBeginning( $elements, diff --git a/application/models/system/UDF_model.php b/application/models/system/UDF_model.php index c5aec0b52..58d7a0e8a 100644 --- a/application/models/system/UDF_model.php +++ b/application/models/system/UDF_model.php @@ -62,6 +62,7 @@ class UDF_model extends DB_Model $this->load->model('person/Person_model', 'PersonModel'); $udfs = $this->_fillMissingChkboxUDF($udfs, 'public', 'tbl_person'); + $udfs = $this->_fillMissingDropdownUDF($udfs, 'public', 'tbl_person'); $resultPerson = $this->PersonModel->update($person_id, $udfs); } @@ -73,6 +74,7 @@ class UDF_model extends DB_Model $this->load->model('crm/Prestudent_model', 'PrestudentModel'); $udfs = $this->_fillMissingChkboxUDF($udfs, 'public', 'tbl_prestudent'); + $udfs = $this->_fillMissingDropdownUDF($udfs, 'public', 'tbl_prestudent'); $resultPrestudent = $this->PrestudentModel->update($prestudent_id, $udfs); } @@ -119,4 +121,32 @@ class UDF_model extends DB_Model return $_fillMissingChkboxUDF; } + + /** + * + */ + private function _fillMissingDropdownUDF($udfs, $schema, $table) + { + $_fillMissingDropdownUDF = $udfs; + + $result = $this->load(array($schema, $table)); + if (isSuccess($result) && count($result->retval) == 1) + { + $jsons = json_decode($result->retval[0]->jsons); + + foreach($jsons as $udfDescription) + { + if ($udfDescription->{DB_Model::UDF_TYPE_NAME} == DB_Model::UDF_DROPDOWN_TYPE + || $udfDescription->{DB_Model::UDF_TYPE_NAME} == DB_Model::UDF_MULTIPLEDROPDOWN_TYPE) + { + if (!isset($_fillMissingDropdownUDF[$udfDescription->{DB_Model::UDF_ATTRIBUTE_NAME}])) + { + $_fillMissingDropdownUDF[$udfDescription->{DB_Model::UDF_ATTRIBUTE_NAME}] = DB_Model::STRING_NULL; + } + } + } + } + + return $_fillMissingDropdownUDF; + } } \ No newline at end of file diff --git a/application/views/system/udf.php b/application/views/system/udf.php index 216f8523d..23def98ba 100644 --- a/application/views/system/udf.php +++ b/application/views/system/udf.php @@ -25,9 +25,9 @@
retval; - foreach($errors as $error) + foreach ($errors as $error) { - foreach($error as $fieldError) + foreach ($error as $fieldError) { echo $fieldError->msg . ' -> ' . $fieldError->retval . '
'; } @@ -42,8 +42,7 @@ } } ?> - -
+
diff --git a/application/widgets/UDFWidget.php b/application/widgets/UDFWidget.php index c13f59862..e9f7ff97f 100644 --- a/application/widgets/UDFWidget.php +++ b/application/widgets/UDFWidget.php @@ -12,6 +12,8 @@ class UDFWidget extends UDFWidgetTpl const LIST_VALUES = 'listValues'; const REGEX_LANGUAGE = 'js'; + const PHRASES_APP_NAME = 'core'; + public function display($widgetData) { $schema = $widgetData[UDFWidgetTpl::SCHEMA_ARG_NAME]; @@ -208,7 +210,6 @@ class UDFWidget extends UDFWidgetTpl */ private function _renderDropdown($jsonSchema, $multiple = false) { - if (isset($this->_args[UDFWidgetTpl::UDFS_ARG_NAME]) && isset($this->_args[UDFWidgetTpl::UDFS_ARG_NAME][$jsonSchema->{UDFWidget::NAME}])) { @@ -305,11 +306,20 @@ class UDFWidget extends UDFWidgetTpl || isset($jsonSchema->{UDFWidgetTpl::TITLE}) || isset($jsonSchema->{UDFWidgetTpl::PLACEHOLDER})) { + // $this->_ci->load->library('PhrasesLib'); + // if (isset($jsonSchema->{UDFWidgetTpl::LABEL})) { - $tmpResult = $this->_ci->phraseslib->getPhrases('core', 'German', $jsonSchema->{UDFWidgetTpl::LABEL}, null, null, 'no'); + $tmpResult = $this->_ci->phraseslib->getPhrases( + UDFWidget::PHRASES_APP_NAME, + DEFAULT_LEHREINHEIT_SPRACHE, + $jsonSchema->{UDFWidgetTpl::LABEL}, + null, + null, + 'no' + ); if (hasData($tmpResult)) { $this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::LABEL] = $tmpResult->retval[0]->text; @@ -320,9 +330,17 @@ class UDFWidget extends UDFWidgetTpl } } + // if (isset($jsonSchema->{UDFWidgetTpl::TITLE})) { - $tmpResult = $this->_ci->phraseslib->getPhrases('core', 'German', $jsonSchema->{UDFWidgetTpl::TITLE}, null, null, 'no'); + $tmpResult = $this->_ci->phraseslib->getPhrases( + UDFWidget::PHRASES_APP_NAME, + DEFAULT_LEHREINHEIT_SPRACHE, + $jsonSchema->{UDFWidgetTpl::TITLE}, + null, + null, + 'no' + ); if (hasData($tmpResult)) { $this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::TITLE] = $tmpResult->retval[0]->text; @@ -333,9 +351,17 @@ class UDFWidget extends UDFWidgetTpl } } + // if (isset($jsonSchema->{UDFWidgetTpl::PLACEHOLDER})) { - $tmpResult = $this->_ci->phraseslib->getPhrases('core', 'German', $jsonSchema->{UDFWidgetTpl::PLACEHOLDER}, null, null, 'no'); + $tmpResult = $this->_ci->phraseslib->getPhrases( + UDFWidget::PHRASES_APP_NAME, + DEFAULT_LEHREINHEIT_SPRACHE, + $jsonSchema->{UDFWidgetTpl::PLACEHOLDER}, + null, + null, + 'no' + ); if (hasData($tmpResult)) { $this->_args[Widget::HTML_ARG_NAME][UDFWidgetTpl::PLACEHOLDER] = $tmpResult->retval[0]->text; @@ -361,7 +387,8 @@ class UDFWidget extends UDFWidgetTpl if (isset($jsonSchema->validation)) { - if (isset($jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::REGEX}) && is_array($jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::REGEX})) + if (isset($jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::REGEX}) + && is_array($jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::REGEX})) { foreach($jsonSchema->{UDFWidget::VALIDATION}->{UDFWidgetTpl::REGEX} as $regex) { diff --git a/content/udf.js.php b/content/udf.js.php index 0378427e2..bfb0d14a7 100644 --- a/content/udf.js.php +++ b/content/udf.js.php @@ -32,6 +32,6 @@ function loadUDF(person_id, prestudent_id) if (udfIFrame != null && udfIFrame.getAttribute('src') == 'about:blank') { - udfIFrame.setAttribute('src', '/core/index.ci.php/system/UDF?person_id='+person_id+'&prestudent_id='+prestudent_id); + udfIFrame.setAttribute('src', '/index.ci.php/system/UDF?person_id='+person_id+'&prestudent_id='+prestudent_id); } } \ No newline at end of file diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 97dcb5da0..3ec4e4926 100644 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -334,6 +334,20 @@ if(!$result = @$db->db_query("SELECT udf_values FROM public.tbl_prestudent LIMIT echo '
Added column udf_values to table public.tbl_prestudent'; } +// Add permission for UDF +if($result = @$db->db_query("SELECT 1 FROM system.tbl_berechtigung WHERE berechtigung_kurzbz = 'system/udf';")) +{ + if($db->db_num_rows($result) == 0) + { + $qry = "INSERT INTO system.tbl_berechtigung(berechtigung_kurzbz, beschreibung) VALUES('system/udf', 'UDF');"; + + if(!$db->db_query($qry)) + echo 'system.tbl_berechtigung '.$db->db_last_error().'
'; + else + echo ' system.tbl_berechtigung: Added permission for UDF
'; + } +} + // Spalten mailversand,teilnehmer_anonym,termine_anonym in campus.tbl_coodle if(!$result = @$db->db_query("SELECT mailversand FROM campus.tbl_coodle LIMIT 1;")) {