summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/js/js.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 976027dd06b..1c7d89ea055 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -253,6 +253,12 @@ var OC={
return link;
},
/**
+ * Redirect to the target URL, can also be used for downloads.
+ */
+ redirect: function(targetUrl) {
+ window.location = targetUrl;
+ },
+ /**
* get the absolute path to an image file
* @param app the app id to which the image belongs
* @param file the name of the image file