SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/config/routes.php

Kohana routing rules
  1. <?php
  2. /*
  3.  * kate: tab-width 4; indent-width 4; space-indent on; word-wrap off; word-wrap-column 120;
  4.  * :tabSize=4:indentSize=4:noTabs=true:wrap=false:maxLineLen=120:mode=php:
  5.  *
  6.  * Copyright (C) 2016 Karmabunny Pty Ltd.
  7.  *
  8.  * This file is a part of SproutCMS.
  9.  *
  10.  * SproutCMS is free software: you can redistribute it and/or modify it under the terms
  11.  * of the GNU General Public License as published by the Free Software Foundation, either
  12.  * version 2 of the License, or (at your option) any later version.
  13.  *
  14.  * For more information, visit <http://getsproutcms.com>.
  15.  */
  16.  
  17. /**
  18.  * Kohana routing rules
  19.  * @package Kohana
  20.  */
  21.  
  22. /**
  23.  * Default controller to use
  24.  */
  25. $config['_default'] = 'SproutModules\Karmabunny\HomePage\Controllers\HomePageController';
  26.  
  27.  
  28. // $config['admin/edit/.+'] = 'AdminController/edit/$1';
  29. $config['admin_ajax/widget_settings/([^/]+)'] = 'AdminAjaxController/widgetSettings/$1';
  30. $config['admin_ajax/widget_disp_conds'] = 'AdminAjaxController/widgetDispConds';
  31. $config['admin_ajax/widget_disp_cond_params'] = 'AdminAjaxController/widgetDispCondParams';
  32. $config['admin_ajax/add_addon/([0-9]+)/([^/]+)'] = 'AdminAjaxController/addAddon/$1/$2';
  33. $config['admin_ajax/footer_compat'] = 'AdminAjaxController/footerCompat';
  34. $config['admin_ajax/get_tag_suggestions/([^/]+)'] = 'AdminAjaxController/getTagSuggestions/$1';
  35. $config['admin_ajax/get_tag_suggestions'] = 'AdminAjaxController/getTagSuggestions';
  36. $config['admin_ajax/get_entrance_arguments/([^/]+)'] = 'AdminAjaxController/getEntranceArguments/$1';
  37. $config['admin_ajax/get_entrance_arguments'] = 'AdminAjaxController/getEntranceArguments';
  38. $config['admin_ajax/add_category'] = 'AdminAjaxController/addCategory';
  39. $config['admin_ajax/attr_editor'] = 'AdminAjaxController/attrEditor';
  40. $config['admin_ajax/lnk_editor'] = 'AdminAjaxController/lnkEditor';
  41. $config['admin_ajax/tour_complete/([-_a-zA-Z0-9]+)'] = 'AdminAjaxController/setTourCompleted/$1';
  42. $config['admin_ajax/richtext_import/([^/]+)'] = 'AdminAjaxController/richtextImport/$1';
  43. $config['admin_ajax/richtext_import_iframe'] = 'AdminAjaxController/richtextImportIframe';
  44. $config['admin_ajax/lnk_editor'] = 'AdminAjaxController/lnkEditor';
  45. $config['admin_ajax/style_guide_demo_conditions'] = 'AdminAjaxController/styleGuideDemoConditions';
  46.  
  47. $config['admin/?'] = 'AdminController/index';
  48. $config['admin/login'] = 'AdminController/login';
  49. $config['admin/login_action'] = 'AdminController/loginAction';
  50. $config['admin/login-two-factor'] = 'AdminController/loginTwoFactor';
  51. $config['admin/login-two-factor-action'] = 'AdminController/loginTwoFactorAction';
  52. $config['admin/logout'] = 'AdminController/logout';
  53. $config['admin/set_richtext/([^/]+)'] = 'AdminController/setRichtext/$1';
  54. $config['admin/style_guide'] = 'AdminController/styleGuide/index';
  55. $config['admin/style_guide/([_a-z]+)'] = 'AdminController/styleGuide/$1';
  56. $config['admin/dashboard'] = 'AdminController/dashboard';
  57. $config['admin/close_firstrun'] = 'AdminController/closeFirstrun';
  58. $config['admin/intro/([^/]+)'] = 'AdminController/intro/$1';
  59. $config['admin/search/([^/]+)'] = 'AdminController/search/$1';
  60. $config['admin/contents/([^/]+)'] = 'AdminController/contents/$1';
  61. $config['admin/export/([^/]+)'] = 'AdminController/export/$1';
  62. $config['admin/export_action/([^/]+)'] = 'AdminController/exportAction/$1';
  63. $config['admin/import_upload/([^/]+)'] = 'AdminController/importUpload/$1';
  64. $config['admin/import_upload_action/([^/]+)'] = 'AdminController/importUploadAction/$1';
  65. $config['admin/import_options/([^/]+)'] = 'AdminController/importOptions/$1';
  66. $config['admin/import_action/([^/]+)'] = 'AdminController/importAction/$1';
  67. $config['admin/add/([^/]+)'] = 'AdminController/add/$1';
  68. $config['admin/add_save/([^/]+)'] = 'AdminController/addSave/$1';
  69. $config['admin/edit/([^/]+)/([0-9]+)'] = 'AdminController/edit/$1/$2';
  70. $config['admin/edit_save/([^/]+)/([0-9]+)'] = 'AdminController/editSave/$1/$2';
  71. $config['admin/delete/([^/]+)/([0-9]+)'] = 'AdminController/delete/$1/$2';
  72. $config['admin/delete_save/([^/]+)/([0-9]+)'] = 'AdminController/deleteSave/$1/$2';
  73. $config['admin/restore/([0-9]+)'] = 'AdminController/restore/$1';
  74. $config['admin/duplicate/([^/]+)/([0-9]+)'] = 'AdminController/duplicate/$1/$2';
  75. $config['admin/duplicate_save/([^/]+)/([0-9]+)'] = 'AdminController/duplicateSave/$1/$2';
  76. $config['admin/moderate'] = 'AdminController/moderate';
  77. $config['admin/moderate_action'] = 'AdminController/moderateAction';
  78. $config['admin/extra/(.+)'] = 'AdminController/extra/$1';
  79. $config['admin/call/([^/]+)/(.+)'] = 'AdminController/call/$1/$2';
  80. $config['admin/set_active_subsite'] = 'AdminController/setActiveSubsite';
  81. $config['admin/ajax_unlock'] = 'AdminController/ajaxUnlock';
  82. $config['admin/user-agent'] = 'AdminController/userAgent';
  83. $config['admin/heartbeat'] = 'AdminController/heartbeat';
  84.  
  85. $config['content_subscribe/unsub/([0-9]+)/([a-z0-9]+)'] = 'Sprout\\Controllers\\ContentSubscribeController/unsub/$1/$2';
  86. $config['content_subscribe/unsub_action/([0-9]+)/([a-z0-9]+)'] = 'Sprout\\Controllers\\ContentSubscribeController/unsubAction/$1/$2';
  87.  
  88. $config['dbtools/?'] = 'DbToolsController/index';
  89. $config['dbtools/(.+)'] = 'DbToolsController/$1';
  90.  
  91. $config['email_share/share'] = 'Sprout\\Controllers\\EmailShareController/share';
  92. $config['email_share/submit'] = 'Sprout\\Controllers\\EmailShareController/submit';
  93. $config['email_share/thanks'] = 'Sprout\\Controllers\\EmailShareController/thanks';
  94.  
  95. $config['page/view_by_name/([^/]+)'] = 'Sprout\\Controllers\\PageController/viewByName/$1';
  96. $config['page/view_by_id/([0-9]+)'] = 'Sprout\\Controllers\\PageController/viewById/$1';
  97. $config['page/view_specific_rev/([0-9]+)/([0-9]+(?:/[a-zA-Z0-9]+)?)'] = 'Sprout\\Controllers\\PageController/viewSpecificRev/$1/$2';
  98. $config['page/preview_store/([0-9]+)'] = 'Sprout\\Controllers\\PageController/previewStore/$1';
  99. $config['page/preview/([0-9]+)'] = 'Sprout\\Controllers\\PageController/preview/$1';
  100. $config['page/additional_css/([0-9]+)/([^/]+)'] = 'Sprout\\Controllers\\PageController/additionalCss/$1/$2';
  101. $config['page/additional_css/([0-9]+)'] = 'Sprout\\Controllers\\PageController/additionalCss/$1';
  102. $config['page/front_end_search/([0-9]+)/([^/]+)/([^/]+)'] = 'Sprout\\Controllers\\PageController/frontEndSearch/$1/$2/$3';
  103. $config['page/review/([0-9]+)'] = 'Sprout\\Controllers\\PageController/review/$1';
  104.  
  105. $config['search(?:/(?:index)?)?'] = 'Sprout\\Controllers\\SearchController/index';
  106.  
  107. $config['file/resize/([^/]+)/([^/]+)'] = 'Sprout\\Controllers\\FileController/resize/$1/$2';
  108. $config['file/redirect_resize/([^/]+)/([^/]+)'] = 'Sprout\\Controllers\\FileController/redirectResize/$1/$2';
  109. $config['file/play_audio/([^/]+)'] = 'Sprout\\Controllers\\FileController/playAudio/$1';
  110. $config['file/download/([0-9]+)(?:/([a-z_]+))?'] = 'Sprout\\Controllers\\FileController/download/$1/$2';
  111. $config['file/name_lookup'] = 'Sprout\\Controllers\\FileController/nameLookup';
  112.  
  113. $config['tinymce4/image'] = 'Tinymce4Controller/image';
  114. $config['tinymce4/image_list/([0-9]+)'] = 'Tinymce4Controller/imageList/$1';
  115. $config['tinymce4/image_search'] = 'Tinymce4Controller/imageSearch';
  116. $config['tinymce4/image_size/([0-9]+)'] = 'Tinymce4Controller/imageSize/$1';
  117. $config['tinymce4/library'] = 'Tinymce4Controller/library';
  118. $config['tinymce4/library_search'] = 'Tinymce4Controller/librarySearch';
  119. $config['tinymce4/library_browse/([^/]+)'] = 'Tinymce4Controller/libraryBrowse/$1';
  120. $config['tinymce4/video'] = 'Tinymce4Controller/video';
  121. $config['tinymce4/video_list/([0-9]+)'] = 'Tinymce4Controller/videoList/$1';
  122. $config['tinymce4/video_search'] = 'Tinymce4Controller/videoSearch';
  123. $config['tinymce4/upload'] = 'Tinymce4Controller/upload';
  124. $config['tinymce4/gallery'] = 'Tinymce4Controller/gallery';
  125.  
  126. $config['cron_job/run/([a-zA-Z0-9_]+)'] = 'CronJobController/run/$1';
  127. $config['cron_job/runJob'] = 'CronJobController/runJob';
  128.  
  129. $config['worker_job/run/([0-9]+)/([a-zA-Z0-9]+)'] = 'WorkerJobController/run/$1/$2';
  130.  
  131. $config['locale/get_address_fields/([^/]+)'] = 'LocaleController/getAddressFields/$1';
  132. $config['locale/get_address_fields_required/([^/]+)'] = 'LocaleController/getAddressFieldsRequired/$1';
  133.  
  134. if (IN_PRODUCTION) {
  135. $config['robots\.txt'] = 'SeoController/robots';
  136. } else {
  137. $config['robots\.txt'] = 'SeoController/robotsDeny';
  138. }
  139.  
  140. $config['seo/xmlSitemap'] = 'SeoController/xmlSitemap';
  141.  
  142. $config['embed_video/thumb/([^/]+)/([^/]+)/([^/]+)'] = 'EmbedVideoController/thumb/$1/$2/$3';
  143.  
  144. $config['file_upload/upload_begin'] = 'Sprout\\Controllers\\FileUploadController/uploadBegin';
  145. $config['file_upload/upload_chunk'] = 'Sprout\\Controllers\\FileUploadController/uploadChunk';
  146. $config['file_upload/upload_done'] = 'Sprout\\Controllers\\FileUploadController/uploadDone';
  147. $config['file_upload/upload_form'] = 'Sprout\\Controllers\\FileUploadController/uploadForm';
  148. $config['file_upload/upload_cancel'] = 'Sprout\\Controllers\\FileUploadController/uploadCancel';
  149.  
  150. $config['captcha/image/([0-9]+)'] = 'Sprout\\Controllers\\CaptchaController/image/$1';
  151. $config['captcha/about'] = 'Sprout\\Controllers\\CaptchaController/about';
  152.  
  153. $config['advanced_search'] = 'Sprout\\Controllers\\AdvancedSearchController/index';
  154.  
  155. $config['result/(error|success)'] = 'Sprout\\Controllers\\ResultController/$1';
  156.