| @@ 499-524 (lines=26) @@ | ||
| 496 | } |
|
| 497 | ||
| 498 | */ |
|
| 499 | if ($path == $oldpath) |
|
| 500 | { |
|
| 501 | $id = LocaliseHelper::getFileId($path); |
|
| 502 | $this->setState('packagefile.id', $id); |
|
| 503 | ||
| 504 | // Bind the rules. |
|
| 505 | $table = $this->getTable(); |
|
| 506 | $table->load($id); |
|
| 507 | } |
|
| 508 | else |
|
| 509 | { |
|
| 510 | $table = $this->getTable(); |
|
| 511 | ||
| 512 | if (!$table->delete((int) $originalId)) |
|
| 513 | { |
|
| 514 | $this->setError($table->getError()); |
|
| 515 | ||
| 516 | return false; |
|
| 517 | } |
|
| 518 | ||
| 519 | $table->store(); |
|
| 520 | ||
| 521 | $id = LocaliseHelper::getFileId($path); |
|
| 522 | $this->setState('packagefile.id', $id); |
|
| 523 | $app->setUserState('com_localise.edit.packagefile.id', $id); |
|
| 524 | } |
|
| 525 | ||
| 526 | if (isset($data['rules'])) |
|
| 527 | { |
|
| @@ 515-540 (lines=26) @@ | ||
| 512 | return false; |
|
| 513 | } |
|
| 514 | */ |
|
| 515 | if ($path == $oldpath) |
|
| 516 | { |
|
| 517 | $id = LocaliseHelper::getFileId($path); |
|
| 518 | $this->setState('package.id', $id); |
|
| 519 | ||
| 520 | // Bind the rules. |
|
| 521 | $table = $this->getTable(); |
|
| 522 | $table->load($id); |
|
| 523 | } |
|
| 524 | else |
|
| 525 | { |
|
| 526 | $table = $this->getTable(); |
|
| 527 | ||
| 528 | if (!$table->delete((int) $originalId)) |
|
| 529 | { |
|
| 530 | $this->setError($table->getError()); |
|
| 531 | ||
| 532 | return false; |
|
| 533 | } |
|
| 534 | ||
| 535 | $table->store(); |
|
| 536 | ||
| 537 | $id = LocaliseHelper::getFileId($path); |
|
| 538 | $this->setState('package.id', $id); |
|
| 539 | $app->setUserState('com_localise.edit.package.id', $id); |
|
| 540 | } |
|
| 541 | ||
| 542 | if (isset($data['rules'])) |
|
| 543 | { |
|