You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

routes.php 3.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?php
  2. /**
  3. * Copyright (c) 2012 Bart Visscher <bartv@thisnet.nl>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. // Post installation check
  9. $this->create('post_setup_check', '/post-setup-check')
  10. ->action('OC_Setup', 'postSetupCheck');
  11. // Core ajax actions
  12. // Search
  13. $this->create('search_ajax_search', '/search/ajax/search.php')
  14. ->actionInclude('search/ajax/search.php');
  15. // AppConfig
  16. $this->create('core_ajax_appconfig', '/core/ajax/appconfig.php')
  17. ->actionInclude('core/ajax/appconfig.php');
  18. // Share
  19. $this->create('core_ajax_share', '/core/ajax/share.php')
  20. ->actionInclude('core/ajax/share.php');
  21. // Translations
  22. $this->create('core_ajax_translations', '/core/ajax/translations.php')
  23. ->actionInclude('core/ajax/translations.php');
  24. // VCategories
  25. $this->create('core_ajax_vcategories_add', '/core/ajax/vcategories/add.php')
  26. ->actionInclude('core/ajax/vcategories/add.php');
  27. $this->create('core_ajax_vcategories_delete', '/core/ajax/vcategories/delete.php')
  28. ->actionInclude('core/ajax/vcategories/delete.php');
  29. $this->create('core_ajax_vcategories_addtofavorites', '/core/ajax/vcategories/addToFavorites.php')
  30. ->actionInclude('core/ajax/vcategories/addToFavorites.php');
  31. $this->create('core_ajax_vcategories_removefromfavorites', '/core/ajax/vcategories/removeFromFavorites.php')
  32. ->actionInclude('core/ajax/vcategories/removeFromFavorites.php');
  33. $this->create('core_ajax_vcategories_favorites', '/core/ajax/vcategories/favorites.php')
  34. ->actionInclude('core/ajax/vcategories/favorites.php');
  35. $this->create('core_ajax_vcategories_edit', '/core/ajax/vcategories/edit.php')
  36. ->actionInclude('core/ajax/vcategories/edit.php');
  37. // oC JS config
  38. $this->create('js_config', '/core/js/config.js')
  39. ->actionInclude('core/js/config.php');
  40. // Routing
  41. $this->create('core_ajax_routes', '/core/routes.json')
  42. ->action('OC_Router', 'JSRoutes');
  43. OC::$CLASSPATH['OC_Core_LostPassword_Controller'] = 'core/lostpassword/controller.php';
  44. $this->create('core_lostpassword_index', '/lostpassword/')
  45. ->get()
  46. ->action('OC_Core_LostPassword_Controller', 'index');
  47. $this->create('core_lostpassword_send_email', '/lostpassword/')
  48. ->post()
  49. ->action('OC_Core_LostPassword_Controller', 'sendEmail');
  50. $this->create('core_lostpassword_reset', '/lostpassword/reset/{token}/{user}')
  51. ->get()
  52. ->action('OC_Core_LostPassword_Controller', 'reset');
  53. $this->create('core_lostpassword_reset_password', '/lostpassword/reset/{token}/{user}')
  54. ->post()
  55. ->action('OC_Core_LostPassword_Controller', 'resetPassword');
  56. // Not specifically routed
  57. $this->create('app_css', '/apps/{app}/{file}')
  58. ->requirements(array('file' => '.*.css'))
  59. ->action('OC', 'loadCSSFile');
  60. $this->create('app_index_script', '/apps/{app}/')
  61. ->defaults(array('file' => 'index.php'))
  62. //->requirements(array('file' => '.*.php'))
  63. ->action('OC', 'loadAppScriptFile');
  64. $this->create('app_script', '/apps/{app}/{file}')
  65. ->defaults(array('file' => 'index.php'))
  66. ->requirements(array('file' => '.*.php'))
  67. ->action('OC', 'loadAppScriptFile');
  68. // used for heartbeat
  69. $this->create('heartbeat', '/heartbeat')->action(function(){
  70. // do nothing
  71. });