| @@ 602-611 (lines=10) @@ | ||
| 599 | // Delete old files |
|
| 600 | $delete = JFolder::files(JPATH_ROOT . '/tmp/', 'com_localise_', false, true); |
|
| 601 | ||
| 602 | if (!empty($delete)) |
|
| 603 | { |
|
| 604 | if (!JFile::delete($delete)) |
|
| 605 | { |
|
| 606 | // JFile::delete throws an error |
|
| 607 | $this->setError(JText::_('COM_LOCALISE_ERROR_EXPORT_ZIPDELETE')); |
|
| 608 | ||
| 609 | return false; |
|
| 610 | } |
|
| 611 | } |
|
| 612 | ||
| 613 | foreach ($data['translations'] as $translation) |
|
| 614 | { |
|
| @@ 627-636 (lines=10) @@ | ||
| 624 | // Delete old files |
|
| 625 | $delete = JFolder::files(JPATH_ROOT . '/tmp/', 'com_localise_', false, true); |
|
| 626 | ||
| 627 | if (!empty($delete)) |
|
| 628 | { |
|
| 629 | if (!JFile::delete($delete)) |
|
| 630 | { |
|
| 631 | // JFile::delete throws an error |
|
| 632 | $this->setError(JText::_('COM_LOCALISE_ERROR_EXPORT_ZIPDELETE')); |
|
| 633 | ||
| 634 | return false; |
|
| 635 | } |
|
| 636 | } |
|
| 637 | ||
| 638 | foreach ($data['translations'] as $translation) |
|
| 639 | { |
|