| @@ 1186-1196 (lines=11) @@ | ||
| 1183 | $isDuplicate = false; |
|
| 1184 | $queueForDeletion = null; |
|
| 1185 | ||
| 1186 | if ($this->_context['action'] === 'new' && is_file($file)) { |
|
| 1187 | $isDuplicate = true; |
|
| 1188 | } elseif ($this->_context['action'] === 'edit') { |
|
| 1189 | $existing_handle = $this->_context['handle']; |
|
| 1190 | ||
| 1191 | if ($classname !== $existing_handle && is_file($file)) { |
|
| 1192 | $isDuplicate = true; |
|
| 1193 | } elseif ($classname !== $existing_handle) { |
|
| 1194 | $queueForDeletion = DATASOURCES . '/data.' . $existing_handle . '.php'; |
|
| 1195 | } |
|
| 1196 | } |
|
| 1197 | ||
| 1198 | // Duplicate |
|
| 1199 | if ($isDuplicate) { |
|
| @@ 437-447 (lines=11) @@ | ||
| 434 | $isDuplicate = false; |
|
| 435 | $queueForDeletion = null; |
|
| 436 | ||
| 437 | if ($this->_context['action'] === 'new' && is_file($file)) { |
|
| 438 | $isDuplicate = true; |
|
| 439 | } elseif ($this->_context['action'] === 'edit') { |
|
| 440 | $existing_handle = $this->_context['handle']; |
|
| 441 | ||
| 442 | if ($classname !== $existing_handle && is_file($file)) { |
|
| 443 | $isDuplicate = true; |
|
| 444 | } elseif ($classname !== $existing_handle) { |
|
| 445 | $queueForDeletion = EVENTS . '/event.' . $existing_handle . '.php'; |
|
| 446 | } |
|
| 447 | } |
|
| 448 | ||
| 449 | // Duplicate |
|
| 450 | if ($isDuplicate) { |
|