Skip to content

Commit 3384f3f

Browse files
do not hardcode server url
1 parent 76f7ead commit 3384f3f

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

app/src/main/java/com/owncloud/android/operations/albums/CopyFileToAlbumOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ private RemoteOperationResult performCopyOperation(String targetRemotePath, OwnC
109109
RemoteOperationResult result;
110110

111111
try {
112-
copyMethod = new CopyMethod(client.getFilesDavUri(this.srcPath), "https://pre1.next.magentacloud.de/remote.php/dav/photos/" + client.getUserId() + "/albums" + WebdavUtils.encodePath(targetRemotePath), false);
112+
copyMethod = new CopyMethod(client.getFilesDavUri(this.srcPath), client.getBaseUri() + "/remote.php/dav/photos/" + client.getUserId() + "/albums" + WebdavUtils.encodePath(targetRemotePath), false);
113113
int status = client.executeMethod(copyMethod);
114114
if (status == 207) {
115115
result = this.processPartialError(copyMethod);

app/src/main/java/com/owncloud/android/operations/albums/CreateNewAlbumOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected RemoteOperationResult<Void> run(OwnCloudClient client) {
4141
MkColMethod mkCol = null;
4242
RemoteOperationResult<Void> result;
4343
try {
44-
mkCol = new MkColMethod("https://pre1.next.magentacloud.de/remote.php/dav/photos/" + client.getUserId() + "/albums" + WebdavUtils.encodePath(newAlbumName));
44+
mkCol = new MkColMethod(client.getBaseUri() + "/remote.php/dav/photos/" + client.getUserId() + "/albums" + WebdavUtils.encodePath(newAlbumName));
4545
client.executeMethod(mkCol);
4646
if (405 == mkCol.getStatusCode()) {
4747
result = new RemoteOperationResult<>(RemoteOperationResult.ResultCode.FOLDER_ALREADY_EXISTS);

app/src/main/java/com/owncloud/android/operations/albums/ReadAlbumItemsOperation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected RemoteOperationResult<List<OCFile>> run(OwnCloudClient client) {
4646
Log_OC.e(TAG, "Reading Album Operations running");
4747
RemoteOperationResult<List<OCFile>> result = null;
4848
PropFindMethod query = null;
49-
String url = "https://pre1.next.magentacloud.de/remote.php/dav/photos/" + client.getUserId() + "/albums" + WebdavUtils.encodePath(albumPath);
49+
String url = client.getBaseUri() + "/remote.php/dav/photos/" + client.getUserId() + "/albums" + WebdavUtils.encodePath(albumPath);
5050
try {
5151
query = new PropFindMethod(url, WebdavUtils.getAllPropSet(), 1);
5252
int status = client.executeMethod(query);
@@ -87,7 +87,7 @@ protected RemoteOperationResult<List<OCFile>> run(OwnCloudClient client) {
8787
}
8888

8989
private void readData(MultiStatus remoteData, OwnCloudClient client) {
90-
String url = "https://pre1.next.magentacloud.de/remote.php/dav/photos/" + client.getUserId();
90+
String url = client.getBaseUri() + "/remote.php/dav/photos/" + client.getUserId();
9191
this.mFolderAndFiles = new ArrayList<>();
9292

9393
// reading from 1 as 0th item will be just the root album path

app/src/main/java/com/owncloud/android/operations/albums/ReadAlbumsOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected RemoteOperationResult<List<ReadAlbumsOperation.PhotoAlbumEntry>> run(O
6161
Log_OC.e(TAG, "Fetch albums remote operation running");
6262
PropFindMethod propfind = null;
6363
RemoteOperationResult<List<ReadAlbumsOperation.PhotoAlbumEntry>> result;
64-
String url = "https://pre1.next.magentacloud.de/remote.php/dav/photos/" + client.getUserId() + "/albums";
64+
String url = client.getBaseUri() + "/remote.php/dav/photos/" + client.getUserId() + "/albums";
6565
if (!TextUtils.isEmpty(albumPath)) {
6666
url += WebdavUtils.encodePath(albumPath);
6767
}

app/src/main/java/com/owncloud/android/operations/albums/RemoveAlbumOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ protected RemoteOperationResult run(OwnCloudClient client) {
4040
DeleteMethod delete = null;
4141

4242
try {
43-
delete = new DeleteMethod("https://pre1.next.magentacloud.de/remote.php/dav/photos/" + client.getUserId() + "/albums" + WebdavUtils.encodePath(albumName));
43+
delete = new DeleteMethod(client.getBaseUri() + "/remote.php/dav/photos/" + client.getUserId() + "/albums" + WebdavUtils.encodePath(albumName));
4444
int status = client.executeMethod(delete);
4545
delete.getResponseBodyAsString();
4646
result = new RemoteOperationResult(delete.succeeded() || status == 404, delete);

app/src/main/java/com/owncloud/android/operations/albums/RenameAlbumOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public String getNewAlbumName() {
4444
protected RemoteOperationResult run(OwnCloudClient client) {
4545
RemoteOperationResult result = null;
4646
MoveMethod move = null;
47-
String url = "https://pre1.next.magentacloud.de/remote.php/dav/photos/" + client.getUserId() + "/albums";
47+
String url = client.getBaseUri() + "/remote.php/dav/photos/" + client.getUserId() + "/albums";
4848
try {
4949
if (!this.newAlbumName.equals(this.oldAlbumName)) {
5050
move = new MoveMethod(url + WebdavUtils.encodePath(oldAlbumName), url + WebdavUtils.encodePath(newAlbumName), true);

0 commit comments

Comments
 (0)