From: vincent@cubedesigners.com Date: Thu, 5 Oct 2017 14:54:12 +0000 (+0000) Subject: done #1694 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a251ef8d2c0bf7a58bb423abb8c96da9ce96a5f0;p=cubeextranet.git done #1694 @1.5 --- diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index 9ca6671ff..387a4e205 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -1412,7 +1412,7 @@ class wsMaintenance { $png = WS_ICONS . '/' . $iconSet . '/' . $dest . '.png'; $tmp1 = CubeIT_Files::tempnam() . '.png'; - $cmd = "/usr/bin/convert -density 200 -resize 20x20 -background none $tmp $tmp1"; + $cmd = "/usr/bin/convert -density 200 -resize 25x25 -background none $tmp $tmp1"; echo $cmd . "\n"; echo `$cmd` . "\n"; @@ -1514,6 +1514,13 @@ class wsMaintenance { file_put_contents(WS_ICONS . '/' . $iconSet . '/interface.svg', $res); } } + + public static function installAtlanticCommunicationBook() { + $exporter = new wsExporter(); + $exporter->export(15316, $x, 'install_ftp', 'online', "atlanticki-01:Tjz3N85h@ftp.cluster023.hosting.ovh.net/www/", ''); + header('Location: http://www.atlantic-international-book-com.com/'); + exit; + } } diff --git a/inc/ws/Util/class.ws.exporter.php b/inc/ws/Util/class.ws.exporter.php index 8513e965c..dbfd36097 100644 --- a/inc/ws/Util/class.ws.exporter.php +++ b/inc/ws/Util/class.ws.exporter.php @@ -13,6 +13,7 @@ class wsExporter { public $destinationDir; public $destinationFile; public $x; + public $ftpPassiveMode=false; const VINCENT = "paris.cubedesigners.com"; @@ -352,7 +353,7 @@ class wsExporter { } if (stristr($path, 'ftp://')) { - $this->_lftp($p, $path, false); + $this->_lftp($p, $path, $this->ftpPassiveMode); } else { $this->_rsync($p, $path); } @@ -423,7 +424,7 @@ class wsExporter { } } - $lftp = new cubeCommandLine('lftp'); + $lftp = new CubeIT_CommandLine('lftp'); $lftp->setArg('u', $u['user'] . ',' . $u['pass']); $lftp->setArg('p', $u['port']); $lftp->setArg('e', implode(';', $commandes)); diff --git a/inc/ws/Util/class.ws.util.php b/inc/ws/Util/class.ws.util.php index 95ddd19b1..c6a3ba172 100644 --- a/inc/ws/Util/class.ws.util.php +++ b/inc/ws/Util/class.ws.util.php @@ -62,7 +62,7 @@ class wsUtil { } $url = str_replace(' ', '%20', $v); $cache = WS_CACHE . '/atlantic/' . md5($url); - if (!file_exists($cache)) { + if (!file_exists($cache) || filemtime($url) > filemtime($cache)) { copy($url, $cache); $copylog = ' (copy) '; } else {