fixed import error with version is ignored.

This commit is contained in:
2016-03-10 23:23:23 +02:00
parent 0c30fa7f68
commit 306b6b9787
1485 changed files with 244759 additions and 375 deletions

View File

@@ -11,7 +11,7 @@
/-------------------------------------------------------------------------------------------------------------------------------/
@version 2.1.2
@build 4th March, 2016
@build 10th March, 2016
@created 30th April, 2015
@package Component Builder
@subpackage import.php
@@ -509,7 +509,6 @@ class ComponentbuilderModelImport extends JModelLegacy
// reset all buckets
$query = $db->getQuery(true);
$fields = array();
$version = false;
// Fields to update.
foreach($row as $key => $cell)
{
@@ -532,7 +531,6 @@ class ComponentbuilderModelImport extends JModelLegacy
if ('version' == $target[$key])
{
$cell = (int) $version + 1;
$version = true;
}
// verify publish authority
if ('published' == $target[$key] && !$canState)
@@ -557,10 +555,6 @@ class ComponentbuilderModelImport 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