$h = SITE_PATH;
if ($_SERVER['HTTP_HOST'] == 'exe.workshop.fluidbook.com') {
- $h = 'https://workshop.fluidbook.com' . SITE_PATH;
+ $h = 'https://workshop.fluidbook.com/';
}
- $res .= '<li data-type="' . $infos['type'] . '"><a class="extfb" target="_blank" href="' . $h . $infos['version'] . '/' . $infos['pattern'] . '/' . $infos['file'] . '">' . $infos['icon'] . $infos['title'] . '</a><a data-ok-content="' . __('URL copiée') . '" data-tippy-content="' . __("Copier l'URL dans le presse-papier") . '" class="clipboardurl" href="' . $h . $infos['version'] . '/' . $infos['pattern'] . '/' . $infos['file'] . '"><img src="/images/ws/link.svg"></a></li>';
+ $url = $h . $infos['version'] . '/' . $infos['pattern'] . '/' . $infos['file'];
+ $res .= '<li data-type="' . $infos['type'] . '"><a class="extfb" target="_blank" href="' . $url . '">' . $infos['icon'] . $infos['title'] . '</a><a data-ok-content="' . __('URL copiée') . '" data-tippy-content="' . __("Copier l'URL dans le presse-papier") . '" class="clipboardurl" href="' . $url . '"><img src="/images/ws/link.svg"></a></li>';
}
}
$res .= '</ul></div>';
if (!file_exists($source)) {
return;
}
- copy($source, $dest);
- touch($dest, filemtime($source));
+ @copy($source, $dest);
+ @touch($dest, filemtime($source));
}
public static function getDocumentPage($book_id, $book_page)
$this->log('Js written');
$this->vdir->sync($delete, $this);
$this->log('Files Synced');
- touch(rtrim(str_replace('/html5/', '/compiletime/', $this->dir)));
+// $f=rtrim(str_replace('/html5/', '/compiletime/', $this->dir));
+// touch($f);
}
protected function writeStats()
protected function writeScorm()
{
- $manifestfiles=['1.2'=>'_imsmanifest.12.xml','2004'=>'_imsmanifest.2004.xml','2004.3'=>'_imsmanifest.2004-3.xml'];
- $manifestfile=$manifestfiles[$this->book->parametres->scorm_version];
+ $manifestfiles = ['1.2' => '_imsmanifest.12.xml', '2004' => '_imsmanifest.2004.xml', '2004.3' => '_imsmanifest.2004-3.xml'];
+ $manifestfile = $manifestfiles[$this->book->parametres->scorm_version];
$manifest = file_get_contents($this->assets . '/' . $manifestfile);
if (!$this->book->parametres->scorm_title) {
}
}
- $this->config->articlesList = $list;
+ if (isset($list)) {
+ $this->config->articlesList = $list;
+ }
}
$image_path_relative = $this->compiler->vdir->relativePath($slide['path']);
$image_info = CubeIT_Image::getimagesize($slide['path']);
$image_info_json = ($image_info) ? json_encode(['width' => $image_info[0], 'height' => $image_info[1], 'ratio' => round($image_info[0] / $image_info[1], 4)]) : '';
- $image_dimensions = ($image_info) ? $image_info[3] : '';
+ $image_dimensions = ($image_info && isset($image_info[3])) ? $image_info[3] : '';
// When displaying thumbnails, they are a fixed size, based on height
// We set dimensions here to avoid extra work on the client side
'keywords' => $keywords,
);
- $this->origHTML = $this->book->parametres->htmlPrepend . file_get_contents($this->vdir . '/index.html');
- unlink($this->vdir . '/index.html');
+ $this->origHTML = $this->book->parametres->htmlPrepend;
+ $h = $this->vdir . '/index.html';
+ if (file_exists($h)) {
+ $this->origHTML .= file_get_contents($h);
+ unlink($h);
+ }
$this->origHTML = $this->replaceHTML($toReplace);
$nav1 = $this->makeHTMLNav(true);