From 5b25162baf0accb0b6b410fa679c19689ef0667b Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Thu, 10 Mar 2016 23:23:54 +0200 Subject: [PATCH] fixed import error with version is ignored. --- README.md | 2 +- admin/models/import.php | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index 4e5de778..58d00021 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ due to [Automated Component Builder] (https://www.vdm.io/joomla-component-builde > (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**, > never making one mistake or taking any coffee break.) -+ *Line count*: **48066** ++ *Line count*: **48060** + *File count*: **351** + *Folder count*: **79** diff --git a/admin/models/import.php b/admin/models/import.php index 8a6398e9..070e5481 100644 --- a/admin/models/import.php +++ b/admin/models/import.php @@ -508,7 +508,6 @@ class SermondistributorModelImport extends JModelLegacy // reset all buckets $query = $db->getQuery(true); $fields = array(); - $version = false; // Fields to update. foreach($row as $key => $cell) { @@ -531,7 +530,6 @@ class SermondistributorModelImport extends JModelLegacy if ('version' == $target[$key]) { $cell = (int) $version + 1; - $version = true; } // verify publish authority if ('published' == $target[$key] && !$canState) @@ -556,10 +554,6 @@ class SermondistributorModelImport extends JModelLegacy // load the defaults $fields[] = $db->quoteName('modified_by') . ' = ' . $db->quote($user->id); $fields[] = $db->quoteName('modified') . ' = ' . $db->quote($todayDate); - if (!$version) - { - $fields[] = $db->quoteName('version') . " = " . (int) $version + 1; - } // Conditions for which records should be updated. $conditions = array( $db->quoteName('id') . ' = ' . $id