Loading src/com/owncloud/android/lib/common/accounts/AccountUtils.java +5 −1 Original line number Diff line number Diff line Loading @@ -423,6 +423,10 @@ public class AccountUtils { */ public static final String KEY_DISPLAY_NAME = "oc_display_name"; /** * User ID */ public static final String KEY_USER_ID = "oc_id"; } } src/com/owncloud/android/lib/resources/files/ToggleFavoriteOperation.java +4 −2 Original line number Diff line number Diff line Loading @@ -43,10 +43,12 @@ import java.io.IOException; public class ToggleFavoriteOperation extends RemoteOperation { private boolean makeItFavorited; private String filePath; private String userID; public ToggleFavoriteOperation(boolean makeItFavorited, String filePath) { public ToggleFavoriteOperation(boolean makeItFavorited, String filePath, String userID) { this.makeItFavorited = makeItFavorited; this.filePath = filePath; this.userID = userID; } @Override Loading @@ -69,7 +71,7 @@ public class ToggleFavoriteOperation extends RemoteOperation { int pos = filePath.lastIndexOf('/') + 1; filePath = filePath.substring(0, pos) + Uri.encode(filePath.substring(pos)); String fullFilePath = webDavUrl + "/files/" + client.getCredentials().getUsername() + filePath; String fullFilePath = webDavUrl + "/files/" + userID + filePath; try { propPatchMethod = new PropPatchMethod(fullFilePath, Loading src/com/owncloud/android/lib/resources/status/GetRemoteCapabilitiesOperation.java +8 −2 Original line number Diff line number Diff line Loading @@ -279,8 +279,14 @@ public class GetRemoteCapabilitiesOperation extends RemoteOperation { capability.setServerName(respTheming.getString(PROPERTY_SERVERNAME)); capability.setServerSlogan(respTheming.getString(PROPERTY_SERVERSLOGAN)); capability.setServerColor(respTheming.getString(PROPERTY_SERVERCOLOR)); if (respTheming.has(PROPERTY_SERVERLOGO) && respTheming.getString(PROPERTY_SERVERLOGO) != null) { capability.setServerLogo(respTheming.getString(PROPERTY_SERVERLOGO)); } if (respTheming.has(PROPERTY_SERVERBACKGROUND) && respTheming.getString(PROPERTY_SERVERBACKGROUND) != null) { capability.setServerBackground(respTheming.getString(PROPERTY_SERVERBACKGROUND)); } Log_OC.d(TAG, "*** Added " + NODE_THEMING); } Loading src/com/owncloud/android/lib/resources/users/GetRemoteUserInfoOperation.java +17 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import com.owncloud.android.lib.common.UserInfo; import com.owncloud.android.lib.common.operations.RemoteOperation; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.lib.resources.status.OwnCloudVersion; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.NameValuePair; Loading Loading @@ -97,16 +98,31 @@ public class GetRemoteUserInfoOperation extends RemoteOperation { */ public static final long QUOTA_LIMIT_INFO_NOT_AVAILABLE = Long.MIN_VALUE; private String userID; public GetRemoteUserInfoOperation() { } public GetRemoteUserInfoOperation(String userID) { this.userID = userID; } @Override protected RemoteOperationResult run(OwnCloudClient client) { RemoteOperationResult result = null; int status = -1; GetMethod get = null; String url = client.getBaseUri() + OCS_ROUTE_SELF; OwnCloudVersion version = client.getOwnCloudVersion(); boolean versionWithSelfAPI = version != null && version.isSelfSupported(); String url = ""; if (!versionWithSelfAPI && TextUtils.isEmpty(userID)) { url = client.getBaseUri() + OCS_ROUTE_SEARCH + userID; } else { url = client.getBaseUri() + OCS_ROUTE_SELF; } OwnCloudBasicCredentials credentials = (OwnCloudBasicCredentials) client.getCredentials(); Loading Loading
src/com/owncloud/android/lib/common/accounts/AccountUtils.java +5 −1 Original line number Diff line number Diff line Loading @@ -423,6 +423,10 @@ public class AccountUtils { */ public static final String KEY_DISPLAY_NAME = "oc_display_name"; /** * User ID */ public static final String KEY_USER_ID = "oc_id"; } }
src/com/owncloud/android/lib/resources/files/ToggleFavoriteOperation.java +4 −2 Original line number Diff line number Diff line Loading @@ -43,10 +43,12 @@ import java.io.IOException; public class ToggleFavoriteOperation extends RemoteOperation { private boolean makeItFavorited; private String filePath; private String userID; public ToggleFavoriteOperation(boolean makeItFavorited, String filePath) { public ToggleFavoriteOperation(boolean makeItFavorited, String filePath, String userID) { this.makeItFavorited = makeItFavorited; this.filePath = filePath; this.userID = userID; } @Override Loading @@ -69,7 +71,7 @@ public class ToggleFavoriteOperation extends RemoteOperation { int pos = filePath.lastIndexOf('/') + 1; filePath = filePath.substring(0, pos) + Uri.encode(filePath.substring(pos)); String fullFilePath = webDavUrl + "/files/" + client.getCredentials().getUsername() + filePath; String fullFilePath = webDavUrl + "/files/" + userID + filePath; try { propPatchMethod = new PropPatchMethod(fullFilePath, Loading
src/com/owncloud/android/lib/resources/status/GetRemoteCapabilitiesOperation.java +8 −2 Original line number Diff line number Diff line Loading @@ -279,8 +279,14 @@ public class GetRemoteCapabilitiesOperation extends RemoteOperation { capability.setServerName(respTheming.getString(PROPERTY_SERVERNAME)); capability.setServerSlogan(respTheming.getString(PROPERTY_SERVERSLOGAN)); capability.setServerColor(respTheming.getString(PROPERTY_SERVERCOLOR)); if (respTheming.has(PROPERTY_SERVERLOGO) && respTheming.getString(PROPERTY_SERVERLOGO) != null) { capability.setServerLogo(respTheming.getString(PROPERTY_SERVERLOGO)); } if (respTheming.has(PROPERTY_SERVERBACKGROUND) && respTheming.getString(PROPERTY_SERVERBACKGROUND) != null) { capability.setServerBackground(respTheming.getString(PROPERTY_SERVERBACKGROUND)); } Log_OC.d(TAG, "*** Added " + NODE_THEMING); } Loading
src/com/owncloud/android/lib/resources/users/GetRemoteUserInfoOperation.java +17 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import com.owncloud.android.lib.common.UserInfo; import com.owncloud.android.lib.common.operations.RemoteOperation; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.common.utils.Log_OC; import com.owncloud.android.lib.resources.status.OwnCloudVersion; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.NameValuePair; Loading Loading @@ -97,16 +98,31 @@ public class GetRemoteUserInfoOperation extends RemoteOperation { */ public static final long QUOTA_LIMIT_INFO_NOT_AVAILABLE = Long.MIN_VALUE; private String userID; public GetRemoteUserInfoOperation() { } public GetRemoteUserInfoOperation(String userID) { this.userID = userID; } @Override protected RemoteOperationResult run(OwnCloudClient client) { RemoteOperationResult result = null; int status = -1; GetMethod get = null; String url = client.getBaseUri() + OCS_ROUTE_SELF; OwnCloudVersion version = client.getOwnCloudVersion(); boolean versionWithSelfAPI = version != null && version.isSelfSupported(); String url = ""; if (!versionWithSelfAPI && TextUtils.isEmpty(userID)) { url = client.getBaseUri() + OCS_ROUTE_SEARCH + userID; } else { url = client.getBaseUri() + OCS_ROUTE_SELF; } OwnCloudBasicCredentials credentials = (OwnCloudBasicCredentials) client.getCredentials(); Loading