]> _ Git - cubeextranet.git/commitdiff
done #1694 @1.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 5 Oct 2017 14:54:12 +0000 (14:54 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 5 Oct 2017 14:54:12 +0000 (14:54 +0000)
inc/ws/Controlleur/class.ws.maintenance.php
inc/ws/Util/class.ws.exporter.php
inc/ws/Util/class.ws.util.php

index 9ca6671ffde78b17de18819cea323065191eb059..387a4e2053fdbf6fa2315287eab6f27c3c3c9643 100644 (file)
@@ -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;
+       }
 }
 
 
index 8513e965c73472384e7a578da8ac2ca063a6564a..dbfd36097c5e69ccbb851da7ffd943eb9824613e 100644 (file)
@@ -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));
index 95ddd19b1397591f2cd28b28ce6abc823233dc9b..c6a3ba1726c87c5395b6d68ee5d36cca42703982 100644 (file)
@@ -62,7 +62,7 @@ class wsUtil {
                                                }\r
                                                $url = str_replace(' ', '%20', $v);\r
                                                $cache = WS_CACHE . '/atlantic/' . md5($url);\r
-                                               if (!file_exists($cache)) {\r
+                                               if (!file_exists($cache) || filemtime($url) > filemtime($cache)) {\r
                                                        copy($url, $cache);\r
                                                        $copylog = ' (copy) ';\r
                                                } else {\r