Aleksander Machniak
2013-12-25 c97625e02a95ebd995af8a06c27229581a071ddd
program/steps/addressbook/import.inc
@@ -5,7 +5,7 @@
 | program/steps/addressbook/import.inc                                  |
 |                                                                       |
 | This file is part of the Roundcube Webmail client                     |
 | Copyright (C) 2008-2009, The Roundcube Dev Team                       |
 | Copyright (C) 2008-2013, The Roundcube Dev Team                       |
 |                                                                       |
 | Licensed under the GNU General Public License version 3 or            |
 | any later version with exceptions for skins & plugins.                |
@@ -26,6 +26,7 @@
function rcmail_import_form($attrib)
{
  global $RCMAIL, $OUTPUT;
  $target = rcube_utils::get_input_value('_target', rcube_utils::INPUT_GPC);
  $attrib += array('id' => "rcmImportForm");
@@ -46,8 +47,9 @@
  if (count($writable_books) > 1) {
    $select = new html_select(array('name' => '_target', 'id' => 'rcmimporttarget', 'is_escaped' => true));
    foreach ($writable_books as $book)
        foreach ($writable_books as $book) {
        $select->add($book['name'], $book['id']);
        }
    $table->add('title', html::label('rcmimporttarget', $RCMAIL->gettext('importtarget')));
    $table->add(null, $select->show($target));
@@ -79,9 +81,8 @@
  $OUTPUT->add_label('selectimportfile','importwait');
  $OUTPUT->add_gui_object('importform', $attrib['id']);
  $out = html::p(null, rcube::Q($RCMAIL->gettext('importdesc'), 'show'));
  $out .= $OUTPUT->form_tag(array(
    $out = html::p(null, rcube::Q($RCMAIL->gettext('importdesc'), 'show'))
        . $OUTPUT->form_tag(array(
      'action' => $RCMAIL->url('import'),
      'method' => 'post',
      'enctype' => 'multipart/form-data') + $attrib,
@@ -107,16 +108,17 @@
      'vars' => $vars,
    )) . ($IMPORT_STATS->names ? ':' : '.'));
  if ($IMPORT_STATS->names)
    if ($IMPORT_STATS->names) {
    $content .= html::p('em', join(', ', array_map('Q', $IMPORT_STATS->names)));
    }
  if ($IMPORT_STATS->skipped) {
      $content .= html::p(null, $RCMAIL->gettext(array(
          'name' => 'importconfirmskipped',
          'nr' => $IMPORT_STATS->skipped,
          'vars' => $vars,
        )) . ':');
      $content .= html::p('em', join(', ', array_map('Q', $IMPORT_STATS->skipped_names)));
            )) . ':')
            . html::p('em', join(', ', array_map('Q', $IMPORT_STATS->skipped_names)));
  }
  return html::div($attrib, $content);
@@ -129,6 +131,7 @@
function rcmail_import_buttons($attrib)
{
  global $IMPORT_STATS, $OUTPUT;
  $target = rcube_utils::get_input_value('_target', rcube_utils::INPUT_GPC);
  $attrib += array('type' => 'input');