BobRay/UpgradeMODX

Cache file downloaded

FerX opened this issue · 3 comments

FerX commented

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.

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

thanks,

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).