routes.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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_edit', '/core/ajax/vcategories/edit.php')
  27. ->actionInclude('core/ajax/vcategories/edit.php');
  28. // Routing
  29. $this->create('core_ajax_routes', '/core/routes.json')
  30. ->action('OC_Router', 'JSRoutes');
  31. OC::$CLASSPATH['OC_Core_LostPassword_Controller'] = 'core/lostpassword/controller.php';
  32. $this->create('core_lostpassword_index', '/lostpassword/')
  33. ->get()
  34. ->action('OC_Core_LostPassword_Controller', 'index');
  35. $this->create('core_lostpassword_send_email', '/lostpassword/')
  36. ->post()
  37. ->action('OC_Core_LostPassword_Controller', 'sendEmail');
  38. $this->create('core_lostpassword_reset', '/lostpassword/reset/{token}/{user}')
  39. ->get()
  40. ->action('OC_Core_LostPassword_Controller', 'reset');
  41. $this->create('core_lostpassword_reset_password', '/lostpassword/reset/{token}/{user}')
  42. ->post()
  43. ->action('OC_Core_LostPassword_Controller', 'resetPassword');
  44. // Not specifically routed
  45. $this->create('app_css', '/apps/{app}/{file}')
  46. ->requirements(array('file' => '.*.css'))
  47. ->action('OC', 'loadCSSFile');
  48. $this->create('app_index_script', '/apps/{app}/')
  49. ->defaults(array('file' => 'index.php'))
  50. //->requirements(array('file' => '.*.php'))
  51. ->action('OC', 'loadAppScriptFile');
  52. $this->create('app_script', '/apps/{app}/{file}')
  53. ->defaults(array('file' => 'index.php'))
  54. ->requirements(array('file' => '.*.php'))
  55. ->action('OC', 'loadAppScriptFile');