\r
public function copy($source, $dest) {\r
copy($source, $dest);\r
- touch($dest, filemtime($dest));\r
+ touch($dest, filemtime($source));\r
}\r
\r
public function compileAir($book_id) {\r
$invalid = true;\r
}\r
\r
+ fb($invalid, 'invalid ?');\r
+\r
if ($invalid) {\r
$pdfList = array();\r
$pagesList = array();\r
}\r
\r
if ($original) {\r
+ fb($normalPDF, 'original');\r
$this->copy(WS_DOCS . '/' . $firstDoc . '/crop.pdf', $normalPDF);\r
} else {\r
$args = '';\r
$args .= ' output ' . $normalPDF;\r
\r
$cached = WS_BOOKS . '/pdf/' . $hash . '.pdf';\r
+\r
+ fb($cached);\r
+\r
if (file_exists($cached)) {\r
$this->copy($cached, $normalPDF);\r
} else {\r
$gs->setArg('-dAutoRotatePages=/None');\r
$gs->setArg(null, $normalPDF);\r
$gs->execute();\r
+\r
+ fb($gs->commande);\r
+ fb($gs->output);\r
}\r
copy($compressedPDF, $finalPDF);\r
} else {\r
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);
}
$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;
}
$cp->setArg(null, $src . '*');
$cp->setArg(null, $dest);
$cp->execute();
+
+ if (!is_null($chown)) {
+ `chown -R $chown $dest`;
+ }
}
protected function _download() {
$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;