Skip to content
This repository has been archived by the owner on Apr 5, 2018. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/0.6.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Olde Hampsink committed May 21, 2014
2 parents 819e256 + b26f381 commit 10b3829
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Map fields (2)

Changelog
=================
###0.6.7###
- Bugfix: Criteria matching now checks all statuses and has no limit

###0.6.6###
- Added an "onBeforeImportDelete" event, so your plugin can intervene on deletion by this plugin

Expand Down
5 changes: 4 additions & 1 deletion services/ImportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ public function row($row, $data, $settings) {

// Match with current data
$criteria = craft()->elements->getCriteria(ElementType::Entry);
$criteria->limit = null;
$criteria->status = isset($settings['map']['status']) ? $settings['map']['status'] : null;
$criteria->sectionId = $settings['section'];

foreach($settings['map'] as $key => $value) {
if(isset($settings['unique'][$key]) && $settings['unique'][$key] == 1) {
if(isset($criteria->$settings['map'][$key]) && isset($settings['unique'][$key]) && $settings['unique'][$key] == 1) {
$criteria->$settings['map'][$key] = $fields[$value];
}
}
Expand Down

0 comments on commit 10b3829

Please sign in to comment.