Marino Faggiana 8 жил өмнө
parent
commit
d3eb0f1266

+ 2 - 16
Libraries external/OCCommunicationLib/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.m

@@ -266,27 +266,13 @@ NSString const *OCWebDAVModificationDateKey	= @"modificationdate";
     
     _requestMethod = @"SEARCH";
     NSMutableURLRequest *request = [self requestWithMethod:_requestMethod path:path parameters:nil];
-    /*
-     NSString *depthHeader = nil;
-     if (depth <= 0)
-     depthHeader = @"0";
-     else if (depth == 1)
-     depthHeader = @"1";
-     else
-     depthHeader = @"infinity";
-     [request setValue: depthHeader forHTTPHeaderField: @"Depth"];
-     
-     
-     [request setHTTPBody:[@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><D:propfind xmlns:D=\"DAV:\"><D:prop><D:resourcetype/><D:getlastmodified/><size xmlns=\"http://owncloud.org/ns\"/><D:creationdate/><id xmlns=\"http://owncloud.org/ns\"/><D:getcontentlength/><D:displayname/><D:quota-available-bytes/><D:getetag/><permissions xmlns=\"http://owncloud.org/ns\"/><D:quota-used-bytes/><D:getcontenttype/></D:prop></D:propfind>" dataUsingEncoding:NSUTF8StringEncoding]];
-     */
-    
-    NSString *body = [NSString stringWithFormat:@"<?xml version=\"1.0\"?><d:searchrequest xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\"><d:basicsearch><d:select><d:prop><d:displayname/></d:prop></d:select><d:from><d:scope><d:href>/files/%@</d:href><d:depth>infinity</d:depth></d:scope></d:from><d:where><d:like><d:prop><d:displayname/></d:prop><d:literal>%@%%</d:literal></d:like></d:where></d:basicsearch></d:searchrequest>]",@"admin",fileName];
+    
+    NSString *body = [NSString stringWithFormat:@"<?xml version=\"1.0\"?><d:searchrequest xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\"><d:basicsearch><d:select><d:prop><d:displayname/></d:prop></d:select><d:from><d:scope><d:href>/files/%@</d:href><d:depth>infinity</d:depth></d:scope></d:from><d:where><d:like><d:prop><d:displayname/></d:prop><d:literal>Documents</d:literal></d:like></d:where></d:basicsearch></d:searchrequest>",@"admin"];
     
     [request setHTTPBody:[body dataUsingEncoding:NSUTF8StringEncoding]];
     
     [request setValue:@"application/xml" forHTTPHeaderField:@"Content-Type"];
     
-    
     OCHTTPRequestOperation *operation = [self mr_operationWithRequest:request onCommunication:sharedOCCommunication withUserSessionToken:token success:success failure:failure];
     [self setRedirectionBlockOnDatataskWithOCCommunication:sharedOCCommunication andSessionManager:sharedOCCommunication.networkSessionManager];
     [operation resume];

+ 3 - 0
iOSClient/FileSystem/TableAccount+CoreDataProperties.h

@@ -43,6 +43,9 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nullable, nonatomic, copy) NSString *email;
 @property (nullable, nonatomic, copy) NSString *phone;
 @property (nullable, nonatomic, copy) NSString *twitter;
+@property (nullable, nonatomic, copy) NSNumber *versionMajor;
+@property (nullable, nonatomic, copy) NSNumber *versionMicro;
+@property (nullable, nonatomic, copy) NSNumber *versionMinor;
 @property (nullable, nonatomic, copy) NSString *webpage;
 @property (nullable, nonatomic, copy) NSNumber *quota;
 @property (nullable, nonatomic, copy) NSNumber *quotaFree;

+ 3 - 0
iOSClient/FileSystem/TableAccount+CoreDataProperties.m

@@ -42,6 +42,9 @@
 @dynamic email;
 @dynamic phone;
 @dynamic twitter;
+@dynamic versionMajor;
+@dynamic versionMinor;
+@dynamic versionMicro;
 @dynamic webpage;
 @dynamic quota;
 @dynamic quotaFree;

+ 2 - 0
iOSClient/Main/CCMain.m

@@ -1102,6 +1102,8 @@
 - (void)getCapabilitiesOfServerSuccess:(OCCapabilities *)capabilities
 {
     app.capabilities = capabilities;
+    
+    
 }
 
 - (void)getFeaturesSupportedByServerSuccess:(BOOL)hasCapabilitiesSupport hasForbiddenCharactersSupport:(BOOL)hasForbiddenCharactersSupport hasShareSupport:(BOOL)hasShareSupport hasShareeSupport:(BOOL)hasShareeSupport

+ 4 - 1
iOSClient/cryptocloud.xcdatamodeld/cryptocloud 7.xcdatamodel/contents

@@ -34,6 +34,9 @@
         <attribute name="twitter" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="url" optional="YES" attributeType="String" syncable="YES"/>
         <attribute name="user" optional="YES" attributeType="String" syncable="YES"/>
+        <attribute name="versionMajor" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="versionMicro" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="versionMinor" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="webpage" optional="YES" attributeType="String" syncable="YES"/>
     </entity>
     <entity name="TableAutomaticUpload" representedClassName="TableAutomaticUpload" syncable="YES">
@@ -134,7 +137,7 @@
         <attribute name="shareUserAndGroup" optional="YES" attributeType="String" syncable="YES"/>
     </entity>
     <elements>
-        <element name="TableAccount" positionX="-6597" positionY="111" width="171" height="555"/>
+        <element name="TableAccount" positionX="-6597" positionY="111" width="171" height="600"/>
         <element name="TableAutomaticUpload" positionX="-6597" positionY="801" width="128" height="180"/>
         <element name="TableCertificates" positionX="-6597" positionY="711" width="128" height="75"/>
         <element name="TableDirectory" positionX="-6372" positionY="111" width="162" height="240"/>