BobRay / UpgradeMODX

A dashboard widget that detects upgrades and (optionally) installs them from within the MODX Manager
https://bobsguides.com/upgrade-modx-package.html
22 stars 14 forks source link

Cache file downloaded #54

Closed FerX closed 5 years ago

FerX commented 5 years ago

I have many modx sites installed on the same server. It would be useful for the downloaded file to be saved in /tmp/UpgradeMODX/... and reused by other sites.

BobRay commented 5 years ago

Interesting idea.

You could accomplish this by setting the ugm_temp_dir System Setting to that path, then make these two changes:

Comment out line 50 of the core/components/upgrademodx/processors/cleanup.class.php file:

// $this->rrmdir($this->tempDir);

Change line 153 of the core/components/upgrademodx/processors/downloadfiles.class.php file

from this:

if ((!$this->devMode) || (!file_exists($this->tempDir . $this->zipFileName))) {

to this:

if (!file_exists($this->tempDir . $this->zipFileName)) {

FerX commented 5 years ago

thanks,

BobRay commented 5 years ago

Thanks for the idea. I haven't had time to test it yet, but the instructions are on the support page at Bob's guides (see the Multiple Installs section).