diff options
author | Marino Faggiana <marinofaggiana@mbp-di-marino-001.homenet.telecomitalia.it> | 2018-02-23 12:47:24 +0300 |
---|---|---|
committer | Marino Faggiana <marinofaggiana@mbp-di-marino-001.homenet.telecomitalia.it> | 2018-02-23 12:47:24 +0300 |
commit | 0d72350a2f5e8132cf3699da75b2e6c847986e0d (patch) | |
tree | 116e939483d08a11ed5a7c4237c694c048f954fd | |
parent | 25f3b3f465a3506ca925f97e5dd1e68cac54b5ab (diff) | |
parent | 88d63d6904cc81e33c4bf72b46b8b12af1764d6c (diff) |
Merge branch 'develop'2.20.3
25 files changed, 45 insertions, 52 deletions
diff --git a/iOSClient/Brand/NCBrand.swift b/iOSClient/Brand/NCBrand.swift index b1cd86ff5..e45cd0791 100644 --- a/iOSClient/Brand/NCBrand.swift +++ b/iOSClient/Brand/NCBrand.swift @@ -68,7 +68,7 @@ class NCBrandColor: NSObject { @objc public let brand: String = "Nextcloud" @objc public let mailMe: String = "ios@nextcloud.com" - @objc public let textCopyrightNextcloudiOS: String = "Nextcloud for iOS %@ © 2017 T.W.S. Inc." + @objc public let textCopyrightNextcloudiOS: String = "Nextcloud for iOS %@ © 2018 T.W.S. Inc." @objc public let textCopyrightNextcloudServer: String = "Nextcloud Server %@" @objc public let loginBaseUrl: String = "https://cloud.twsweb.it" @objc public let pushNotificationServer: String = "https://push-notifications.nextcloud.com" diff --git a/iOSClient/Brand/Picker.plist b/iOSClient/Brand/Picker.plist index 237e5be44..4926cdc65 100644 --- a/iOSClient/Brand/Picker.plist +++ b/iOSClient/Brand/Picker.plist @@ -17,7 +17,7 @@ <key>CFBundlePackageType</key> <string>XPC!</string> <key>CFBundleShortVersionString</key> - <string>2.20.2</string> + <string>2.20.3</string> <key>CFBundleVersion</key> <string>00001</string> <key>NSAppTransportSecurity</key> diff --git a/iOSClient/Brand/PickerFileProvider.plist b/iOSClient/Brand/PickerFileProvider.plist index b98244a16..16bd1f8ea 100644 --- a/iOSClient/Brand/PickerFileProvider.plist +++ b/iOSClient/Brand/PickerFileProvider.plist @@ -17,7 +17,7 @@ <key>CFBundlePackageType</key> <string>XPC!</string> <key>CFBundleShortVersionString</key> - <string>2.20.2</string> + <string>2.20.3</string> <key>CFBundleVersion</key> <string>00001</string> <key>NSExtension</key> diff --git a/iOSClient/Brand/Share.plist b/iOSClient/Brand/Share.plist index 32cd653e1..97d7f2e5d 100644 --- a/iOSClient/Brand/Share.plist +++ b/iOSClient/Brand/Share.plist @@ -17,7 +17,7 @@ <key>CFBundlePackageType</key> <string>XPC!</string> <key>CFBundleShortVersionString</key> - <string>2.20.2</string> + <string>2.20.3</string> <key>CFBundleVersion</key> <string>00001</string> <key>NSAppTransportSecurity</key> diff --git a/iOSClient/Brand/iOSClient.plist b/iOSClient/Brand/iOSClient.plist index 3186f7396..72e1c1503 100644 --- a/iOSClient/Brand/iOSClient.plist +++ b/iOSClient/Brand/iOSClient.plist @@ -46,7 +46,7 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>2.20.2</string> + <string>2.20.3</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleURLTypes</key> diff --git a/iOSClient/Favorites/CCFavorites.m b/iOSClient/Favorites/CCFavorites.m index a01340bd5..232ffecf5 100644 --- a/iOSClient/Favorites/CCFavorites.m +++ b/iOSClient/Favorites/CCFavorites.m @@ -33,6 +33,10 @@ NSArray *_dataSource; BOOL _reloadDataSource; + + // Automatic Upload Folder + NSString *_autoUploadFileName; + NSString *_autoUploadDirectory; } @end @@ -514,6 +518,10 @@ _dataSource = [NSArray arrayWithArray:metadatas]; + // get auto upload folder + _autoUploadFileName = [[NCManageDatabase sharedInstance] getAccountAutoUploadFileName]; + _autoUploadDirectory = [[NCManageDatabase sharedInstance] getAccountAutoUploadDirectory:appDelegate.activeUrl]; + [self.tableView reloadData]; } @@ -577,7 +585,11 @@ // Immage if (metadata.directory) { - if ([shareLink length] > 0) { + if (metadata.e2eEncrypted) { + cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folderEncrypted"] color:[NCBrandColor sharedInstance].brandElement]; + } else if ([metadata.fileName isEqualToString:_autoUploadFileName] && [self.serverUrl isEqualToString:_autoUploadDirectory]) { + cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folderphotocamera"] color:[NCBrandColor sharedInstance].brandElement]; + } else if ([shareLink length] > 0) { cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_public"] color:[NCBrandColor sharedInstance].brandElement]; } else if ([shareUserAndGroup length] > 0) { cell.file.image = [CCGraphics changeThemingColorImage:[UIImage imageNamed:@"folder_shared_with_me"] color:[NCBrandColor sharedInstance].brandElement]; diff --git a/iOSClient/Library/OCCommunicationLib/OCWebDavClient/Parsers/OCXMLListParser.m b/iOSClient/Library/OCCommunicationLib/OCWebDavClient/Parsers/OCXMLListParser.m index 27375a93f..703cf165d 100644 --- a/iOSClient/Library/OCCommunicationLib/OCWebDavClient/Parsers/OCXMLListParser.m +++ b/iOSClient/Library/OCCommunicationLib/OCWebDavClient/Parsers/OCXMLListParser.m @@ -130,11 +130,8 @@ [_xmlBucket setObject:lastBit forKey:@"href"]; _currentFile.fileName = lastBit; - NSString *decodedFileName = [self decodeFromPercentEscapeString:self.currentFile.fileName]; - NSString *decodedFilePath = [self decodeFromPercentEscapeString:self.currentFile.filePath]; - - self.currentFile.fileName = [decodedFileName encodeString:NSUTF8StringEncoding]; - self.currentFile.filePath = [decodedFilePath encodeString:NSUTF8StringEncoding]; + self.currentFile.fileName = [self.currentFile.fileName stringByRemovingPercentEncoding]; + self.currentFile.filePath = [self.currentFile.filePath stringByRemovingPercentEncoding]; } } else if ([elementName isEqualToString:@"d:getlastmodified"]) { @@ -210,14 +207,4 @@ NSLog(@"Finish xml directory list parse"); } -// Decode a percent escape encoded string. -- (NSString*) decodeFromPercentEscapeString:(NSString *) string { - return (__bridge_transfer NSString *) CFURLCreateStringByReplacingPercentEscapesUsingEncoding(NULL, - (__bridge CFStringRef) string, - CFSTR(""), - kCFStringEncodingUTF8); -} - - - @end diff --git a/iOSClient/Library/OCCommunicationLib/OCWebDavClient/Parsers/OCXMLParser.m b/iOSClient/Library/OCCommunicationLib/OCWebDavClient/Parsers/OCXMLParser.m index cc24b05ab..e66533279 100644 --- a/iOSClient/Library/OCCommunicationLib/OCWebDavClient/Parsers/OCXMLParser.m +++ b/iOSClient/Library/OCCommunicationLib/OCWebDavClient/Parsers/OCXMLParser.m @@ -169,11 +169,8 @@ NSString *OCCWebDAVURIKey = @"uri"; _currentFile.fileName = lastBit; } - NSString *decodedFileName = [self decodeFromPercentEscapeString:self.currentFile.fileName]; - NSString *decodedFilePath = [self decodeFromPercentEscapeString:self.currentFile.filePath]; - - self.currentFile.fileName = [decodedFileName encodeString:NSUTF8StringEncoding]; - self.currentFile.filePath = [decodedFilePath encodeString:NSUTF8StringEncoding]; + self.currentFile.fileName = [self.currentFile.fileName stringByRemovingPercentEncoding]; + self.currentFile.filePath = [self.currentFile.filePath stringByRemovingPercentEncoding]; isNotFirstFileOfList = YES; @@ -253,14 +250,4 @@ NSString *OCCWebDAVURIKey = @"uri"; NSLog(@"Finish xml directory list parse"); } -// Decode a percent escape encoded string. -- (NSString*) decodeFromPercentEscapeString:(NSString *) string { - return (__bridge_transfer NSString *) CFURLCreateStringByReplacingPercentEscapesUsingEncoding(NULL, - (__bridge CFStringRef) string, - CFSTR(""), - kCFStringEncodingUTF8); -} - - - @end diff --git a/iOSClient/Main/CCMain.m b/iOSClient/Main/CCMain.m index 6edc82d23..999eeee45 100644 --- a/iOSClient/Main/CCMain.m +++ b/iOSClient/Main/CCMain.m @@ -1637,6 +1637,8 @@ UIAlertAction *overwriteAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_overwrite_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { // Send to Upload Queue (void)[[NCManageDatabase sharedInstance] addQueueUploadWithMetadataNet:metadataNet]; + // Start upload now + [appDelegate performSelectorOnMainThread:@selector(loadAutoDownloadUpload:) withObject:[NSNumber numberWithInt:k_maxConcurrentOperationDownloadUpload] waitUntilDone:NO]; }]; [alertController addAction:cancelAction]; @@ -1652,6 +1654,8 @@ // Send to Upload Queue (void)[[NCManageDatabase sharedInstance] addQueueUploadWithMetadataNet:metadataNet]; + // Start upload now + [appDelegate performSelectorOnMainThread:@selector(loadAutoDownloadUpload:) withObject:[NSNumber numberWithInt:k_maxConcurrentOperationDownloadUpload] waitUntilDone:NO]; } } } diff --git a/iOSClient/Networking/NCNetworkingSync.m b/iOSClient/Networking/NCNetworkingSync.m index 059ae852a..7f64a9667 100644 --- a/iOSClient/Networking/NCNetworkingSync.m +++ b/iOSClient/Networking/NCNetworkingSync.m @@ -746,7 +746,7 @@ if (errorDescription == nil) errorDescription = NSLocalizedString(descriptionDefault, @""); } - errorDescription = [NSString stringWithFormat:@"%@ [%ld] - %@", NSLocalizedString(descriptionDefault, @""), errorCode, errorDescription]; + errorDescription = [NSString stringWithFormat:@"%@ [%ld] - %@", NSLocalizedString(descriptionDefault, @""), (long)errorCode, errorDescription]; if (errorDescription.length >= 250) { errorDescription = [errorDescription substringToIndex:250]; diff --git a/iOSClient/Networking/OCNetworking.m b/iOSClient/Networking/OCNetworking.m index 4a5d93893..854e973c5 100644 --- a/iOSClient/Networking/OCNetworking.m +++ b/iOSClient/Networking/OCNetworking.m @@ -289,7 +289,6 @@ OCFileDto *itemDto = [itemsSortedArray objectAtIndex:i]; - itemDto.fileName = [itemDto.fileName stringByRemovingPercentEncoding]; NSString *fileName = [itemDto.fileName stringByReplacingOccurrencesOfString:@"/" withString:@""]; // Skip hidden files @@ -394,7 +393,6 @@ NSString *serverUrl; - itemDto.fileName = [itemDto.fileName stringByRemovingPercentEncoding]; NSString *fileName = [itemDto.fileName stringByReplacingOccurrencesOfString:@"/" withString:@""]; // Skip hidden files @@ -432,7 +430,6 @@ /* ---- */ serverUrl = [CCUtility stringAppendServerUrl:[_activeUrl stringByAppendingString:webDAV] addFileName:serverUrl]; - serverUrl = [serverUrl stringByRemovingPercentEncoding]; NSString *directoryID = [[NCManageDatabase sharedInstance] addDirectoryWithServerUrl:serverUrl fileID:itemDto.ocId permissions:itemDto.permissions encrypted:itemDto.isEncrypted]; BOOL isFolderEncrypted = [CCUtility isFolderEncrypted:serverUrl account:_metadataNet.account]; @@ -555,8 +552,6 @@ NSString *serverUrl, *fileName; - itemDto.fileName = [itemDto.fileName stringByRemovingPercentEncoding]; - itemDto.filePath = [itemDto.filePath stringByRemovingPercentEncoding]; fileName = [itemDto.fileName stringByReplacingOccurrencesOfString:@"/" withString:@""]; // Skip hidden files @@ -595,7 +590,6 @@ /* */ serverUrl = [CCUtility stringAppendServerUrl:[_activeUrl stringByAppendingString:webDAV] addFileName:serverUrl]; - serverUrl = [serverUrl stringByRemovingPercentEncoding]; NSString *directoryID = [[NCManageDatabase sharedInstance] addDirectoryWithServerUrl:serverUrl fileID:itemDto.ocId permissions:itemDto.permissions encrypted:itemDto.isEncrypted]; BOOL isFolderEncrypted = [CCUtility isFolderEncrypted:serverUrl account:_metadataNet.account]; diff --git a/iOSClient/Settings/CCManageAccount.m b/iOSClient/Settings/CCManageAccount.m index 2cd79b055..5327f55dd 100644 --- a/iOSClient/Settings/CCManageAccount.m +++ b/iOSClient/Settings/CCManageAccount.m @@ -177,10 +177,18 @@ { [super formRowDescriptorValueHasChanged:rowDescriptor oldValue:oldValue newValue:newValue]; - if ([rowDescriptor.tag isEqualToString:@"pickerAccount"] && oldValue && newValue){ + if ([rowDescriptor.tag isEqualToString:@"pickerAccount"] && oldValue && newValue) { - // cambiamo default account se oldvalue != newValue - if (![newValue isEqualToString:oldValue]) [self ChangeDefaultAccount:newValue]; + if (![newValue isEqualToString:oldValue] && ![newValue isEqualToString:@""] && ![newValue isEqualToString:appDelegate.activeAccount]) + [self ChangeDefaultAccount:newValue]; + + if ([newValue isEqualToString:@""]) { + + NSArray *listAccount = [[NCManageDatabase sharedInstance] getAccounts]; + + if ([listAccount count] > 0) + [self ChangeDefaultAccount:listAccount[0]]; + } } } @@ -190,9 +198,7 @@ - (void)loginSuccess:(NSInteger)loginType { - if (loginType == loginAddForced) { - [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil]; - } + [[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil]; } - (void)loginClose @@ -269,7 +275,8 @@ [self deleteAccount:accountNow]; NSArray *listAccount = [[NCManageDatabase sharedInstance] getAccounts]; - if ([listAccount count] > 0) [self ChangeDefaultAccount:listAccount[0]]; + if ([listAccount count] > 0) + [self ChangeDefaultAccount:listAccount[0]]; else { [self addAccountForced]; } diff --git a/iOSClient/Supporting Files/es.lproj/BKPasscodeView.strings b/iOSClient/Supporting Files/es.lproj/BKPasscodeView.strings Binary files differindex 57e72f9cf..7623504c4 100644 --- a/iOSClient/Supporting Files/es.lproj/BKPasscodeView.strings +++ b/iOSClient/Supporting Files/es.lproj/BKPasscodeView.strings diff --git a/iOSClient/Supporting Files/es.lproj/Intro.strings b/iOSClient/Supporting Files/es.lproj/Intro.strings Binary files differindex 3a910b090..7e9b83224 100644 --- a/iOSClient/Supporting Files/es.lproj/Intro.strings +++ b/iOSClient/Supporting Files/es.lproj/Intro.strings diff --git a/iOSClient/Supporting Files/es.lproj/Localizable.strings b/iOSClient/Supporting Files/es.lproj/Localizable.strings Binary files differindex 69958df37..12d6e5bba 100644 --- a/iOSClient/Supporting Files/es.lproj/Localizable.strings +++ b/iOSClient/Supporting Files/es.lproj/Localizable.strings diff --git a/iOSClient/Supporting Files/pt_PT.lproj/BKPasscodeView.strings b/iOSClient/Supporting Files/pt_PT.lproj/BKPasscodeView.strings Binary files differnew file mode 100644 index 000000000..e3ffaacb2 --- /dev/null +++ b/iOSClient/Supporting Files/pt_PT.lproj/BKPasscodeView.strings diff --git a/iOSClient/Supporting Files/pt_PT.lproj/CTAssetsPicker.strings b/iOSClient/Supporting Files/pt_PT.lproj/CTAssetsPicker.strings Binary files differnew file mode 100644 index 000000000..16bc54bb3 --- /dev/null +++ b/iOSClient/Supporting Files/pt_PT.lproj/CTAssetsPicker.strings diff --git a/iOSClient/Supporting Files/pt_PT.lproj/Error.strings b/iOSClient/Supporting Files/pt_PT.lproj/Error.strings Binary files differnew file mode 100644 index 000000000..1e7c8c754 --- /dev/null +++ b/iOSClient/Supporting Files/pt_PT.lproj/Error.strings diff --git a/iOSClient/Supporting Files/pt_PT.lproj/InfoPlist.strings b/iOSClient/Supporting Files/pt_PT.lproj/InfoPlist.strings Binary files differnew file mode 100644 index 000000000..b54e131a1 --- /dev/null +++ b/iOSClient/Supporting Files/pt_PT.lproj/InfoPlist.strings diff --git a/iOSClient/Supporting Files/pt_PT.lproj/Intro.strings b/iOSClient/Supporting Files/pt_PT.lproj/Intro.strings Binary files differnew file mode 100644 index 000000000..526cd1825 --- /dev/null +++ b/iOSClient/Supporting Files/pt_PT.lproj/Intro.strings diff --git a/iOSClient/Supporting Files/pt_PT.lproj/Localizable.strings b/iOSClient/Supporting Files/pt_PT.lproj/Localizable.strings Binary files differnew file mode 100644 index 000000000..75d2b2954 --- /dev/null +++ b/iOSClient/Supporting Files/pt_PT.lproj/Localizable.strings diff --git a/iOSClient/Supporting Files/pt_PT.lproj/SwiftWebVC.strings b/iOSClient/Supporting Files/pt_PT.lproj/SwiftWebVC.strings Binary files differnew file mode 100644 index 000000000..6303605fd --- /dev/null +++ b/iOSClient/Supporting Files/pt_PT.lproj/SwiftWebVC.strings diff --git a/iOSClient/Supporting Files/sk-SK.lproj/Error.strings b/iOSClient/Supporting Files/sk-SK.lproj/Error.strings Binary files differindex ba041e499..fee3f450c 100644 --- a/iOSClient/Supporting Files/sk-SK.lproj/Error.strings +++ b/iOSClient/Supporting Files/sk-SK.lproj/Error.strings diff --git a/iOSClient/Supporting Files/sv.lproj/Error.strings b/iOSClient/Supporting Files/sv.lproj/Error.strings Binary files differindex d923d94b1..d863adffb 100644 --- a/iOSClient/Supporting Files/sv.lproj/Error.strings +++ b/iOSClient/Supporting Files/sv.lproj/Error.strings diff --git a/iOSClient/Utility/CCUtility.m b/iOSClient/Utility/CCUtility.m index 7e29476c6..d5e2dea4c 100644 --- a/iOSClient/Utility/CCUtility.m +++ b/iOSClient/Utility/CCUtility.m @@ -475,12 +475,14 @@ + (BOOL)isEndToEndEnabled:(NSString *)account { + tableCapabilities *capabilities = [[NCManageDatabase sharedInstance] getCapabilites]; + NSString *publicKey = [self getEndToEndPublicKey:account]; NSString *privateKey = [self getEndToEndPrivateKey:account]; NSString *passphrase = [self getEndToEndPassphrase:account]; - NSString *publicKeyServer = [self getEndToEndPublicKeyServer:account]; + NSString *publicKeyServer = [self getEndToEndPublicKeyServer:account]; - if (passphrase.length > 0 && privateKey.length > 0 && publicKey.length > 0 && publicKeyServer.length > 0) { + if (passphrase.length > 0 && privateKey.length > 0 && publicKey.length > 0 && publicKeyServer.length > 0 && capabilities.endToEndEncryption) { return YES; |