use App\Fluidbook\Link\Link;
use App\Fluidbook\Link\LinksData;
use App\SubForms\Link\Base;
-use Cubist\Util\Files\Files;
use Cubist\Util\Text;
use Fluidbook\Tools\Links\AnchorLink;
use Fluidbook\Tools\Links\ContentLink;
public $type = "unset";
- /** @var Lock */
+ /** @var Lock */
protected $lock;
/**
$htmlFiles = array('index');
$filesToDelete = [];
+ $htmlPrepend = $book->getSettings()->get('htmlPrepend');
foreach ($htmlFiles as $name) {
- $html = $book->getSettings()->get('htmlPrepend') . file_get_contents($dest . $name . '.html');
+ $html = $htmlPrepend . file_get_contents($dest . $name . '.html');
file_put_contents($dest . '/' . $name . '.' . $this->_ext, $html);
if ($this->_ext != 'html') {
$filesToDelete[] = $name . '.html';
}
}
+
$rm = new CommandLine('rm');
foreach ($filesToDelete as $f) {
$rm->setArg(null, $dest . '/' . $f);
if ($this->_ext !== 'html') {
$e = $this->_ext;
+ $cmd = "find $dest -type f -name \"*.html\" -exec sed -i \"s/index_player\.html/index_player\.$e/g\" '{}' +";
+ `$cmd`;
$cmd = "find $dest -type f -name \"*.html\" -exec rename 's/\.html$/.$e/' '{}' \;";
`$cmd`;
+
}
return $compiler;
}
'default' => 'html',
]);
$this->addSettingField('actualHtmlExtension', LongText::class, $this->__('Extension des fichiers html réellement appliquée au fluidbook'), [
- 'hint' => $this->__('Ex : php, htm, html, phtml, asp'),
+ 'hint' => $this->__('Ex : php, htm, html, phtml, asp, aspx'),
'default' => 'html',
]);
$this->addSettingField('htmlPrepend', Textarea::class, $this->__('Code à insérer en tête des fichiers'));