diff --git a/content/00-welcome/02-get-help.md b/content/00-welcome/02-get-help.md index c0f3ed4..b121e36 100644 --- a/content/00-welcome/02-get-help.md +++ b/content/00-welcome/02-get-help.md @@ -4,12 +4,6 @@ If you need any help, then please read the [documentation on typemill.net](https If you found a bug or if you have a question, then please open a new issue on [GitHub](https://github.com/typemill/typemill/issues). -Test -: my Term - -Second -: My new - Do you need professional help, an individual theme or a special plugin? You can hire us at [Trendschau Digital](https://trendschau.net/typemill-development). [Contributions](https://github.com/typemill/typemill#contributors--supporters), [donations](https://www.paypal.me/typemill) and [feedback](https://github.com/typemill/typemill/issues) for this open source project are always welcome. diff --git a/system/Controllers/MetaApiController.php b/system/Controllers/MetaApiController.php index 428693d..d785ae5 100644 --- a/system/Controllers/MetaApiController.php +++ b/system/Controllers/MetaApiController.php @@ -127,6 +127,7 @@ class MetaApiController extends ContentController $metascheme[$tabname][$fieldname] = true; $metadata[$tabname][$fieldname] = isset($pagemeta[$tabname][$fieldname]) ? $pagemeta[$tabname][$fieldname] : null; + /* # special treatment for customfields if(isset($fielddefinitions['type']) && ($fielddefinitions['type'] == 'customfields' ) && $metadata[$tabname][$fieldname] ) { @@ -134,6 +135,7 @@ class MetaApiController extends ContentController $metadata[$tabname][$fieldname] = $this->customfieldsPrepareForEdit($metadata[$tabname][$fieldname]); } + */ } } @@ -221,6 +223,7 @@ class MetaApiController extends ContentController $errors[$tab][$fieldName] = $result[$fieldName][0]; } + /* # special treatment for customfields if($fieldDefinition && isset($fieldDefinition['type']) && ($fieldDefinition['type'] == 'customfields' ) ) { @@ -232,6 +235,7 @@ class MetaApiController extends ContentController $metaInput[$fieldName] = $this->customfieldsPrepareForSave($metaInput[$fieldName], $arrayFeatureOn); } + */ } } diff --git a/system/Models/Validation.php b/system/Models/Validation.php index e7d5289..6b2c69d 100644 --- a/system/Models/Validation.php +++ b/system/Models/Validation.php @@ -63,16 +63,20 @@ class Validation return true; }, 'contains one or more invalid ip-adress.'); - Validator::addRule('customfields', function($field, $value, array $params, array $fields) use ($user) + Validator::addRule('customfields', function($field, $customfields, array $params, array $fields) use ($user) { - foreach($value as $customfield) + if(empty($customfields)) { - if(!isset($customfield['key']) OR empty($customfield['key']) OR (preg_match('/^([a-z0-9])+$/i', $customfield['key']) == false) ) + return true; + } + foreach($customfields as $key => $value) + { + if(!isset($key) OR empty($key) OR (preg_match('/^([a-z0-9])+$/i', $key) == false) ) { return false; } - if (!isset($customfield['value']) OR empty($customfield['value']) OR ( $customfield['value'] != strip_tags($customfield['value']) ) ) + if (!isset($value) OR empty($value) OR ( $value != strip_tags($value) ) ) { return false; } @@ -134,7 +138,7 @@ class Validation } # return valitron standard object - public function returnValitron(array $params) + public function returnValidator(array $params) { return new Validator($params); } diff --git a/system/author/js/vue-shared.js b/system/author/js/vue-shared.js index e86ce6e..8768785 100644 --- a/system/author/js/vue-shared.js +++ b/system/author/js/vue-shared.js @@ -368,6 +368,7 @@ Vue.component('component-customfields', { fielderrors: false, fielddetails: {}, disableaddbutton: false, + cfvalue: [{}] } }, template: '