mirror of
https://github.com/roundcube/roundcubemail.git
synced 2025-12-28 07:55:07 +00:00
Remove redundant Classic-specific code
This commit is contained in:
parent
5e2f7042ec
commit
aa772c6270
@ -24,9 +24,8 @@ class vcard_attachments extends rcube_plugin
|
||||
$rcmail = rcmail::get_instance();
|
||||
|
||||
if ($rcmail->task == 'addressbook') {
|
||||
$skin_path = $this->local_skin_path();
|
||||
$this->add_texts('localization', !$rcmail->output->ajax_call);
|
||||
$this->include_stylesheet($skin_path . '/style.css');
|
||||
$this->include_stylesheet($this->local_skin_path() . '/style.css');
|
||||
$this->include_script('vcardattach.js');
|
||||
$this->add_button([
|
||||
'type' => 'link-menuitem',
|
||||
@ -49,18 +48,15 @@ class vcard_attachments extends rcube_plugin
|
||||
$this->add_hook('attachment_from_uri', [$this, 'attach_vcard']);
|
||||
}
|
||||
else if ($rcmail->action == 'compose' && !$rcmail->output->framed) {
|
||||
$skin_path = $this->local_skin_path();
|
||||
$btn_class = strpos($skin_path, 'classic') ? 'button' : 'listbutton';
|
||||
|
||||
$this->add_texts('localization', true);
|
||||
$this->include_stylesheet($skin_path . '/style.css');
|
||||
$this->include_stylesheet($this->local_skin_path() . '/style.css');
|
||||
$this->include_script('vcardattach.js');
|
||||
$this->add_button([
|
||||
'type' => 'link',
|
||||
'label' => 'vcard_attachments.vcard',
|
||||
'command' => 'attach-vcard',
|
||||
'class' => $btn_class . ' vcard disabled',
|
||||
'classact' => $btn_class . ' vcard',
|
||||
'class' => 'listbutton vcard disabled',
|
||||
'classact' => 'listbutton vcard',
|
||||
'title' => 'vcard_attachments.attachvcard',
|
||||
'innerclass' => 'inner',
|
||||
],
|
||||
@ -70,8 +66,7 @@ class vcard_attachments extends rcube_plugin
|
||||
$this->add_hook('message_compose', [$this, 'message_compose']);
|
||||
}
|
||||
else if (!$rcmail->output->framed && (!$rcmail->action || $rcmail->action == 'list')) {
|
||||
$skin_path = $this->local_skin_path();
|
||||
$this->include_stylesheet($skin_path . '/style.css');
|
||||
$this->include_stylesheet($this->local_skin_path() . '/style.css');
|
||||
$this->include_script('vcardattach.js');
|
||||
}
|
||||
}
|
||||
@ -87,13 +82,13 @@ class vcard_attachments extends rcube_plugin
|
||||
$this->message = $p['object'];
|
||||
|
||||
// handle attachments vcard attachments
|
||||
foreach ((array)$this->message->attachments as $attachment) {
|
||||
foreach ((array) $this->message->attachments as $attachment) {
|
||||
if ($this->is_vcard($attachment)) {
|
||||
$this->vcard_parts[] = $attachment->mime_id;
|
||||
}
|
||||
}
|
||||
// the same with message bodies
|
||||
foreach ((array)$this->message->parts as $part) {
|
||||
foreach ((array) $this->message->parts as $part) {
|
||||
if ($this->is_vcard($part)) {
|
||||
$this->vcard_parts[] = $part->mime_id;
|
||||
$this->vcard_bodies[] = $part->mime_id;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user