some code cleanup

dev_contacts
PhilW 6 years ago
parent 3003d076b7
commit 3444926bc1

@ -85,7 +85,7 @@ The following actions are available for down swipe:
*Contacts List:* *Contacts List:*
The following actions are available for left/right swipe: The following actions are available for left/right swipe:
* `attvcard` - Attach the contact to a new message as a vCard (Requires the Roundcube Vcard_attachments plugin) * `vcard_attachments` - Attach the contact to a new message as a vCard (Requires the Roundcube Vcard_attachments plugin)
* `compose` - Compose a new message to this contact * `compose` - Compose a new message to this contact
* `delete` - Delete the contact * `delete` - Delete the contact
* `swipe-select` - Select/deselect the contact * `swipe-select` - Select/deselect the contact

@ -57,7 +57,7 @@ class swipe extends rcube_plugin
'contactlist' => array( 'contactlist' => array(
'vertical' => array(), 'vertical' => array(),
'horizontal' => array( 'horizontal' => array(
'attvcard' => 'vcard_attachments.forwardvcard', 'vcard_attachments' => 'vcard_attachments.forwardvcard',
'compose' => 'compose', 'compose' => 'compose',
'delete' => 'delete', 'delete' => 'delete',
'swipe-select' => 'select' 'swipe-select' => 'select'
@ -211,16 +211,12 @@ class swipe extends rcube_plugin
else if (in_array($action, $this->disabled_actions) || in_array($this->rcube->task . $action, $this->disabled_actions)) { else if (in_array($action, $this->disabled_actions) || in_array($this->rcube->task . $action, $this->disabled_actions)) {
$result = false; $result = false;
} }
else if ($action == 'archive' && !$this->rcube->output->env['archive_folder']) { else if (in_array($action, array('markasjunk', 'vcard_attachments')) && !in_array($action, $this->laoded_plugins)) {
// archive plugin // check plugin is enabled
$result = false;
}
else if ($action == 'markasjunk' && !in_array('markasjunk', $this->laoded_plugins)) {
// markasjunk plugin
$result = false; $result = false;
} }
else if ($action == 'attvcard' && !in_array('vcard_attachments', $this->laoded_plugins)) { else if ($action == 'archive' && !$this->rcube->output->env['archive_folder']) {
// vcard_attachments plugin // archive plugin
$result = false; $result = false;
} }

Loading…
Cancel
Save