From: vincent@cubedesigners.com Date: Wed, 13 Feb 2013 13:14:22 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=dac3f0f1b67212564f6cffe4b651288f5487215e;p=cubeextranet.git --- diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index 630e541a9..f01e7d1b4 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -975,7 +975,7 @@ class wsDAOBook extends commonDAO { public function copy($source, $dest) { copy($source, $dest); - touch($dest, filemtime($dest)); + touch($dest, filemtime($source)); } public function compileAir($book_id) { @@ -1427,6 +1427,8 @@ class wsDAOBook extends commonDAO { $invalid = true; } + fb($invalid, 'invalid ?'); + if ($invalid) { $pdfList = array(); $pagesList = array(); @@ -1457,6 +1459,7 @@ class wsDAOBook extends commonDAO { } if ($original) { + fb($normalPDF, 'original'); $this->copy(WS_DOCS . '/' . $firstDoc . '/crop.pdf', $normalPDF); } else { $args = ''; @@ -1520,6 +1523,9 @@ class wsDAOBook extends commonDAO { $args .= ' output ' . $normalPDF; $cached = WS_BOOKS . '/pdf/' . $hash . '.pdf'; + + fb($cached); + if (file_exists($cached)) { $this->copy($cached, $normalPDF); } else { @@ -1551,6 +1557,9 @@ class wsDAOBook extends commonDAO { $gs->setArg('-dAutoRotatePages=/None'); $gs->setArg(null, $normalPDF); $gs->execute(); + + fb($gs->commande); + fb($gs->output); } copy($compressedPDF, $finalPDF); } else { diff --git a/inc/ws/Util/class.ws.exporter.php b/inc/ws/Util/class.ws.exporter.php index cdda4fde6..9cbb2fb03 100644 --- a/inc/ws/Util/class.ws.exporter.php +++ b/inc/ws/Util/class.ws.exporter.php @@ -113,7 +113,7 @@ class wsExporter { protected function _transfertPhonegap($os, $package, $destination) { if ($os == 'android') { - $this->_lftp($package, 'ftp://android:DlSa1LGw@paris.cubedesigners.com:22122/' . $destination, false, true); + $this->_rsync($package, '/home/dev/Works/Phonegap/Projects/' . $destination, true); } else if ($os == 'ios') { $this->_rsync($package, '/mnt/macbook/Phonegap/Projects/' . $destination, true); } @@ -163,14 +163,19 @@ class wsExporter { $lftp->execute(); } - protected function _rsync($src, $dest, $erase = false) { - + protected function _rsync($src, $dest, $erase = false, $chown = null) { + if (!is_null($chown)) { + + } if (is_file($src)) { $dir = dirname($dest); if (!file_exists($dir)) { mkdir($dir, 0777, true); } copy($src, $dest); + if (!is_null($chown)) { + `chown $chown $dest`; + } return; } @@ -190,6 +195,10 @@ class wsExporter { $cp->setArg(null, $src . '*'); $cp->setArg(null, $dest); $cp->execute(); + + if (!is_null($chown)) { + `chown -R $chown $dest`; + } } protected function _download() { diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 777911c81..50b04f031 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -1045,11 +1045,11 @@ class wsHTML5Compiler { $border = $menuMultiply2->setAlpha(0.5)->toCSS(); $chapters = "ul.chapters a.level-1,ul.chapters a.level0,ul.chapters a.level1,ul.chapters a.level2,ul.chapters a.level3{ - background: -moz-linear-gradient(top, $top 0%, $bottom 100%); /* FF3.6+ */ - background: -webkit-linear-gradient(top, $top 0%,$bottom 100%); /* Chrome10+,Safari5.1+ */ - background: -o-linear-gradient(top, $top 0%,rgba(0,0,0,0.5) 100%); /* Opera 11.10+ */ - background: -ms-linear-gradient(top, $top 0%,$bottom 100%); /* IE10+ */ - background: linear-gradient(top bottom, $top 0%,$bottom 100%); /* W3C */ + background-image: -moz-linear-gradient(top, $top 0%, $bottom 100%); /* FF3.6+ */ + background-image: -webkit-linear-gradient(top, $top 0%,$bottom 100%); /* Chrome10+,Safari5.1+ */ + background-image: -o-linear-gradient(top, $top 0%,rgba(0,0,0,0.5) 100%); /* Opera 11.10+ */ + background-image: -ms-linear-gradient(top, $top 0%,$bottom 100%); /* IE10+ */ + background-image: linear-gradient(top bottom, $top 0%,$bottom 100%); /* W3C */ border-bottom:1px solid $border; }"; $res[] = $chapters;