Skip to content

Commit

Permalink
remove pointless variable
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoh committed Sep 18, 2024
1 parent 7eed125 commit 1f1b533
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
14 changes: 4 additions & 10 deletions program/actions/contacts/import.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,13 +434,10 @@ public static function import_map($attrib)
public static function import_confirm($attrib)
{
$rcmail = rcmail::get_instance();
$vars = get_object_vars(self::$stats);
$vars['names'] = $vars['skipped_names'] = $vars['invalid_names'] = $vars['error_names'] = '';

$content = html::p(null, $rcmail->gettext([
'name' => 'importconfirm',
'nr' => self::$stats->inserted,
'vars' => $vars,
'vars' => ['inserted' => self::$stats->inserted],
]) . (self::$stats->names ? ':' : '.')
);

Expand All @@ -451,26 +448,23 @@ public static function import_confirm($attrib)
if (self::$stats->skipped) {
$content .= html::p(null, $rcmail->gettext([
'name' => 'importconfirmskipped',
'nr' => self::$stats->skipped,
'vars' => $vars,
'vars' => ['skipped' => self::$stats->skipped],
]) . ':')
. html::p('em', implode(', ', array_map(['rcube', 'Q'], self::$stats->skipped_names)));
}

if (self::$stats->invalid) {
$content .= html::p(null, $rcmail->gettext([
'name' => 'importconfirminvalid',
'nr' => self::$stats->invalid,
'vars' => $vars,
'vars' => ['invalid' => self::$stats->invalid],
]) . ':')
. html::p('em', implode(', ', array_map(['rcube', 'Q'], self::$stats->invalid_names)));
}

if (self::$stats->errors) {
$content .= html::p(null, $rcmail->gettext([
'name' => 'importconfirmerrors',
'nr' => self::$stats->errors,
'vars' => $vars,
'vars' => ['errors' => self::$stats->errors],
]) . ':')
. html::p('em', implode(', ', array_map(['rcube', 'Q'], self::$stats->error_names)));
}
Expand Down
4 changes: 2 additions & 2 deletions program/localization/en_US/messages.inc
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ $messages['nogroupassignmentschanged'] = 'No group assignments changed.';
$messages['importwait'] = 'Importing, please wait...';
$messages['importformaterror'] = 'Import failed! The uploaded file is not a valid import data file.';
$messages['importconfirm'] = '<b>Successfully imported $inserted contacts</b>';
$messages['importconfirmskipped'] = '<b>Skipped $skipped existing entries</b>';
$messages['importconfirminvalid'] = '<b>Skipped $invalid invalid entries</b>';
$messages['importconfirmskipped'] = '<b>Skipped $skipped existing contacts</b>';
$messages['importconfirminvalid'] = '<b>Skipped $invalid invalid contacts</b>';
$messages['importconfirmerrors'] = '<b>Failed to import $errors valid contacts</b>';
$messages['importmessagesuccess'] = 'Successfully imported $nr messages';
$messages['importmessageerror'] = 'Import failed! The uploaded file is not a valid message or mailbox file';
Expand Down

0 comments on commit 1f1b533

Please sign in to comment.