|
@@ -624,7 +624,6 @@
|
|
|
token = @"no token";
|
|
|
}
|
|
|
|
|
|
- path = [NSString stringWithFormat:@"%@/remote.php/dav", path];
|
|
|
path = [path encodeString:NSUTF8StringEncoding];
|
|
|
|
|
|
OCWebDAVClient *request = [OCWebDAVClient new];
|
|
@@ -653,19 +652,19 @@
|
|
|
///-----------------------------------
|
|
|
/// @name Setting favorite
|
|
|
///-----------------------------------
|
|
|
-- (void)settingFavoriteServer:(NSString *)serverPath andFileOrFolderPath:(NSString *)filePath favorite:(BOOL)favorite withUserSessionToken:(NSString *)token onCommunication:(OCCommunication *)sharedOCCommunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *redirectedServer, NSString *token)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *token, NSString *redirectedServer)) failureRequest {
|
|
|
+- (void)settingFavoriteServer:(NSString *)path andFileOrFolderPath:(NSString *)filePath favorite:(BOOL)favorite withUserSessionToken:(NSString *)token onCommunication:(OCCommunication *)sharedOCCommunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *redirectedServer, NSString *token)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *token, NSString *redirectedServer)) failureRequest {
|
|
|
|
|
|
if (!token){
|
|
|
token = @"no token";
|
|
|
}
|
|
|
|
|
|
- serverPath = [NSString stringWithFormat:@"%@/remote.php/dav/files/%@/%@", serverPath, _user, filePath];
|
|
|
- serverPath = [serverPath encodeString:NSUTF8StringEncoding];
|
|
|
+ path = [NSString stringWithFormat:@"%@/files/%@/%@", path, _user, filePath];
|
|
|
+ path = [path encodeString:NSUTF8StringEncoding];
|
|
|
|
|
|
OCWebDAVClient *request = [OCWebDAVClient new];
|
|
|
request = [self getRequestWithCredentials:request];
|
|
|
|
|
|
- [request settingFavorite:serverPath favorite:favorite onCommunication:sharedOCCommunication withUserSessionToken:token success:^(NSHTTPURLResponse *response, id responseObject, NSString *token) {
|
|
|
+ [request settingFavorite:path favorite:favorite onCommunication:sharedOCCommunication withUserSessionToken:token success:^(NSHTTPURLResponse *response, id responseObject, NSString *token) {
|
|
|
|
|
|
if (successRequest) {
|
|
|
//Return success
|