| @@ 1441-1451 (lines=11) @@ | ||
| 1438 | $isDuplicate = false; |
|
| 1439 | $queueForDeletion = null; |
|
| 1440 | ||
| 1441 | if ($this->_context['action'] === 'new' && is_file($file)) { |
|
| 1442 | $isDuplicate = true; |
|
| 1443 | } elseif ($this->_context['action'] === 'edit') { |
|
| 1444 | $existing_handle = $this->_context['handle']; |
|
| 1445 | ||
| 1446 | if ($classname !== $existing_handle && is_file($file)) { |
|
| 1447 | $isDuplicate = true; |
|
| 1448 | } elseif ($classname !== $existing_handle) { |
|
| 1449 | $queueForDeletion = DATASOURCES . '/data.' . $existing_handle . '.php'; |
|
| 1450 | } |
|
| 1451 | } |
|
| 1452 | ||
| 1453 | // Duplicate |
|
| 1454 | if ($isDuplicate) { |
|
| @@ 427-437 (lines=11) @@ | ||
| 424 | $isDuplicate = false; |
|
| 425 | $queueForDeletion = null; |
|
| 426 | ||
| 427 | if ($this->_context['action'] === 'new' && is_file($file)) { |
|
| 428 | $isDuplicate = true; |
|
| 429 | } elseif ($this->_context['action'] === 'edit') { |
|
| 430 | $existing_handle = $this->_context['handle']; |
|
| 431 | ||
| 432 | if ($classname !== $existing_handle && is_file($file)) { |
|
| 433 | $isDuplicate = true; |
|
| 434 | } elseif ($classname !== $existing_handle) { |
|
| 435 | $queueForDeletion = EVENTS . '/event.' . $existing_handle . '.php'; |
|
| 436 | } |
|
| 437 | } |
|
| 438 | ||
| 439 | // Duplicate |
|
| 440 | if ($isDuplicate) { |
|