diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-03-06 14:49:12 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-03-06 14:49:12 +0100 |
commit | 6e4ea09d52b23c216109d020dcceea5370817a73 (patch) | |
tree | 8863e3147343b96917d8b2cc19e1efc2d29829de /lib | |
parent | bfd0d799d81ce4a805055ce17b67272b13fff035 (diff) | |
parent | 32b29c9d735ae235641a7ea3869c14d7eb69cb4f (diff) | |
download | nextcloud-server-6e4ea09d52b23c216109d020dcceea5370817a73.tar.gz nextcloud-server-6e4ea09d52b23c216109d020dcceea5370817a73.zip |
Merge pull request #7494 from owncloud/fix-7307
Replace OC.Router.generate() with OC.generateUrl()
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 1 | ||||
-rw-r--r-- | lib/private/router.php | 24 |
2 files changed, 0 insertions, 25 deletions
diff --git a/lib/base.php b/lib/base.php index 351b91b7dfa..a44db8fd4db 100644 --- a/lib/base.php +++ b/lib/base.php @@ -316,7 +316,6 @@ class OC { OC_Util::addScript("config"); //OC_Util::addScript( "multiselect" ); OC_Util::addScript('search', 'result'); - OC_Util::addScript('router'); OC_Util::addScript("oc-requesttoken"); // avatars diff --git a/lib/private/router.php b/lib/private/router.php index 19c1e4473ec..918e3b13206 100644 --- a/lib/private/router.php +++ b/lib/private/router.php @@ -158,28 +158,4 @@ class OC_Router { return $this->getGenerator()->generate($name, $parameters, $absolute); } - /** - * Generate JSON response for routing in javascript - */ - public static function JSRoutes() - { - $router = OC::getRouter(); - - $etag = $router->getCacheKey(); - OC_Response::enableCaching(); - OC_Response::setETagHeader($etag); - - $root = $router->getCollection('root'); - $routes = array(); - foreach($root->all() as $name => $route) { - $compiled_route = $route->compile(); - $defaults = $route->getDefaults(); - unset($defaults['action']); - $routes[$name] = array( - 'tokens' => $compiled_route->getTokens(), - 'defaults' => $defaults, - ); - } - OCP\JSON::success ( array( 'data' => $routes ) ); - } } |