From c83c2b854910efc6470b929d71a1d1d917a32a70 Mon Sep 17 00:00:00 2001 From: aB0t Date: Mon, 5 Jun 2023 00:30:52 +0200 Subject: [PATCH] update 2023-06-05 00:30:52 --- .../README.md | 2 +- .../code.php | 24 +++++-------------- .../code.power | 22 +++++------------ .../settings.json | 8 ------- 4 files changed, 13 insertions(+), 43 deletions(-) diff --git a/src/91b37bd7-b314-48be-91cf-434ec823bd80/README.md b/src/91b37bd7-b314-48be-91cf-434ec823bd80/README.md index 8eeb77f..4055382 100644 --- a/src/91b37bd7-b314-48be-91cf-434ec823bd80/README.md +++ b/src/91b37bd7-b314-48be-91cf-434ec823bd80/README.md @@ -71,7 +71,7 @@ note right of Upsert::getTable end note note right of Upsert::modelDistributionHistory - Model Translation History + Model Distribution History since: 2.0.1 return: mixed diff --git a/src/91b37bd7-b314-48be-91cf-434ec823bd80/code.php b/src/91b37bd7-b314-48be-91cf-434ec823bd80/code.php index 17a65e0..ec1c641 100644 --- a/src/91b37bd7-b314-48be-91cf-434ec823bd80/code.php +++ b/src/91b37bd7-b314-48be-91cf-434ec823bd80/code.php @@ -14,8 +14,6 @@ namespace VDM\Joomla\GetBible\Model; use VDM\Joomla\GetBible\Config; use VDM\Joomla\GetBible\Table; -use VDM\Joomla\Utilities\StringHelper; -use VDM\Joomla\Utilities\ArrayHelper; use VDM\Joomla\Utilities\ObjectHelper; use VDM\Joomla\Interfaces\ModelInterface; use VDM\Joomla\Abstraction\Model; @@ -73,7 +71,7 @@ final class Upsert extends Model implements ModelInterface // check if this is a valid table if (($store = $this->table->get($table, $field, 'store')) !== null) { - // Model Translation History + // Model Distribution History if ($table === 'translation' && $field === 'distribution_history') { $value = $this->modelDistributionHistory($value); @@ -103,13 +101,8 @@ final class Upsert extends Model implements ModelInterface */ protected function validateBefore(&$value, ?string $field = null, ?string $table = null): bool { - // check values - if (StringHelper::check($value) || ArrayHelper::check($value, true) || ObjectHelper::check($value) || is_numeric($value)) - { - return true; - } - // remove empty values - return false; + // add all values + return true; } /** @@ -124,13 +117,8 @@ final class Upsert extends Model implements ModelInterface */ protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool { - // only strings or numbers allowed - if (StringHelper::check($value) || is_numeric($value)) - { - return true; - } - // remove empty values - return false; + // add all values + return true; } /** @@ -145,7 +133,7 @@ final class Upsert extends Model implements ModelInterface } /** - * Model Translation History + * Model Distribution History * * @param mixed $value The value to model * diff --git a/src/91b37bd7-b314-48be-91cf-434ec823bd80/code.power b/src/91b37bd7-b314-48be-91cf-434ec823bd80/code.power index b945487..1977223 100644 --- a/src/91b37bd7-b314-48be-91cf-434ec823bd80/code.power +++ b/src/91b37bd7-b314-48be-91cf-434ec823bd80/code.power @@ -43,7 +43,7 @@ // check if this is a valid table if (($store = $this->table->get($table, $field, 'store')) !== null) { - // Model Translation History + // Model Distribution History if ($table === 'translation' && $field === 'distribution_history') { $value = $this->modelDistributionHistory($value); @@ -73,13 +73,8 @@ */ protected function validateBefore(&$value, ?string $field = null, ?string $table = null): bool { - // check values - if (StringHelper::check($value) || ArrayHelper::check($value, true) || ObjectHelper::check($value) || is_numeric($value)) - { - return true; - } - // remove empty values - return false; + // add all values + return true; } /** @@ -94,13 +89,8 @@ */ protected function validateAfter(&$value, ?string $field = null, ?string $table = null): bool { - // only strings or numbers allowed - if (StringHelper::check($value) || is_numeric($value)) - { - return true; - } - // remove empty values - return false; + // add all values + return true; } /** @@ -115,7 +105,7 @@ } /** - * Model Translation History + * Model Distribution History * * @param mixed $value The value to model * diff --git a/src/91b37bd7-b314-48be-91cf-434ec823bd80/settings.json b/src/91b37bd7-b314-48be-91cf-434ec823bd80/settings.json index e85fe35..eb7d0ea 100644 --- a/src/91b37bd7-b314-48be-91cf-434ec823bd80/settings.json +++ b/src/91b37bd7-b314-48be-91cf-434ec823bd80/settings.json @@ -20,14 +20,6 @@ "use": "ff8d5fdb-2d1f-4178-bd18-a43b8efd1068", "as": "default" }, - "use_selection2": { - "use": "1f28cb53-60d9-4db1-b517-3c7dc6b429ef", - "as": "default" - }, - "use_selection3": { - "use": "0a59c65c-9daf-4bc9-baf4-e063ff9e6a8a", - "as": "default" - }, "use_selection4": { "use": "91004529-94a9-4590-b842-e7c6b624ecf5", "as": "default"