fixed import error with version is ignored.

This commit is contained in:
Llewellyn van der Merwe 2016-03-10 23:23:54 +02:00
parent e66981cd21
commit 5b25162baf
2 changed files with 1 additions and 7 deletions

View File

@ -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**

View File

@ -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