From 5264aec8530db9ee965feac5180758d225a3a93c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 27 Dec 2017 20:21:19 +0100 Subject: [PATCH] Add js into export of website --- htdocs/website/class/website.class.php | 6 ++++++ htdocs/website/index.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 1291e54840c..d72ffbb4731 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -803,6 +803,12 @@ class Website extends CommonObject dol_syslog("Copy content from ".$srcdir." into ".$destdir); dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacement); + $srcdir = DOL_DATA_ROOT.'/medias/js/'.$website->ref; + $destdir = $conf->website->dir_temp.'/'.$website->ref.'/medias/js/'.$website->ref; + + dol_syslog("Copy content from ".$srcdir." into ".$destdir); + dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacement); + // Build sql file dol_syslog("Create containers dir"); dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/containers'); diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 61455836ef1..70b92dabc71 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1183,7 +1183,7 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf } // Export site -if (GETPOST('exportsite')) +if (GETPOST('exportsite','alpha')) { $fileofzip = $object->exportWebSite();