mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 256826 Mozilla should not permit to import empty address book
r=neil.parkwaycc.co.uk, sr=dmose, patch=brian.lu@sun.com
This commit is contained in:
parent
683d7693d2
commit
8f92e961eb
@ -865,6 +865,13 @@ function ImportAddress( module, success, error) {
|
||||
return( false);
|
||||
}
|
||||
|
||||
if (file.fileSize == 0) {
|
||||
var errorText = gImportMsgsBundle.getFormattedString('ImportEmptyAddressBook', [path]);
|
||||
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
|
||||
|
||||
promptService.alert(window, document.title, errorText);
|
||||
return false;
|
||||
}
|
||||
addInterface.SetData("addressLocation", file);
|
||||
}
|
||||
|
||||
|
@ -298,6 +298,7 @@ ImportMailSuccess=Mail was successfully imported from %S
|
||||
# Error string for address import
|
||||
ImportAddressBadModule=Unable to load address book import module.
|
||||
ImportAddressNotFound=Unable to find any address books to import. Check to make sure the selected application or format is correctly installed on this machine.
|
||||
ImportEmptyAddressBook=Can't import empty address book %S.
|
||||
# LOCALIZATION NOTE : Do not translate the word "%S" below.
|
||||
ImportAddressFailed=An error occurred importing addresses from %S.
|
||||
# LOCALIZATION NOTE : Do not translate the word "%S" below.
|
||||
|
Loading…
Reference in New Issue
Block a user