diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-02 22:30:24 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-02 22:30:24 +0100 |
commit | 1291303c5a312fad9f01fbaf22cc21e3b9b3675d (patch) | |
tree | c1e46efc7589c3101a8c3806ecc3112c8f3e2849 /lib | |
parent | 88c9ae129e7dcc0e10aee682c8d4fa31b93b614c (diff) | |
download | nextcloud-server-1291303c5a312fad9f01fbaf22cc21e3b9b3675d.tar.gz nextcloud-server-1291303c5a312fad9f01fbaf22cc21e3b9b3675d.zip |
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 49cbb1279d1..7703e83ec2e 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 ) ); - } } |