Code Duplication    Length = 12-12 lines in 2 locations

importexport/inc/class.importexport_basic_import_csv.inc.php 1 location

@@ 248-259 (lines=12) @@
245
						die('condition / action not supported!!!');
246
						break;
247
				}
248
				if($result)
249
				{
250
					// Apply true action to any matching records found
251
					$action = $condition['true'];
252
					$success = ($this->action(  $action['action'], $record, $import_csv->get_current_position() ));
253
				}
254
				else
255
				{
256
					// Apply false action if no matching records found
257
					$action = $condition['false'];
258
					$success = ($this->action(  $action['action'], $record, $import_csv->get_current_position() ));
259
				}
260
				if ($action['stop']) break;
261
			}
262
		} else {

addressbook/inc/class.addressbook_import_contacts_csv.inc.php 1 location

@@ 230-241 (lines=12) @@
227
					case 'equal':
228
						// Match on field
229
						$result = $this->equal($record, $condition);
230
						if($result)
231
						{
232
							// Apply true action to any matching records found
233
							$action = $condition['true'];
234
							$success = ($this->action(  $action['action'], $record, $import_csv->get_current_position() ));
235
						}
236
						else
237
						{
238
							// Apply false action if no matching records found
239
							$action = $condition['false'];
240
							$success = ($this->action(  $action['action'], $record, $import_csv->get_current_position() ));
241
						}
242
						break;
243
244
					// not supported action