Skip to content

Commit

Permalink
Upgrade - Correctly overwrite the CSS and JS files when upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
mdouchin committed Jun 27, 2023
1 parent 725d6b4 commit a4fc907
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

### Fixed

* Upgrade method - Overwrite the existing JavaScript and CSS files by the new versions
when running the upgrade.

## 1.0.4 - 2023-06-27

### Changed
Expand Down
5 changes: 3 additions & 2 deletions pgrouting/install/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class pgroutingModuleUpgrader extends jInstallerModule
public function install()
{
// Copy CSS and JS assets
$this->copyDirectoryContent('../www/css', jApp::wwwPath('assets/pgrouting/css'));
$this->copyDirectoryContent('../www/js/dist', jApp::wwwPath('assets/pgrouting/js'));
$overwrite = true;
$this->copyDirectoryContent('../www/css', jApp::wwwPath('assets/pgrouting/css'), $overwrite);
$this->copyDirectoryContent('../www/js/dist', jApp::wwwPath('assets/pgrouting/js'), $overwrite);
}
}

0 comments on commit a4fc907

Please sign in to comment.