Skip to content
Snippets Groups Projects
Commit 78c456b8 authored by Joas Schilling's avatar Joas Schilling
Browse files

Allow creating OCS v2 links in JS

parent a03b1f1e
No related branches found
No related tags found
No related merge requests found
......@@ -119,10 +119,12 @@ var OC={
/**
* Gets the base path for the given OCS API service.
* @param {string} service name
* @param {int} version OCS API version
* @return {string} OCS API base path
*/
linkToOCS: function(service) {
return window.location.protocol + '//' + window.location.host + OC.webroot + '/ocs/v1.php/' + service + '/';
linkToOCS: function(service, version) {
version = (version !== 2) ? 1 : 2;
return window.location.protocol + '//' + window.location.host + OC.webroot + '/ocs/v' + version + '.php/' + service + '/';
},
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment