diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2014-05-30 13:42:24 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2014-05-30 13:42:24 +0200 |
commit | 517501ffbf369b24191d8b9a9f2ce44a9891fb97 (patch) | |
tree | f638ba7e2f3554b7b1a31f628496c7d0740fd2ac /core/js/js.js | |
parent | 929882a32a020b6c05605f416fa55024b9a60d33 (diff) | |
parent | 7fac2b62e954b0f8a693516da1151c97efa2ee99 (diff) | |
download | nextcloud-server-517501ffbf369b24191d8b9a9f2ce44a9891fb97.tar.gz nextcloud-server-517501ffbf369b24191d8b9a9f2ce44a9891fb97.zip |
Merge pull request #8417 from owncloud/share-overview
Sharing overview page
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/core/js/js.js b/core/js/js.js index 3c3efc469bf..e31f67cca9c 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -211,7 +211,16 @@ var OC={ linkToRemote:function(service) { return window.location.protocol + '//' + window.location.host + OC.linkToRemoteBase(service); }, - + + /** + * Gets the base path for the given OCS API service. + * @param {string} service name + * @return {string} OCS API base path + */ + linkToOCS: function(service) { + return window.location.protocol + '//' + window.location.host + OC.webroot + '/ocs/v1.php/' + service + '/'; + }, + /** * Generates the absolute url for the given relative url, which can contain parameters. * @param {string} url @@ -1241,7 +1250,7 @@ OC.Util = { * @return {string} fixed image path with png extension if SVG is not supported */ replaceSVGIcon: function(file) { - if (!OC.Util.hasSVGSupport()) { + if (file && !OC.Util.hasSVGSupport()) { var i = file.lastIndexOf('.svg'); if (i >= 0) { file = file.substr(0, i) + '.png' + file.substr(i+4); |