diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-05-02 16:03:58 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-05-06 17:55:30 +0200 |
commit | 249a5dbdba0dc3628c0f3490680de61dc91aafc8 (patch) | |
tree | 452f288909bb811146a0683b8a75c1b87932aadc /core/js/js.js | |
parent | e0c62352b71441c2f843fd5f023000af342011a8 (diff) | |
download | nextcloud-server-249a5dbdba0dc3628c0f3490680de61dc91aafc8.tar.gz nextcloud-server-249a5dbdba0dc3628c0f3490680de61dc91aafc8.zip |
Move oc_webroot, OC.webroot and OC.getRootPath() to the bundle
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/core/js/js.js b/core/js/js.js index a098418be1d..0959528b31a 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1,18 +1,6 @@ -var oc_webroot; var oc_current_user = document.getElementsByTagName('head')[0].getAttribute('data-user'); var oc_requesttoken = document.getElementsByTagName('head')[0].getAttribute('data-requesttoken'); -if (typeof oc_webroot === "undefined") { - oc_webroot = location.pathname; - var pos = oc_webroot.indexOf('/index.php/'); - if (pos !== -1) { - oc_webroot = oc_webroot.substr(0, pos); - } - else { - oc_webroot = oc_webroot.substr(0, oc_webroot.lastIndexOf('/')); - } -} - /** @namespace OCP */ var OCP = Object.assign({}, window.OCP); @@ -30,17 +18,6 @@ Object.assign(window.OC, { TAG_FAVORITE: '_$!<Favorite>!$_', /* jshint camelcase: false */ /** - * Relative path to Nextcloud root. - * For example: "/nextcloud" - * - * @type string - * - * @deprecated since 8.2, use OC.getRootPath() instead - * @see OC#getRootPath - */ - webroot:oc_webroot, - - /** * Capabilities * * @type array @@ -116,20 +93,6 @@ Object.assign(window.OC, { }, /** - * Returns the web root path where this Nextcloud instance - * is accessible, with a leading slash. - * For example "/nextcloud". - * - * @return {string} web root path - * - * @since 8.2 - */ - getRootPath: function() { - return OC.webroot; - }, - - - /** * Returns the capabilities * * @return {array} capabilities |