routes.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. // Core ajax actions
  9. // Search
  10. $this->create('search_ajax_search', '/search/ajax/search.php')
  11. ->actionInclude('search/ajax/search.php');
  12. // AppConfig
  13. $this->create('core_ajax_appconfig', '/core/ajax/appconfig.php')
  14. ->actionInclude('core/ajax/appconfig.php');
  15. // Share
  16. $this->create('core_ajax_share', '/core/ajax/share.php')
  17. ->actionInclude('core/ajax/share.php');
  18. // Translations
  19. $this->create('core_ajax_translations', '/core/ajax/translations.php')
  20. ->actionInclude('core/ajax/translations.php');
  21. // VCategories
  22. $this->create('core_ajax_vcategories_add', '/core/ajax/vcategories/add.php')
  23. ->actionInclude('core/ajax/vcategories/add.php');
  24. $this->create('core_ajax_vcategories_delete', '/core/ajax/vcategories/delete.php')
  25. ->actionInclude('core/ajax/vcategories/delete.php');
  26. $this->create('core_ajax_vcategories_addtofavorites', '/core/ajax/vcategories/addToFavorites.php')
  27. ->actionInclude('core/ajax/vcategories/addToFavorites.php');
  28. $this->create('core_ajax_vcategories_removefromfavorites', '/core/ajax/vcategories/removeFromFavorites.php')
  29. ->actionInclude('core/ajax/vcategories/removeFromFavorites.php');
  30. $this->create('core_ajax_vcategories_favorites', '/core/ajax/vcategories/favorites.php')
  31. ->actionInclude('core/ajax/vcategories/favorites.php');
  32. $this->create('core_ajax_vcategories_edit', '/core/ajax/vcategories/edit.php')
  33. ->actionInclude('core/ajax/vcategories/edit.php');
  34. // Routing
  35. $this->create('core_ajax_routes', '/core/routes.json')
  36. ->action('OC_Router', 'JSRoutes');
  37. OC::$CLASSPATH['OC_Core_LostPassword_Controller'] = 'core/lostpassword/controller.php';
  38. $this->create('core_lostpassword_index', '/lostpassword/')
  39. ->get()
  40. ->action('OC_Core_LostPassword_Controller', 'index');
  41. $this->create('core_lostpassword_send_email', '/lostpassword/')
  42. ->post()
  43. ->action('OC_Core_LostPassword_Controller', 'sendEmail');
  44. $this->create('core_lostpassword_reset', '/lostpassword/reset/{token}/{user}')
  45. ->get()
  46. ->action('OC_Core_LostPassword_Controller', 'reset');
  47. $this->create('core_lostpassword_reset_password', '/lostpassword/reset/{token}/{user}')
  48. ->post()
  49. ->action('OC_Core_LostPassword_Controller', 'resetPassword');
  50. // Not specifically routed
  51. $this->create('app_css', '/apps/{app}/{file}')
  52. ->requirements(array('file' => '.*.css'))
  53. ->action('OC', 'loadCSSFile');
  54. $this->create('app_index_script', '/apps/{app}/')
  55. ->defaults(array('file' => 'index.php'))
  56. //->requirements(array('file' => '.*.php'))
  57. ->action('OC', 'loadAppScriptFile');
  58. $this->create('app_script', '/apps/{app}/{file}')
  59. ->defaults(array('file' => 'index.php'))
  60. ->requirements(array('file' => '.*.php'))
  61. ->action('OC', 'loadAppScriptFile');