diff --git a/src/com/owncloud/android/lib/operations/remote/CreateShareRemoteOperation.java b/src/com/owncloud/android/lib/operations/remote/CreateShareRemoteOperation.java index 744ffabd..ff3969c6 100644 --- a/src/com/owncloud/android/lib/operations/remote/CreateShareRemoteOperation.java +++ b/src/com/owncloud/android/lib/operations/remote/CreateShareRemoteOperation.java @@ -113,7 +113,9 @@ public class CreateShareRemoteOperation extends RemoteOperation { post.addParameter(PARAM_SHARE_TYPE, Integer.toString(mShareType.getValue())); post.addParameter(PARAM_SHARE_WITH, mShareWith); post.addParameter(PARAM_PUBLIC_UPLOAD, Boolean.toString(mPublicUpload)); - post.addParameter(PARAM_PASSWORD, mPassword); + if (mPassword != null && mPassword.length() > 0) { + post.addParameter(PARAM_PASSWORD, mPassword); + } post.addParameter(PARAM_PERMISSIONS, Integer.toString(mPermissions)); status = client.executeMethod(post); diff --git a/src/com/owncloud/android/lib/operations/remote/GetSharesForFileRemoteOperation.java b/src/com/owncloud/android/lib/operations/remote/GetSharesForFileRemoteOperation.java index 07c2fea9..ad1e6e61 100644 --- a/src/com/owncloud/android/lib/operations/remote/GetSharesForFileRemoteOperation.java +++ b/src/com/owncloud/android/lib/operations/remote/GetSharesForFileRemoteOperation.java @@ -94,13 +94,9 @@ public class GetSharesForFileRemoteOperation extends RemoteOperation { // Add Parameters to Get Method get.setQueryString(new NameValuePair[] { - new NameValuePair(PARAM_PATH, mPath) - }); - get.setQueryString(new NameValuePair[] { - new NameValuePair(PARAM_RESHARES, String.valueOf(mReshares)) - }); - get.setQueryString(new NameValuePair[] { - new NameValuePair(PARAM_SUBFILES, String.valueOf(mSubfiles)) + new NameValuePair(PARAM_PATH, mPath), + new NameValuePair(PARAM_RESHARES, String.valueOf(mReshares)), + new NameValuePair(PARAM_SUBFILES, String.valueOf(mSubfiles)) }); status = client.executeMethod(get);