From c66219770c2f0ebe80abf6143e4c5715ab5b15c6 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Fri, 21 May 2021 01:27:10 +0200 Subject: [PATCH] Fixed gh-749 to allow numbers on language imports. --- README.md | 4 ++-- admin/README.txt | 4 ++-- admin/models/import_language_translations.php | 3 ++- componentbuilder.xml | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e3836b369..44d88c14a 100644 --- a/README.md +++ b/README.md @@ -143,11 +143,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 19th May, 2021 ++ *Last Build*: 20th May, 2021 + *Version*: 2.12.9 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **291955** ++ *Line count*: **291956** + *Field count*: **1629** + *File count*: **1935** + *Folder count*: **322** diff --git a/admin/README.txt b/admin/README.txt index e3836b369..44d88c14a 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -143,11 +143,11 @@ TODO + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 19th May, 2021 ++ *Last Build*: 20th May, 2021 + *Version*: 2.12.9 + *Copyright*: Copyright (C) 2015 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt -+ *Line count*: **291955** ++ *Line count*: **291956** + *Field count*: **1629** + *File count*: **1935** + *Folder count*: **322** diff --git a/admin/models/import_language_translations.php b/admin/models/import_language_translations.php index f53b5fb71..073898ee1 100644 --- a/admin/models/import_language_translations.php +++ b/admin/models/import_language_translations.php @@ -508,7 +508,8 @@ class ComponentbuilderModelImport_language_translations extends JModelLegacy { $found = false; $has_id = false; - if ($canEdit && isset($row[$source_key]) && ComponentbuilderHelper::checkString($row[$source_key])) + // check that we have a string or a number<-(which is weird... but happens at times) + if ($canEdit && isset($row[$source_key]) && (ComponentbuilderHelper::checkString($row[$source_key]) || is_numeric($row[$source_key]))) { // raw items import & update! $query = $db->getQuery(true); diff --git a/componentbuilder.xml b/componentbuilder.xml index 8b9d45963..f9449089a 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 19th May, 2021 + 20th May, 2021 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com