Skip to content

Commit

Permalink
Fix bug in customise
Browse files Browse the repository at this point in the history
  • Loading branch information
gianlucagiacometti authored Jul 12, 2023
1 parent 2f506fd commit fccb516
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions toolbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function init()

// customise blank page
$options = ['blankpage_type', 'blankpage_url', 'blankpage_image', 'blankpage_custom'];
if ($config['customise_blankpage'] !== false) {
if (customise['customise_blankpage'] !== false) {
if ($this->loglevel > 2) {
rcube::write_log($this->logfile, "STEP in [function init]: 'customise blank page' database option selected: override config");
}
Expand Down Expand Up @@ -264,15 +264,15 @@ public function init()
if ($this->loglevel > 2) {
rcube::write_log($this->logfile, "STEP in [function init]: 'attachments' tool active and loaded");
}
$this->add_hook('attachment_upload', array($this, 'detach_attachment'));
$this->add_hook('message_compose', array($this, 'remove_session'));
$this->add_hook('startup', array($this, 'download_detached'));
$this->add_hook('toolbox_attachment_label', array($this, 'attachment_label'));
$this->add_hook('attachment_upload', [$this, 'detach_attachment']);
$this->add_hook('message_compose', [$this, 'remove_session']);
$this->add_hook('startup', [$this, 'download_detached']);
$this->add_hook('toolbox_attachment_label', [$this, 'attachment_label']);
if (rcube_utils::get_input_value('_action', rcube_utils::INPUT_GPC) == 'compose') {
if ($this->loglevel > 2) {
rcube::write_log($this->logfile, "STEP in [function init]:modify hint in compose window");
}
$this->add_hook('template_object_composeattachmentform', array($this, 'update_hint'));
$this->add_hook('template_object_composeattachmentform', [$this, 'update_hint']);
}
} // end if attachments

Expand Down Expand Up @@ -640,7 +640,8 @@ public function tool_render_form($attrib)
foreach ($settings['aliases'] as $alias) {
$active = $alias['active'];
$address = trim($alias['address']);
$elements = $this->rcube->config->get('toolbox_aliases_multiple_domains') ? array($address) : explode("@", $address);
// when toolbox_aliases_multiple_domains == true there is a mistake in the following procedure
$elements = $this->rcube->config->get('toolbox_aliases_multiple_domains') ? [$address] : explode("@", $address);
if ($this->loglevel > 2) {
rcube::write_log($this->logfile, "STEP in [function tool_render_form]: $addr ($elements[0]@$elements[1]) valid:" . ($elements[0] != '' ? '' : '') . " active:" . ($active ? '' : '') );
}
Expand Down

0 comments on commit fccb516

Please sign in to comment.