protected function writeSecure()
{
- if (trim($this->fluidbookSettings->secureClientSidePasswordCredentials)) {
+ if (isset($this->fluidbookSettings->secureClientSidePasswordCredentials) && null !== $this->fluidbookSettings->secureClientSidePasswordCredentials && trim($this->fluidbookSettings->secureClientSidePasswordCredentials)) {
$this->writeSecurePage();
}
{
protected static $_outPDF = [];
- protected static $_forceServer = false;
- //protected static $_forceServer = 'alphaville';
+ //protected static $_forceServer = false;
+ protected static $_forceServer = 'alphaville';
protected static $_farmServers = [
['name' => 'alphaville', 'host' => 'fluidbook-processfarm', 'port' => 9000, 'weight' => 12, 'region' => 'UE'],
['name' => 'brazil', 'host' => 'brazil.cubedesigners.com', 'weight' => 6, 'region' => 'US'],
return parent::setAttribute($key, $value);
}
+ public function onRetrieved(): bool
+ {
+ $res = parent::onRetrieved();
+
+ foreach ($this->getFields() as $field) {
+ $n = $field->getName();
+ if (!isset($this->{$n}) || null === $this->{$n}) {
+ $default = $field->getAttribute('default') ?? '';
+ $this->{$n} = $default;
+ }
+ }
+
+ return $res;
+ }
public function onSaving(): bool
{
}
if(can('fluibook-publication:download:install-hosting') && ($entry->install_online || $entry->scorm_enable)){
$installActions['sep_install']='---------';
- if($entry->install_online && $entry->install_online->server && isset($servers[$entry->install_online->server])){
+ if($entry->install_online && is_object($entry->install_online) && $entry->install_online->server && isset($servers[$entry->install_online->server])){
$server=$servers[$entry->install_online->server];
if($entry->install_online->path || $server['allows_root']){
$installActions['install_online']=[