diff --git a/extension.meta.xml b/extension.meta.xml index 82dc164..ae32779 100644 --- a/extension.meta.xml +++ b/extension.meta.xml @@ -22,6 +22,10 @@ + + - Update modification date on import + - Fix string handling + - Added support for the `ImportableField` interface - Added logging for when errors occur @@ -50,4 +54,4 @@ - Initial beta release for Symphony 2.0.7. - \ No newline at end of file + diff --git a/lib/class.xmlimporter.php b/lib/class.xmlimporter.php index 331763b..76219e2 100644 --- a/lib/class.xmlimporter.php +++ b/lib/class.xmlimporter.php @@ -263,7 +263,7 @@ function handleXMLError($errno, $errstr, $errfile, $errline, $context) { $value = $value[0]; } - else { + else if (is_array($value)) { $value = implode('', $value); } } @@ -292,6 +292,8 @@ function handleXMLError($errno, $errstr, $errfile, $errline, $context) { public function commit() { $options = $this->options(); $existing = array(); + $modificationDate = DateTimeObj::get('Y-m-d H:i:s'); + $modificationDateGmt = DateTimeObj::getGMT('Y-m-d H:i:s'); $section = SectionManager::fetch($options['section']); @@ -331,6 +333,8 @@ public function commit() { if ($options['can-update'] == 'yes') { $entry->set('id', $existing[$index]); $entry->set('importer_status', 'updated'); + $entry->set('modification_date', $modificationDate); + $entry->set('modification_date_gmt', $modificationDateGmt); } // Skip