$files = $this->getRoutingFiles();
$files[] = 'settings/routes.php';
$files[] = 'core/routes.php';
+ $files[] = 'ocs/routes.php';
$this->cache_key = OC_Cache::generateCacheKeyFromFiles($files);
}
return $this->cache_key;
* loads the api routes
*/
public function loadRoutes() {
- // include ocs routes
- require_once(OC::$SERVERROOT.'/ocs/routes.php');
- $collection = $this->getCollection('ocs');
- $this->root->addCollection($collection, '/ocs');
-
foreach($this->getRoutingFiles() as $app => $file) {
$this->useCollection($app);
require_once $file;
require_once 'settings/routes.php';
require_once 'core/routes.php';
+ // include ocs routes
+ require_once 'ocs/routes.php';
+ $collection = $this->getCollection('ocs');
+ $this->root->addCollection($collection, '/ocs');
}
protected function getCollection($name) {