$this->config->seoArticles = $this->seoArticles;
}
- public function writeCartConfig(){
+ public function writeCartConfig()
+ {
if ($this->config->basket) {
$this->addJsLib('cart', 'js/libs/fluidbook/fluidbook.cart.js');
switch ($this->config->basketManager) {
if (file_exists($referencesFile) || CubeIT_Util_Url::isDistant($referencesFile)) {
$ext = CubeIT_Files::getExtension($referencesFile);
if ($ext == 'xlsx') {
- if($this->config->basketManager=="ZoomProductLink"){
- $function='excelToArrayKeyVal';
- }else{
- $function='excelToArray';
+ if ($this->config->basketManager == "ZoomProductLink") {
+ $function = 'excelToArrayKeyVal';
+ } else {
+ $function = 'excelToArray';
}
$this->config->basketReferences = wsUtil::$function($referencesFile);
if ($this->book->parametres->customLinkClass == 'AtlanticDownloadLink') {
unlink($minimized);
}
- if ($hasNonMin) {
- $uglify = new CubeIT_CommandLine('/usr/local/bin/uglifyjs');
- $uglify->setArg('o', $minimized);
- $uglify->setArg(null, $tmp);
- $uglify->execute();
- $uglify->debug();
- } else {
- $uglify = null;
- copy($tmp, $minimized);
- }
+ if (file_exists($tmp) && filesize($tmp) > 0) {
+ if ($hasNonMin) {
+ $uglify = new CubeIT_CommandLine('/usr/local/bin/uglifyjs');
+ $uglify->setArg('o', $minimized);
+ $uglify->setArg(null, $tmp);
+ $uglify->execute();
+ $uglify->debug();
+ } else {
+ $uglify = null;
+ copy($tmp, $minimized);
+ }
- if (!file_exists($minimized) || filesize($minimized) == 0) {
- die('An error occured while uglifying ' . $hasNonMin . '? ' . $minimized . ': ' . ($uglify ?? $uglify->commande) . ' :: ' . ($uglify ?? $uglify->output) . '(' . implode(',', $files) . ')');
+ if (!file_exists($minimized) || filesize($minimized) == 0) {
+ die('An error occured while uglifying ' . $hasNonMin . '? ' . $minimized . ': ' . ($uglify ?? $uglify->commande) . ' :: ' . ($uglify ?? $uglify->output) . '(' . implode(',', $files) . ')');
+ }
}
}
$dest = 'data/' . $jsfinal . '.js';