Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial commit.

  • Loading branch information...
commit d7c83d719eb1e7510166fa8f06ad341e6875686f 1 parent 16ee9df
Yusuke Ando authored
Showing with 15,008 additions and 0 deletions.
  1. +5 −0 app/.htaccess
  2. +74 −0 app/config/acl.ini.php
  3. +45 −0 app/config/bootstrap.php
  4. +227 −0 app/config/core.php
  5. +101 −0 app/config/database.php
  6. +101 −0 app/config/database.php.default
  7. +70 −0 app/config/inflections.php
  8. +39 −0 app/config/routes.php
  9. +79 −0 app/config/sql/db_acl.php
  10. +40 −0 app/config/sql/db_acl.sql
  11. +56 −0 app/config/sql/i18n.php
  12. +26 −0 app/config/sql/i18n.sql
  13. +53 −0 app/config/sql/sessions.php
  14. +16 −0 app/config/sql/sessions.sql
  15. +195 −0 app/controllers/account_controller.php
  16. +94 −0 app/controllers/admin_controller.php
  17. +230 −0 app/controllers/app_controller.php
  18. +235 −0 app/controllers/application.php
  19. +75 −0 app/controllers/attachments_controller.php
  20. +83 −0 app/controllers/auth_sources_controller.php
  21. +88 −0 app/controllers/boards_controller.php
  22. 0  app/controllers/components/empty
  23. +89 −0 app/controllers/custom_fields_controller.php
  24. +89 −0 app/controllers/documents_controller.php
  25. +94 −0 app/controllers/enumerations_controller.php
  26. +53 −0 app/controllers/issue_categories_controller.php
  27. +59 −0 app/controllers/issue_relations_controller.php
  28. +85 −0 app/controllers/issue_statuses_controller.php
  29. +488 −0 app/controllers/issues_controller.php
  30. +42 −0 app/controllers/journals_controller.php
  31. +45 −0 app/controllers/mail_handler_controller.php
  32. +62 −0 app/controllers/members_controller.php
  33. +126 −0 app/controllers/messages_controller.php
  34. +161 −0 app/controllers/my_controller.php
  35. +109 −0 app/controllers/news_controller.php
  36. +297 −0 app/controllers/projects_controller.php
  37. +81 −0 app/controllers/queries_controller.php
  38. +237 −0 app/controllers/reports_controller.php
  39. +329 −0 app/controllers/repositories_controller.php
  40. +95 −0 app/controllers/roles_controller.php
  41. +117 −0 app/controllers/search_controller.php
  42. +60 −0 app/controllers/settings_controller.php
  43. +47 −0 app/controllers/sys_controller.php
  44. +291 −0 app/controllers/timelog_controller.php
  45. +80 −0 app/controllers/trackers_controller.php
  46. +105 −0 app/controllers/users_controller.php
  47. +55 −0 app/controllers/versions_controller.php
  48. +71 −0 app/controllers/watchers_controller.php
  49. +9 −0 app/controllers/welcome_controller.php
  50. +212 −0 app/controllers/wiki_controller.php
  51. +45 −0 app/controllers/wikis_controller.php
  52. +46 −0 app/controllers/workflows_controller.php
  53. +24 −0 app/index.php
  54. 0  app/locale/eng/LC_MESSAGES/empty
  55. +152 −0 app/models/attachment.php
  56. +50 −0 app/models/auth_source.php
  57. +99 −0 app/models/auth_source_ldap.php
  58. 0  app/models/behaviors/empty
  59. +30 −0 app/models/board.php
  60. +27 −0 app/models/change.php
  61. +156 −0 app/models/changeset.php
  62. +24 −0 app/models/comment.php
  63. +76 −0 app/models/custom_field.php
  64. +56 −0 app/models/custom_value.php
  65. 0  app/models/datasources/empty
  66. +38 −0 app/models/document.php
  67. +24 −0 app/models/enabled_module.php
  68. +82 −0 app/models/enumeration.php
  69. +281 −0 app/models/issue.php
  70. +44 −0 app/models/issue_category.php
  71. +28 −0 app/models/issue_custom_field.php
  72. +80 −0 app/models/issue_relation.php
  73. +70 −0 app/models/issue_status.php
  74. +69 −0 app/models/journal.php
  75. +26 −0 app/models/journal_detail.php
  76. +193 −0 app/models/mail_handler.php
  77. +254 −0 app/models/mailer.php
  78. +43 −0 app/models/member.php
  79. +90 −0 app/models/message.php
  80. +31 −0 app/models/message_observer.php
  81. +22 −0 app/models/news.php
  82. +277 −0 app/models/project.php
  83. +23 −0 app/models/project_custom_field.php
  84. +407 −0 app/models/query.php
  85. +180 −0 app/models/repository.php
  86. +148 −0 app/models/role.php
  87. +165 −0 app/models/setting.php
  88. +80 −0 app/models/time_entry.php
  89. +24 −0 app/models/time_entry_custom_field.php
  90. +45 −0 app/models/token.php
  91. +57 −0 app/models/tracker.php
  92. +295 −0 app/models/user.php
  93. +24 −0 app/models/user_custom_field.php
  94. +55 −0 app/models/user_preference.php
  95. +108 −0 app/models/version.php
  96. +31 −0 app/models/watcher.php
  97. +74 −0 app/models/wiki.php
  98. +91 −0 app/models/wiki_content.php
  99. +189 −0 app/models/wiki_page.php
  100. +24 −0 app/models/wiki_redirect.php
  101. +44 −0 app/models/workflow.php
  102. 0  app/plugins/empty
  103. 0  app/tests/cases/behaviors/empty
  104. 0  app/tests/cases/components/empty
  105. 0  app/tests/cases/controllers/empty
  106. 0  app/tests/cases/helpers/empty
  107. 0  app/tests/cases/models/empty
  108. 0  app/tests/fixtures/empty
  109. 0  app/tests/groups/empty
  110. 0  app/tmp/cache/models/empty
  111. 0  app/tmp/cache/persistent/empty
  112. 0  app/tmp/cache/views/empty
  113. 0  app/tmp/logs/empty
  114. 0  app/tmp/sessions/empty
  115. 0  app/tmp/tests/empty
  116. 0  app/vendors/shells/tasks/empty
  117. 0  app/vendors/shells/templates/empty
  118. +34 −0 app/views/account/login.ctp
  119. +11 −0 app/views/account/lost_password.ctp
  120. +15 −0 app/views/account/password_recovery.ctp
  121. +39 −0 app/views/account/register.ctp
  122. +69 −0 app/views/account/show.ctp
  123. +25 −0 app/views/admin/_menu.ctp
  124. +8 −0 app/views/admin/_no_data.ctp
  125. +51 −0 app/views/admin/index.ctp
  126. +12 −0 app/views/admin/info.ctp
  127. +19 −0 app/views/admin/plugins.ctp
  128. +52 −0 app/views/admin/projects.ctp
  129. +9 −0 app/views/attachments/_form.ctp
  130. +18 −0 app/views/attachments/_links.ctp
  131. +15 −0 app/views/attachments/diff.ctp
  132. +15 −0 app/views/attachments/file.ctp
  133. +44 −0 app/views/auth_sources/_form.ctp
  134. +7 −0 app/views/auth_sources/edit.ctp
  135. +33 −0 app/views/auth_sources/list.ctp
  136. +6 −0 app/views/auth_sources/new.ctp
  137. +8 −0 app/views/boards/_form.ctp
  138. +6 −0 app/views/boards/edit.ctp
  139. +42 −0 app/views/boards/index.ctp
  140. +6 −0 app/views/boards/new.ctp
  141. +62 −0 app/views/boards/show.ctp
  142. +6 −0 app/views/common/403.ctp
  143. +6 −0 app/views/common/404.ctp
  144. +39 −0 app/views/common/_calendar.ctp
  145. +67 −0 app/views/common/_diff.ctp
  146. +11 −0 app/views/common/_file.ctp
  147. +3 −0  app/views/common/_preview.ctp
  148. +31 −0 app/views/common/feed.atom.rxml
  149. +113 −0 app/views/custom_fields/_form.ctp
  150. +6 −0 app/views/custom_fields/edit.ctp
  151. +58 −0 app/views/custom_fields/list.ctp
  152. +7 −0 app/views/custom_fields/new.ctp
  153. +3 −0  app/views/documents/_document.ctp
  154. +15 −0 app/views/documents/_form.ctp
  155. +8 −0 app/views/documents/edit.ctp
  156. +39 −0 app/views/documents/index.ctp
  157. +13 −0 app/views/documents/new.ctp
  158. +28 −0 app/views/documents/show.ctp
  159. +2 −0  app/views/elements/account_menu.ctp
  160. 0  app/views/elements/empty
  161. +5 −0 app/views/elements/top_menu.ctp
  162. +12 −0 app/views/enumerations/_form.ctp
  163. +12 −0 app/views/enumerations/destroy.ctp
  164. +10 −0 app/views/enumerations/edit.ctp
  165. +31 −0 app/views/enumerations/list.ctp
  166. +6 −0 app/views/enumerations/new.ctp
  167. 0  app/views/errors/empty
  168. +628 −0 app/views/helpers/candy.php
  169. 0  app/views/helpers/empty
  170. +6 −0 app/views/issue_categories/_form.ctp
  171. +15 −0 app/views/issue_categories/destroy.ctp
  172. +6 −0 app/views/issue_categories/edit.ctp
  173. +12 −0 app/views/issue_relations/_form.ctp
  174. +15 −0 app/views/issue_statuses/_form.ctp
  175. +6 −0 app/views/issue_statuses/edit.ctp
  176. +37 −0 app/views/issue_statuses/list.ctp
  177. +6 −0 app/views/issue_statuses/new.ctp
  178. +8 −0 app/views/issues/_changesets.ctp
  179. +55 −0 app/views/issues/_edit.ctp
  180. +63 −0 app/views/issues/_form.ctp
  181. +12 −0 app/views/issues/_form_custom_fields.ctp
  182. +10 −0 app/views/issues/_form_update.ctp
  183. +16 −0 app/views/issues/_history.ctp
  184. +22 −0 app/views/issues/_list.ctp
  185. +28 −0 app/views/issues/_list_simple.ctp
  186. +32 −0 app/views/issues/_relations.ctp
  187. +26 −0 app/views/issues/_sidebar.ctp
  188. +51 −0 app/views/issues/bulk_edit.ctp
  189. +55 −0 app/views/issues/calendar.ctp
  190. +30 −0 app/views/issues/changes.rxml
  191. +90 −0 app/views/issues/context_menu.ctp
  192. +15 −0 app/views/issues/destroy.ctp
  193. +3 −0  app/views/issues/edit.ctp
  194. +257 −0 app/views/issues/gantt.ctp
  195. +67 −0 app/views/issues/index.ctp
  196. +22 −0 app/views/issues/move.ctp
  197. +26 −0 app/views/issues/new.ctp
  198. +126 −0 app/views/issues/show.ctp
  199. +8 −0 app/views/journals/_notes_form.ctp
  200. +3 −0  app/views/journals/edit.rjs
  201. +10 −0 app/views/journals/update.rjs
  202. +12 −0 app/views/layouts/_project_selector.ctp
  203. +77 −0 app/views/layouts/base.ctp
  204. 0  app/views/layouts/js/empty
  205. 0  app/views/layouts/rss/empty
  206. 0  app/views/layouts/xml/empty
  207. +15 −0 app/views/mailer/_issue_text_html.ctp
  208. +13 −0 app/views/mailer/_issue_text_plain.ctp
  209. +2 −0  app/views/mailer/account_activation_request.text.html.ctp
  210. +2 −0  app/views/mailer/account_activation_request.text.plain.ctp
  211. +11 −0 app/views/mailer/account_information.text.html.ctp
  212. +6 −0 app/views/mailer/account_information.text.plain.ctp
  213. +5 −0 app/views/mailer/attachments_added.text.html.ctp
  214. +4 −0 app/views/mailer/attachments_added.text.plain.ctp
  215. +3 −0  app/views/mailer/document_added.text.html.ctp
  216. +4 −0 app/views/mailer/document_added.text.plain.ctp
  217. +3 −0  app/views/mailer/issue_add.text.html.ctp
  218. +4 −0 app/views/mailer/issue_add.text.plain.ctp
  219. +11 −0 app/views/mailer/issue_edit.text.html.ctp
  220. +9 −0 app/views/mailer/issue_edit.text.plain.ctp
  221. +32 −0 app/views/mailer/layout.text.html.ctp
  222. +3 −0  app/views/mailer/layout.text.plain.ctp
  223. +4 −0 app/views/mailer/lost_password.text.html.ctp
  224. +4 −0 app/views/mailer/lost_password.text.plain.ctp
  225. +4 −0 app/views/mailer/message_posted.text.html.ctp
  226. +4 −0 app/views/mailer/message_posted.text.plain.ctp
  227. +4 −0 app/views/mailer/news_added.text.html.ctp
  228. +5 −0 app/views/mailer/news_added.text.plain.ctp
  229. +2 −0  app/views/mailer/register.text.html.ctp
  230. +2 −0  app/views/mailer/register.text.plain.ctp
  231. +9 −0 app/views/mailer/reminder.text.html.ctp
  232. +7 −0 app/views/mailer/reminder.text.plain.ctp
  233. +2 −0  app/views/mailer/test.text.html.ctp
  234. +2 −0  app/views/mailer/test.text.plain.ctp
  235. +21 −0 app/views/messages/_form.ctp
  236. +14 −0 app/views/messages/edit.ctp
  237. +15 −0 app/views/messages/new.ctp
  238. +61 −0 app/views/messages/show.ctp
  239. +14 −0 app/views/my/_block.ctp
  240. +8 −0 app/views/my/_sidebar.ctp
  241. +52 −0 app/views/my/account.ctp
  242. +8 −0 app/views/my/blocks/_calendar.ctp
  243. +9 −0 app/views/my/blocks/_documents.ctp
  244. +17 −0 app/views/my/blocks/_issuesassignedtome.ctp
  245. +17 −0 app/views/my/blocks/_issuesreportedbyme.ctp
  246. +10 −0 app/views/my/blocks/_issueswatched.ctp
  247. +8 −0 app/views/my/blocks/_news.ctp
  248. +52 −0 app/views/my/blocks/_timelog.ctp
  249. +42 −0 app/views/my/page.ctp
  250. +107 −0 app/views/my/page_layout.ctp
  251. +22 −0 app/views/my/password.ctp
  252. +8 −0 app/views/news/_form.ctp
  253. +6 −0 app/views/news/_news.ctp
  254. +14 −0 app/views/news/edit.ctp
  255. +51 −0 app/views/news/index.ctp
  256. +14 −0 app/views/news/new.ctp
  257. +61 −0 app/views/news/show.ctp
  258. +4 −0 app/views/projects/_edit.ctp
  259. +49 −0 app/views/projects/_form.ctp
  260. +60 −0 app/views/projects/activity.ctp
  261. +16 −0 app/views/projects/add.ctp
  262. +16 −0 app/views/projects/add_file.ctp
  263. +6 −0 app/views/projects/add_issue_category.ctp
  264. +6 −0 app/views/projects/add_version.ctp
  265. +42 −0 app/views/projects/changelog.ctp
  266. +16 −0 app/views/projects/destroy.ctp
  267. +31 −0 app/views/projects/index.ctp
  268. +42 −0 app/views/projects/list_files.ctp
  269. +13 −0 app/views/projects/list_members.ctp
  270. +50 −0 app/views/projects/roadmap.ctp
  271. +24 −0 app/views/projects/settings.ctp
  272. +28 −0 app/views/projects/settings/_boards.ctp
  273. +26 −0 app/views/projects/settings/_issue_categories.ctp
  274. +50 −0 app/views/projects/settings/_members.ctp
  275. +17 −0 app/views/projects/settings/_modules.ctp
  276. +24 −0 app/views/projects/settings/_repository.ctp
  277. +28 −0 app/views/projects/settings/_versions.ctp
  278. +19 −0 app/views/projects/settings/_wiki.ctp
  279. +80 −0 app/views/projects/show.ctp
  280. +27 −0 app/views/queries/_columns.ctp
  281. +101 −0 app/views/queries/_filters.ctp
  282. +29 −0 app/views/queries/_form.ctp
  283. +6 −0 app/views/queries/edit.ctp
  284. +27 −0 app/views/queries/index.ctp
  285. +6 −0 app/views/queries/new.ctp
  286. +48 −0 app/views/reports/_details.ctp
  287. +37 −0 app/views/reports/_simple.ctp
  288. +31 −0 app/views/reports/issue_report.ctp
  289. +7 −0 app/views/reports/issue_report_details.ctp
  290. +15 −0 app/views/repositories/_dir_list.ctp
  291. +24 −0 app/views/repositories/_dir_list_content.ctp
  292. +10 −0 app/views/repositories/_link_to_functions.ctp
  293. +21 −0 app/views/repositories/_navigation.ctp
  294. +28 −0 app/views/repositories/_revisions.ctp
  295. +30 −0 app/views/repositories/annotate.ctp
  296. +14 −0 app/views/repositories/browse.ctp
  297. +10 −0 app/views/repositories/changes.ctp
  298. +34 −0 app/views/repositories/committers.ctp
  299. +27 −0 app/views/repositories/diff.ctp
  300. +9 −0 app/views/repositories/entry.ctp
Sorry, we could not display the entire diff because too many files (568) changed.
5 app/.htaccess
View
@@ -0,0 +1,5 @@
+<IfModule mod_rewrite.c>
+ RewriteEngine on
+ RewriteRule ^$ webroot/ [L]
+ RewriteRule (.*) webroot/$1 [L]
+ </IfModule>
74 app/config/acl.ini.php
View
@@ -0,0 +1,74 @@
+;<?php die() ?>
+; SVN FILE: $Id: acl.ini.php 7945 2008-12-19 02:16:01Z gwoo $
+;/**
+; * Short description for file.
+; *
+; *
+; * PHP versions 4 and 5
+; *
+; * CakePHP(tm) : Rapid Development Framework http://www.cakephp.org/
+; * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+; *
+; * Licensed under The MIT License
+; * Redistributions of files must retain the above copyright notice.
+; *
+; * @filesource
+; * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+; * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
+; * @package cake
+; * @subpackage cake.app.config
+; * @since CakePHP(tm) v 0.10.0.1076
+; * @version $Revision: 7945 $
+; * @modifiedby $LastChangedBy: gwoo $
+; * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
+; * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+; */
+
+; acl.ini.php - Cake ACL Configuration
+; ---------------------------------------------------------------------
+; Use this file to specify user permissions.
+; aco = access control object (something in your application)
+; aro = access request object (something requesting access)
+;
+; User records are added as follows:
+;
+; [uid]
+; groups = group1, group2, group3
+; allow = aco1, aco2, aco3
+; deny = aco4, aco5, aco6
+;
+; Group records are added in a similar manner:
+;
+; [gid]
+; allow = aco1, aco2, aco3
+; deny = aco4, aco5, aco6
+;
+; The allow, deny, and groups sections are all optional.
+; NOTE: groups names *cannot* ever be the same as usernames!
+;
+; ACL permissions are checked in the following order:
+; 1. Check for user denies (and DENY if specified)
+; 2. Check for user allows (and ALLOW if specified)
+; 3. Gather user's groups
+; 4. Check group denies (and DENY if specified)
+; 5. Check group allows (and ALLOW if specified)
+; 6. If no aro, aco, or group information is found, DENY
+;
+; ---------------------------------------------------------------------
+
+;-------------------------------------
+;Users
+;-------------------------------------
+
+[username-goes-here]
+groups = group1, group2
+deny = aco1, aco2
+allow = aco3, aco4
+
+;-------------------------------------
+;Groups
+;-------------------------------------
+
+[groupname-goes-here]
+deny = aco5, aco6
+allow = aco7, aco8
45 app/config/bootstrap.php
View
@@ -0,0 +1,45 @@
+<?php
+/* SVN FILE: $Id: bootstrap.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ * Short description for file.
+ *
+ * Long description for file
+ *
+ * PHP versions 4 and 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
+ * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @filesource
+ * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
+ * @package cake
+ * @subpackage cake.app.config
+ * @since CakePHP(tm) v 0.10.8.2117
+ * @version $Revision: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+/**
+ *
+ * This file is loaded automatically by the app/webroot/index.php file after the core bootstrap.php is loaded
+ * This is an application wide file to load any function that is not used within a class define.
+ * You can also use this to include or require any files in your application.
+ *
+ */
+/**
+ * The settings below can be used to set additional paths to models, views and controllers.
+ * This is related to Ticket #470 (https://trac.cakephp.org/ticket/470)
+ *
+ * $modelPaths = array('full path to models', 'second full path to models', 'etc...');
+ * $viewPaths = array('this path to views', 'second full path to views', 'etc...');
+ * $controllerPaths = array('this path to controllers', 'second full path to controllers', 'etc...');
+ *
+ */
+//EOF
+Configure::write('app_title', 'Candycane');
+?>
227 app/config/core.php
View
@@ -0,0 +1,227 @@
+<?php
+/* SVN FILE: $Id: core.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ * This is core configuration file.
+ *
+ * Use it to configure core behavior of Cake.
+ *
+ * PHP versions 4 and 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
+ * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @filesource
+ * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
+ * @package cake
+ * @subpackage cake.app.config
+ * @since CakePHP(tm) v 0.2.9
+ * @version $Revision: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+/**
+ * CakePHP Debug Level:
+ *
+ * Production Mode:
+ * 0: No error messages, errors, or warnings shown. Flash messages redirect.
+ *
+ * Development Mode:
+ * 1: Errors and warnings shown, model caches refreshed, flash messages halted.
+ * 2: As in 1, but also with full debug messages and SQL output.
+ * 3: As in 2, but also with full controller dump.
+ *
+ * In production mode, flash messages redirect after a time interval.
+ * In development mode, you need to click the flash message to continue.
+ */
+ Configure::write('debug', 2);
+/**
+ * Application wide charset encoding
+ */
+ Configure::write('App.encoding', 'UTF-8');
+/**
+ * To configure CakePHP *not* to use mod_rewrite and to
+ * use CakePHP pretty URLs, remove these .htaccess
+ * files:
+ *
+ * /.htaccess
+ * /app/.htaccess
+ * /app/webroot/.htaccess
+ *
+ * And uncomment the App.baseUrl below:
+ */
+ //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
+/**
+ * Uncomment the define below to use CakePHP admin routes.
+ *
+ * The value of the define determines the name of the route
+ * and its associated controller actions:
+ *
+ * 'admin' -> admin_index() and /admin/controller/index
+ * 'superuser' -> superuser_index() and /superuser/controller/index
+ */
+ //Configure::write('Routing.admin', 'admin');
+
+/**
+ * Turn off all caching application-wide.
+ *
+ */
+ //Configure::write('Cache.disable', true);
+/**
+ * Enable cache checking.
+ *
+ * If set to true, for view caching you must still use the controller
+ * var $cacheAction inside your controllers to define caching settings.
+ * You can either set it controller-wide by setting var $cacheAction = true,
+ * or in each action using $this->cacheAction = true.
+ *
+ */
+ //Configure::write('Cache.check', true);
+/**
+ * Defines the default error type when using the log() function. Used for
+ * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
+ */
+ define('LOG_ERROR', 2);
+/**
+ * The preferred session handling method. Valid values:
+ *
+ * 'php' Uses settings defined in your php.ini.
+ * 'cake' Saves session files in CakePHP's /tmp directory.
+ * 'database' Uses CakePHP's database sessions.
+ *
+ * To define a custom session handler, save it at /app/config/<name>.php.
+ * Set the value of 'Session.save' to <name> to utilize it in CakePHP.
+ *
+ * To use database sessions, execute the SQL file found at /app/config/sql/sessions.sql.
+ *
+ */
+ Configure::write('Session.save', 'php');
+/**
+ * The name of the table used to store CakePHP database sessions.
+ *
+ * 'Session.save' must be set to 'database' in order to utilize this constant.
+ *
+ * The table name set here should *not* include any table prefix defined elsewhere.
+ */
+ //Configure::write('Session.table', 'cake_sessions');
+/**
+ * The DATABASE_CONFIG::$var to use for database session handling.
+ *
+ * 'Session.save' must be set to 'database' in order to utilize this constant.
+ */
+ //Configure::write('Session.database', 'default');
+/**
+ * The name of CakePHP's session cookie.
+ */
+ Configure::write('Session.cookie', 'CAKEPHP');
+/**
+ * Session time out time (in seconds).
+ * Actual value depends on 'Security.level' setting.
+ */
+ Configure::write('Session.timeout', '120');
+/**
+ * If set to false, sessions are not automatically started.
+ */
+ Configure::write('Session.start', true);
+/**
+ * When set to false, HTTP_USER_AGENT will not be checked
+ * in the session
+ */
+ Configure::write('Session.checkAgent', true);
+/**
+ * The level of CakePHP security. The session timeout time defined
+ * in 'Session.timeout' is multiplied according to the settings here.
+ * Valid values:
+ *
+ * 'high' Session timeout in 'Session.timeout' x 10
+ * 'medium' Session timeout in 'Session.timeout' x 100
+ * 'low' Session timeout in 'Session.timeout' x 300
+ *
+ * CakePHP session IDs are also regenerated between requests if
+ * 'Security.level' is set to 'high'.
+ */
+ Configure::write('Security.level', 'high');
+/**
+ * A random string used in security hashing methods.
+ */
+ Configure::write('Security.salt', 'DYhG93b0qyJfIxfs2guoUubWwvniR2G0FgaC9mi');
+/**
+ * Compress CSS output by removing comments, whitespace, repeating tags, etc.
+ * This requires a/var/cache directory to be writable by the web server for caching.
+ * and /vendors/csspp/csspp.php
+ *
+ * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css().
+ */
+ //Configure::write('Asset.filter.css', 'css.php');
+/**
+ * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the
+ * output, and setting the config below to the name of the script.
+ *
+ * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link().
+ */
+ //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php');
+/**
+ * The classname and database used in CakePHP's
+ * access control lists.
+ */
+ Configure::write('Acl.classname', 'DbAcl');
+ Configure::write('Acl.database', 'default');
+/**
+ *
+ * Cache Engine Configuration
+ * Default settings provided below
+ *
+ * File storage engine.
+ *
+ * Cache::config('default', array(
+ * 'engine' => 'File', //[required]
+ * 'duration'=> 3600, //[optional]
+ * 'probability'=> 100, //[optional]
+ * 'path' => CACHE, //[optional] use system tmp directory - remember to use absolute path
+ * 'prefix' => 'cake_', //[optional] prefix every cache file with this string
+ * 'lock' => false, //[optional] use file locking
+ * 'serialize' => true, [optional]
+ * ));
+ *
+ *
+ * APC (http://pecl.php.net/package/APC)
+ *
+ * Cache::config('default', array(
+ * 'engine' => 'Apc', //[required]
+ * 'duration'=> 3600, //[optional]
+ * 'probability'=> 100, //[optional]
+ * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
+ * ));
+ *
+ * Xcache (http://xcache.lighttpd.net/)
+ *
+ * Cache::config('default', array(
+ * 'engine' => 'Xcache', //[required]
+ * 'duration'=> 3600, //[optional]
+ * 'probability'=> 100, //[optional]
+ * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
+ * 'user' => 'user', //user from xcache.admin.user settings
+ * 'password' => 'password', //plaintext password (xcache.admin.pass)
+ * ));
+ *
+ *
+ * Memcache (http://www.danga.com/memcached/)
+ *
+ * Cache::config('default', array(
+ * 'engine' => 'Memcache', //[required]
+ * 'duration'=> 3600, //[optional]
+ * 'probability'=> 100, //[optional]
+ * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
+ * 'servers' => array(
+ * '127.0.0.1:11211' // localhost, default port 11211
+ * ), //[optional]
+ * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory)
+ * ));
+ *
+ */
+ Cache::config('default', array('engine' => 'File'));
+?>
101 app/config/database.php
View
@@ -0,0 +1,101 @@
+<?php
+/* SVN FILE: $Id: database.php.default 8004 2009-01-16 20:15:21Z gwoo $ */
+/**
+ * This is core configuration file.
+ *
+ * Use it to configure core behaviour ofCake.
+ *
+ * PHP versions 4 and 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
+ * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @filesource
+ * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
+ * @package cake
+ * @subpackage cake.app.config
+ * @since CakePHP(tm) v 0.2.9
+ * @version $Revision: 8004 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2009-01-16 12:15:21 -0800 (Fri, 16 Jan 2009) $
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+/**
+ * In this file you set up your database connection details.
+ *
+ * @package cake
+ * @subpackage cake.config
+ */
+/**
+ * Database configuration class.
+ * You can specify multiple configurations for production, development and testing.
+ *
+ * driver => The name of a supported driver; valid options are as follows:
+ * mysql - MySQL 4 & 5,
+ * mysqli - MySQL 4 & 5 Improved Interface (PHP5 only),
+ * sqlite - SQLite (PHP5 only),
+ * postgres - PostgreSQL 7 and higher,
+ * mssql - Microsoft SQL Server 2000 and higher,
+ * db2 - IBM DB2, Cloudscape, and Apache Derby (http://php.net/ibm-db2)
+ * oracle - Oracle 8 and higher
+ * firebird - Firebird/Interbase
+ * sybase - Sybase ASE
+ * adodb-[drivername] - ADOdb interface wrapper (see below),
+ * odbc - ODBC DBO driver
+ *
+ * You can add custom database drivers (or override existing drivers) by adding the
+ * appropriate file to app/models/datasources/dbo. Drivers should be named 'dbo_x.php',
+ * where 'x' is the name of the database.
+ *
+ * persistent => true / false
+ * Determines whether or not the database should use a persistent connection
+ *
+ * connect =>
+ * ADOdb set the connect to one of these
+ * (http://phplens.com/adodb/supported.databases.html) and
+ * append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent)
+ * For all other databases, this setting is deprecated.
+ *
+ * host =>
+ * the host you connect to the database. To add a socket or port number, use 'port' => #
+ *
+ * prefix =>
+ * Uses the given prefix for all the tables in this database. This setting can be overridden
+ * on a per-table basis with the Model::$tablePrefix property.
+ *
+ * schema =>
+ * For Postgres and DB2, specifies which schema you would like to use the tables in. Postgres defaults to
+ * 'public', DB2 defaults to empty.
+ *
+ * encoding =>
+ * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding to use when connecting to the
+ * database. Uses database default.
+ *
+ */
+class DATABASE_CONFIG {
+
+ var $default = array(
+ 'driver' => 'mysql',
+ 'persistent' => false,
+ 'host' => 'localhost',
+ 'login' => 'root',
+ 'password' => '',
+ 'database' => 'redmine_development',
+ 'prefix' => '',
+ );
+
+ var $test = array(
+ 'driver' => 'mysql',
+ 'persistent' => false,
+ 'host' => 'localhost',
+ 'login' => 'user',
+ 'password' => 'password',
+ 'database' => 'test_database_name',
+ 'prefix' => '',
+ );
+}
+?>
101 app/config/database.php.default
View
@@ -0,0 +1,101 @@
+<?php
+/* SVN FILE: $Id: database.php.default 8004 2009-01-16 20:15:21Z gwoo $ */
+/**
+ * This is core configuration file.
+ *
+ * Use it to configure core behaviour ofCake.
+ *
+ * PHP versions 4 and 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
+ * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @filesource
+ * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
+ * @package cake
+ * @subpackage cake.app.config
+ * @since CakePHP(tm) v 0.2.9
+ * @version $Revision: 8004 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2009-01-16 12:15:21 -0800 (Fri, 16 Jan 2009) $
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+/**
+ * In this file you set up your database connection details.
+ *
+ * @package cake
+ * @subpackage cake.config
+ */
+/**
+ * Database configuration class.
+ * You can specify multiple configurations for production, development and testing.
+ *
+ * driver => The name of a supported driver; valid options are as follows:
+ * mysql - MySQL 4 & 5,
+ * mysqli - MySQL 4 & 5 Improved Interface (PHP5 only),
+ * sqlite - SQLite (PHP5 only),
+ * postgres - PostgreSQL 7 and higher,
+ * mssql - Microsoft SQL Server 2000 and higher,
+ * db2 - IBM DB2, Cloudscape, and Apache Derby (http://php.net/ibm-db2)
+ * oracle - Oracle 8 and higher
+ * firebird - Firebird/Interbase
+ * sybase - Sybase ASE
+ * adodb-[drivername] - ADOdb interface wrapper (see below),
+ * odbc - ODBC DBO driver
+ *
+ * You can add custom database drivers (or override existing drivers) by adding the
+ * appropriate file to app/models/datasources/dbo. Drivers should be named 'dbo_x.php',
+ * where 'x' is the name of the database.
+ *
+ * persistent => true / false
+ * Determines whether or not the database should use a persistent connection
+ *
+ * connect =>
+ * ADOdb set the connect to one of these
+ * (http://phplens.com/adodb/supported.databases.html) and
+ * append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent)
+ * For all other databases, this setting is deprecated.
+ *
+ * host =>
+ * the host you connect to the database. To add a socket or port number, use 'port' => #
+ *
+ * prefix =>
+ * Uses the given prefix for all the tables in this database. This setting can be overridden
+ * on a per-table basis with the Model::$tablePrefix property.
+ *
+ * schema =>
+ * For Postgres and DB2, specifies which schema you would like to use the tables in. Postgres defaults to
+ * 'public', DB2 defaults to empty.
+ *
+ * encoding =>
+ * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding to use when connecting to the
+ * database. Uses database default.
+ *
+ */
+class DATABASE_CONFIG {
+
+ var $default = array(
+ 'driver' => 'mysql',
+ 'persistent' => false,
+ 'host' => 'localhost',
+ 'login' => 'user',
+ 'password' => 'password',
+ 'database' => 'database_name',
+ 'prefix' => '',
+ );
+
+ var $test = array(
+ 'driver' => 'mysql',
+ 'persistent' => false,
+ 'host' => 'localhost',
+ 'login' => 'user',
+ 'password' => 'password',
+ 'database' => 'test_database_name',
+ 'prefix' => '',
+ );
+}
+?>
70 app/config/inflections.php
View
@@ -0,0 +1,70 @@
+<?php
+/* SVN FILE: $Id: inflections.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ * Custom Inflected Words.
+ *
+ * This file is used to hold words that are not matched in the normail Inflector::pluralize() and
+ * Inflector::singularize()
+ *
+ * PHP versions 4 and %
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
+ * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @filesource
+ * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
+ * @package cake
+ * @subpackage cake.app.config
+ * @since CakePHP(tm) v 1.0.0.2312
+ * @version $Revision: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+/**
+ * This is a key => value array of regex used to match words.
+ * If key matches then the value is returned.
+ *
+ * $pluralRules = array('/(s)tatus$/i' => '\1\2tatuses', '/^(ox)$/i' => '\1\2en', '/([m|l])ouse$/i' => '\1ice');
+ */
+ $pluralRules = array();
+/**
+ * This is a key only array of plural words that should not be inflected.
+ * Notice the last comma
+ *
+ * $uninflectedPlural = array('.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox');
+ */
+ $uninflectedPlural = array();
+/**
+ * This is a key => value array of plural irregular words.
+ * If key matches then the value is returned.
+ *
+ * $irregularPlural = array('atlas' => 'atlases', 'beef' => 'beefs', 'brother' => 'brothers')
+ */
+ $irregularPlural = array();
+/**
+ * This is a key => value array of regex used to match words.
+ * If key matches then the value is returned.
+ *
+ * $singularRules = array('/(s)tatuses$/i' => '\1\2tatus', '/(matr)ices$/i' =>'\1ix','/(vert|ind)ices$/i')
+ */
+ $singularRules = array();
+/**
+ * This is a key only array of singular words that should not be inflected.
+ * You should not have to change this value below if you do change it use same format
+ * as the $uninflectedPlural above.
+ */
+ $uninflectedSingular = $uninflectedPlural;
+/**
+ * This is a key => value array of singular irregular words.
+ * Most of the time this will be a reverse of the above $irregularPlural array
+ * You should not have to change this value below if you do change it use same format
+ *
+ * $irregularSingular = array('atlases' => 'atlas', 'beefs' => 'beef', 'brothers' => 'brother')
+ */
+ $irregularSingular = array_flip($irregularPlural);
+?>
39 app/config/routes.php
View
@@ -0,0 +1,39 @@
+<?php
+/* SVN FILE: $Id: routes.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/**
+ * Short description for file.
+ *
+ * In this file, you set up routes to your controllers and their actions.
+ * Routes are very important mechanism that allows you to freely connect
+ * different urls to chosen controllers and their actions (functions).
+ *
+ * PHP versions 4 and 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
+ * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @filesource
+ * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
+ * @package cake
+ * @subpackage cake.app.config
+ * @since CakePHP(tm) v 0.2.9
+ * @version $Revision: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+/**
+ * Here, we are connecting '/' (base path) to controller called 'Pages',
+ * its action called 'display', and we pass a param to select the view file
+ * to use (in this case, /app/views/pages/home.ctp)...
+ */
+ Router::connect('/', array('controller' => 'welcome', 'action' => 'index'));
+/**
+ * ...and connect the rest of 'Pages' controller's urls.
+ */
+ Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
+?>
79 app/config/sql/db_acl.php
View
@@ -0,0 +1,79 @@
+<?php
+/* SVN FILE: $Id: db_acl.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/*DbAcl schema generated on: 2007-11-24 15:11:13 : 1195945453*/
+/**
+ * This is Acl Schema file
+ *
+ * Use it to configure database for ACL
+ *
+ * PHP versions 4 and 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
+ * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @filesource
+ * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
+ * @package cake
+ * @subpackage cake.app.config.sql
+ * @since CakePHP(tm) v 0.2.9
+ * @version $Revision: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+/*
+ *
+ * Using the Schema command line utility
+ * cake schema run create DbAcl
+ *
+ */
+class DbAclSchema extends CakeSchema {
+
+ var $name = 'DbAcl';
+
+ function before($event = array()) {
+ return true;
+ }
+
+ function after($event = array()) {
+ }
+
+ var $acos = array(
+ 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
+ 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
+ 'model' => array('type'=>'string', 'null' => true),
+ 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
+ 'alias' => array('type'=>'string', 'null' => true),
+ 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
+ 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
+ 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
+ );
+
+ var $aros = array(
+ 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
+ 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
+ 'model' => array('type'=>'string', 'null' => true),
+ 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
+ 'alias' => array('type'=>'string', 'null' => true),
+ 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
+ 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10),
+ 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
+ );
+
+ var $aros_acos = array(
+ 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
+ 'aro_id' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
+ 'aco_id' => array('type'=>'integer', 'null' => false, 'length' => 10),
+ '_create' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2),
+ '_read' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2),
+ '_update' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2),
+ '_delete' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2),
+ 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1))
+ );
+
+}
+?>
40 app/config/sql/db_acl.sql
View
@@ -0,0 +1,40 @@
+# $Id: db_acl.sql 7945 2008-12-19 02:16:01Z gwoo $
+#
+# Copyright 2005-2008, Cake Software Foundation, Inc.
+#
+# Licensed under The MIT License
+# Redistributions of files must retain the above copyright notice.
+# http://www.opensource.org/licenses/mit-license.php The MIT License
+
+CREATE TABLE acos (
+ id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+ parent_id INTEGER(10) DEFAULT NULL,
+ model VARCHAR(255) DEFAULT '',
+ foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
+ alias VARCHAR(255) DEFAULT '',
+ lft INTEGER(10) DEFAULT NULL,
+ rght INTEGER(10) DEFAULT NULL,
+ PRIMARY KEY (id)
+);
+
+CREATE TABLE aros_acos (
+ id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+ aro_id INTEGER(10) UNSIGNED NOT NULL,
+ aco_id INTEGER(10) UNSIGNED NOT NULL,
+ _create CHAR(2) NOT NULL DEFAULT 0,
+ _read CHAR(2) NOT NULL DEFAULT 0,
+ _update CHAR(2) NOT NULL DEFAULT 0,
+ _delete CHAR(2) NOT NULL DEFAULT 0,
+ PRIMARY KEY(id)
+);
+
+CREATE TABLE aros (
+ id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
+ parent_id INTEGER(10) DEFAULT NULL,
+ model VARCHAR(255) DEFAULT '',
+ foreign_key INTEGER(10) UNSIGNED DEFAULT NULL,
+ alias VARCHAR(255) DEFAULT '',
+ lft INTEGER(10) DEFAULT NULL,
+ rght INTEGER(10) DEFAULT NULL,
+ PRIMARY KEY (id)
+);
56 app/config/sql/i18n.php
View
@@ -0,0 +1,56 @@
+<?php
+/* SVN FILE: $Id: i18n.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/*i18n schema generated on: 2007-11-25 07:11:25 : 1196004805*/
+/**
+ * This is i18n Schema file
+ *
+ * Use it to configure database for i18n
+ *
+ * PHP versions 4 and 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
+ * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @filesource
+ * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
+ * @package cake
+ * @subpackage cake.app.config.sql
+ * @since CakePHP(tm) v 0.2.9
+ * @version $Revision: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+/*
+ *
+ * Using the Schema command line utility
+ * cake schema run create i18n
+ *
+ */
+class i18nSchema extends CakeSchema {
+
+ var $name = 'i18n';
+
+ function before($event = array()) {
+ return true;
+ }
+
+ function after($event = array()) {
+ }
+
+ var $i18n = array(
+ 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'),
+ 'locale' => array('type'=>'string', 'null' => false, 'length' => 6, 'key' => 'index'),
+ 'model' => array('type'=>'string', 'null' => false, 'key' => 'index'),
+ 'foreign_key' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
+ 'field' => array('type'=>'string', 'null' => false, 'key' => 'index'),
+ 'content' => array('type'=>'text', 'null' => true, 'default' => NULL),
+ 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0))
+ );
+
+}
+?>
26 app/config/sql/i18n.sql
View
@@ -0,0 +1,26 @@
+# $Id: i18n.sql 7945 2008-12-19 02:16:01Z gwoo $
+#
+# Copyright 2005-2008, Cake Software Foundation, Inc.
+#
+# Licensed under The MIT License
+# Redistributions of files must retain the above copyright notice.
+# http://www.opensource.org/licenses/mit-license.php The MIT License
+
+CREATE TABLE i18n (
+ id int(10) NOT NULL auto_increment,
+ locale varchar(6) NOT NULL,
+ model varchar(255) NOT NULL,
+ foreign_key int(10) NOT NULL,
+ field varchar(255) NOT NULL,
+ content mediumtext,
+ PRIMARY KEY (id),
+# UNIQUE INDEX I18N_LOCALE_FIELD(locale, model, foreign_key, field),
+# INDEX I18N_LOCALE_ROW(locale, model, foreign_key),
+# INDEX I18N_LOCALE_MODEL(locale, model),
+# INDEX I18N_FIELD(model, foreign_key, field),
+# INDEX I18N_ROW(model, foreign_key),
+ INDEX locale (locale),
+ INDEX model (model),
+ INDEX row_id (foreign_key),
+ INDEX field (field)
+);
53 app/config/sql/sessions.php
View
@@ -0,0 +1,53 @@
+<?php
+/* SVN FILE: $Id: sessions.php 7945 2008-12-19 02:16:01Z gwoo $ */
+/*Sessions schema generated on: 2007-11-25 07:11:54 : 1196004714*/
+/**
+ * This is Sessions Schema file
+ *
+ * Use it to configure database for Sessions
+ *
+ * PHP versions 4 and 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
+ * Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @filesource
+ * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
+ * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
+ * @package cake
+ * @subpackage cake.app.config.sql
+ * @since CakePHP(tm) v 0.2.9
+ * @version $Revision: 7945 $
+ * @modifiedby $LastChangedBy: gwoo $
+ * @lastmodified $Date: 2008-12-18 18:16:01 -0800 (Thu, 18 Dec 2008) $
+ * @license http://www.opensource.org/licenses/mit-license.php The MIT License
+ */
+/*
+ *
+ * Using the Schema command line utility
+ * cake schema run create Sessions
+ *
+ */
+class SessionsSchema extends CakeSchema {
+
+ var $name = 'Sessions';
+
+ function before($event = array()) {
+ return true;
+ }
+
+ function after($event = array()) {
+ }
+
+ var $cake_sessions = array(
+ 'id' => array('type'=>'string', 'null' => false, 'key' => 'primary'),
+ 'data' => array('type'=>'text', 'null' => true, 'default' => NULL),
+ 'expires' => array('type'=>'integer', 'null' => true, 'default' => NULL),
+ 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
+ );
+
+}
+?>
16 app/config/sql/sessions.sql
View
@@ -0,0 +1,16 @@
+# $Id: sessions.sql 7118 2008-06-04 20:49:29Z gwoo $
+#
+# Copyright 2005-2008, Cake Software Foundation, Inc.
+# 1785 E. Sahara Avenue, Suite 490-204
+# Las Vegas, Nevada 89104
+#
+# Licensed under The MIT License
+# Redistributions of files must retain the above copyright notice.
+# http://www.opensource.org/licenses/mit-license.php The MIT License
+
+CREATE TABLE cake_sessions (
+ id varchar(255) NOT NULL default '',
+ data text,
+ expires int(11) default NULL,
+ PRIMARY KEY (id)
+);
195 app/controllers/account_controller.php
View
@@ -0,0 +1,195 @@
+<?php
+## Redmine - project management software
+## Copyright (C) 2006-2008 Jean-Philippe Lang
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License
+## as published by the Free Software Foundation; either version 2
+## of the License, or (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+#class AccountController < ApplicationController
+# helper :custom_fields
+# include CustomFieldsHelper
+#
+# # prevents login action to be filtered by check_if_login_required application scope filter
+# skip_before_filter :check_if_login_required, :only => [:login, :lost_password, :register, :activate]
+#
+# # Show user's account
+# def show
+# @user = User.active.find(params[:id])
+# @custom_values = @user.custom_values
+#
+# # show only public projects and private projects that the logged in user is also a member of
+# @memberships = @user.memberships.select do |membership|
+# membership.project.is_public? || (User.current.member_of?(membership.project))
+# end
+#
+# events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)
+# @events_by_day = events.group_by(&:event_date)
+#
+# rescue ActiveRecord::RecordNotFound
+# render_404
+# end
+#
+# # Login request and validation
+# def login
+# if request.get?
+# # Logout user
+# self.logged_user = nil
+# else
+# # Authenticate user
+# user = User.try_to_login(params[:username], params[:password])
+# if user.nil?
+# # Invalid credentials
+# flash.now[:error] = l(:notice_account_invalid_creditentials)
+# elsif user.new_record?
+# # Onthefly creation failed, display the registration form to fill/fix attributes
+# @user = user
+# session[:auth_source_registration] = {:login => user.login, :auth_source_id => user.auth_source_id }
+# render :action => 'register'
+# else
+# # Valid user
+# self.logged_user = user
+# # generate a key and set cookie if autologin
+# if params[:autologin] && Setting.autologin?
+# token = Token.create(:user => user, :action => 'autologin')
+# cookies[:autologin] = { :value => token.value, :expires => 1.year.from_now }
+# end
+# redirect_back_or_default :controller => 'my', :action => 'page'
+# end
+# end
+# end
+#
+# # Log out current user and redirect to welcome page
+# def logout
+# cookies.delete :autologin
+# Token.delete_all(["user_id = ? AND action = ?", User.current.id, 'autologin']) if User.current.logged?
+# self.logged_user = nil
+# redirect_to home_url
+# end
+#
+# # Enable user to choose a new password
+# def lost_password
+# redirect_to(home_url) && return unless Setting.lost_password?
+# if params[:token]
+# @token = Token.find_by_action_and_value("recovery", params[:token])
+# redirect_to(home_url) && return unless @token and !@token.expired?
+# @user = @token.user
+# if request.post?
+# @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation]
+# if @user.save
+# @token.destroy
+# flash[:notice] = l(:notice_account_password_updated)
+# redirect_to :action => 'login'
+# return
+# end
+# end
+# render :template => "account/password_recovery"
+# return
+# else
+# if request.post?
+# user = User.find_by_mail(params[:mail])
+# # user not found in db
+# flash.now[:error] = l(:notice_account_unknown_email) and return unless user
+# # user uses an external authentification
+# flash.now[:error] = l(:notice_can_t_change_password) and return if user.auth_source_id
+# # create a new token for password recovery
+# token = Token.new(:user => user, :action => "recovery")
+# if token.save
+# Mailer.deliver_lost_password(token)
+# flash[:notice] = l(:notice_account_lost_email_sent)
+# redirect_to :action => 'login'
+# return
+# end
+# end
+# end
+# end
+#
+# # User self-registration
+# def register
+# redirect_to(home_url) && return unless Setting.self_registration? || session[:auth_source_registration]
+# if request.get?
+# session[:auth_source_registration] = nil
+# @user = User.new(:language => Setting.default_language)
+# else
+# @user = User.new(params[:user])
+# @user.admin = false
+# @user.status = User::STATUS_REGISTERED
+# if session[:auth_source_registration]
+# @user.status = User::STATUS_ACTIVE
+# @user.login = session[:auth_source_registration][:login]
+# @user.auth_source_id = session[:auth_source_registration][:auth_source_id]
+# if @user.save
+# session[:auth_source_registration] = nil
+# self.logged_user = @user
+# flash[:notice] = l(:notice_account_activated)
+# redirect_to :controller => 'my', :action => 'account'
+# end
+# else
+# @user.login = params[:user][:login]
+# @user.password, @user.password_confirmation = params[:password], params[:password_confirmation]
+# case Setting.self_registration
+# when '1'
+# # Email activation
+# token = Token.new(:user => @user, :action => "register")
+# if @user.save and token.save
+# Mailer.deliver_register(token)
+# flash[:notice] = l(:notice_account_register_done)
+# redirect_to :action => 'login'
+# end
+# when '3'
+# # Automatic activation
+# @user.status = User::STATUS_ACTIVE
+# if @user.save
+# self.logged_user = @user
+# flash[:notice] = l(:notice_account_activated)
+# redirect_to :controller => 'my', :action => 'account'
+# end
+# else
+# # Manual activation by the administrator
+# if @user.save
+# # Sends an email to the administrators
+# Mailer.deliver_account_activation_request(@user)
+# flash[:notice] = l(:notice_account_pending)
+# redirect_to :action => 'login'
+# end
+# end
+# end
+# end
+# end
+#
+# # Token based account activation
+# def activate
+# redirect_to(home_url) && return unless Setting.self_registration? && params[:token]
+# token = Token.find_by_action_and_value('register', params[:token])
+# redirect_to(home_url) && return unless token and !token.expired?
+# user = token.user
+# redirect_to(home_url) && return unless user.status == User::STATUS_REGISTERED
+# user.status = User::STATUS_ACTIVE
+# if user.save
+# token.destroy
+# flash[:notice] = l(:notice_account_activated)
+# end
+# redirect_to :action => 'login'
+# end
+#
+#private
+# def logged_user=(user)
+# if user && user.is_a?(User)
+# User.current = user
+# session[:user_id] = user.id
+# else
+# User.current = User.anonymous
+# session[:user_id] = nil
+# end
+# end
+#end
94 app/controllers/admin_controller.php
View
@@ -0,0 +1,94 @@
+<?php
+## redMine - project management software
+## Copyright (C) 2006 Jean-Philippe Lang
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License
+## as published by the Free Software Foundation; either version 2
+## of the License, or (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+#class AdminController < ApplicationController
+# before_filter :require_admin
+#
+# helper :sort
+# include SortHelper
+#
+# def index
+# @no_configuration_data = Redmine::DefaultData::Loader::no_data?
+# end
+#
+# def projects
+# sort_init 'name', 'asc'
+# sort_update %w(name is_public created_on)
+#
+# @status = params[:status] ? params[:status].to_i : 1
+# c = ARCondition.new(@status == 0 ? "status <> 0" : ["status = ?", @status])
+#
+# unless params[:name].blank?
+# name = "%#{params[:name].strip.downcase}%"
+# c << ["LOWER(identifier) LIKE ? OR LOWER(name) LIKE ?", name, name]
+# end
+#
+# @project_count = Project.count(:conditions => c.conditions)
+# @project_pages = Paginator.new self, @project_count,
+# per_page_option,
+# params['page']
+# @projects = Project.find :all, :order => sort_clause,
+# :conditions => c.conditions,
+# :limit => @project_pages.items_per_page,
+# :offset => @project_pages.current.offset
+#
+# render :action => "projects", :layout => false if request.xhr?
+# end
+#
+# def plugins
+# @plugins = Redmine::Plugin.all
+# end
+#
+# # Loads the default configuration
+# # (roles, trackers, statuses, workflow, enumerations)
+# def default_configuration
+# if request.post?
+# begin
+# Redmine::DefaultData::Loader::load(params[:lang])
+# flash[:notice] = l(:notice_default_data_loaded)
+# rescue Exception => e
+# flash[:error] = l(:error_can_t_load_default_data, e.message)
+# end
+# end
+# redirect_to :action => 'index'
+# end
+#
+# def test_email
+# raise_delivery_errors = ActionMailer::Base.raise_delivery_errors
+# # Force ActionMailer to raise delivery errors so we can catch it
+# ActionMailer::Base.raise_delivery_errors = true
+# begin
+# @test = Mailer.deliver_test(User.current)
+# flash[:notice] = l(:notice_email_sent, User.current.mail)
+# rescue Exception => e
+# flash[:error] = l(:notice_email_error, e.message)
+# end
+# ActionMailer::Base.raise_delivery_errors = raise_delivery_errors
+# redirect_to :controller => 'settings', :action => 'edit', :tab => 'notifications'
+# end
+#
+# def info
+# @db_adapter_name = ActiveRecord::Base.connection.adapter_name
+# @flags = {
+# :default_admin_changed => User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?,
+# :file_repository_writable => File.writable?(Attachment.storage_path),
+# :plugin_assets_writable => File.writable?(Engines.public_directory),
+# :rmagick_available => Object.const_defined?(:Magick)
+# }
+# end
+#end
230 app/controllers/app_controller.php
View
@@ -0,0 +1,230 @@
+<?php
+#require 'uri'
+#require 'cgi'
+#
+class AppController extends Controller {
+ var $layout = 'base';
+ var $helpers = array('Html','Form','Javascript','Candy');
+
+ function beforeFilter()
+ {
+ $this->user_setup();
+ //$this->check_if_login_required();
+ //$this->set_localzation();
+
+ }
+# filter_parameter_logging :password
+#
+# include Redmine::MenuManager::MenuController
+# helper Redmine::MenuManager::MenuHelper
+#
+# REDMINE_SUPPORTED_SCM.each do |scm|
+# require_dependency "repository/#{scm.underscore}"
+# end
+#
+# def current_role
+# @current_role ||= User.current.role_for_project(@project)
+# end
+#
+ function user_setup()
+ {
+ $this->set('currentuser',$this->find_current_user());
+# def user_setup
+# # Check the settings cache for each request
+# Setting.check_cache
+# # Find the current user
+# User.current = find_current_user
+# end
+ }
+ function find_current_user() {
+# # Returns the current user or nil if no user is logged in
+# def find_current_user
+# if session[:user_id]
+# # existing session
+# (User.active.find(session[:user_id]) rescue nil)
+# elsif cookies[:autologin] && Setting.autologin?
+# # auto-login feature
+# User.find_by_autologin_key(cookies[:autologin])
+# elsif params[:key] && accept_key_auth_actions.include?(params[:action])
+# # RSS key authentication
+# User.find_by_rss_key(params[:key])
+# end
+# end
+ return array('id' => 3,'name' => 'yando','logged' => true);
+ }
+# # check if login is globally required to access the application
+# def check_if_login_required
+# # no check needed if user is already logged in
+# return true if User.current.logged?
+# require_login if Setting.login_required?
+# end
+#
+# def set_localization
+# User.current.language = nil unless User.current.logged?
+# lang = begin
+# if !User.current.language.blank? && GLoc.valid_language?(User.current.language)
+# User.current.language
+# elsif request.env['HTTP_ACCEPT_LANGUAGE']
+# accept_lang = parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first.downcase
+# if !accept_lang.blank? && (GLoc.valid_language?(accept_lang) || GLoc.valid_language?(accept_lang = accept_lang.split('-').first))
+# User.current.language = accept_lang
+# end
+# end
+# rescue
+# nil
+# end || Setting.default_language
+# set_language_if_valid(lang)
+# end
+#
+# def require_login
+# if !User.current.logged?
+# redirect_to :controller => "account", :action => "login", :back_url => url_for(params)
+# return false
+# end
+# true
+# end
+#
+# def require_admin
+# return unless require_login
+# if !User.current.admin?
+# render_403
+# return false
+# end
+# true
+# end
+#
+# def deny_access
+# User.current.logged? ? render_403 : require_login
+# end
+#
+# # Authorize the user for the requested action
+# def authorize(ctrl = params[:controller], action = params[:action])
+# allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @project)
+# allowed ? true : deny_access
+# end
+#
+# # make sure that the user is a member of the project (or admin) if project is private
+# # used as a before_filter for actions that do not require any particular permission on the project
+# def check_project_privacy
+# if @project && @project.active?
+# if @project.is_public? || User.current.member_of?(@project) || User.current.admin?
+# true
+# else
+# User.current.logged? ? render_403 : require_login
+# end
+# else
+# @project = nil
+# render_404
+# false
+# end
+# end
+#
+# def redirect_back_or_default(default)
+# back_url = CGI.unescape(params[:back_url].to_s)
+# if !back_url.blank?
+# begin
+# uri = URI.parse(back_url)
+# # do not redirect user to another host or to the login or register page
+# if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
+# redirect_to(back_url) and return
+# end
+# rescue URI::InvalidURIError
+# # redirect to default
+# end
+# end
+# redirect_to default
+# end
+#
+# def render_403
+# @project = nil
+# render :template => "common/403", :layout => !request.xhr?, :status => 403
+# return false
+# end
+#
+# def render_404
+# render :template => "common/404", :layout => !request.xhr?, :status => 404
+# return false
+# end
+#
+# def render_error(msg)
+# flash.now[:error] = msg
+# render :nothing => true, :layout => !request.xhr?, :status => 500
+# end
+#
+# def render_feed(items, options={})
+# @items = items || []
+# @items.sort! {|x,y| y.event_datetime <=> x.event_datetime }
+# @items = @items.slice(0, Setting.feeds_limit.to_i)
+# @title = options[:title] || Setting.app_title
+# render :template => "common/feed.atom.rxml", :layout => false, :content_type => 'application/atom+xml'
+# end
+#
+# def self.accept_key_auth(*actions)
+# actions = actions.flatten.map(&:to_s)
+# write_inheritable_attribute('accept_key_auth_actions', actions)
+# end
+#
+# def accept_key_auth_actions
+# self.class.read_inheritable_attribute('accept_key_auth_actions') || []
+# end
+#
+# # TODO: move to model
+# def attach_files(obj, attachments)
+# attached = []
+# unsaved = []
+# if attachments && attachments.is_a?(Hash)
+# attachments.each_value do |attachment|
+# file = attachment['file']
+# next unless file && file.size > 0
+# a = Attachment.create(:container => obj,
+# :file => file,
+# :description => attachment['description'].to_s.strip,
+# :author => User.current)
+# a.new_record? ? (unsaved << a) : (attached << a)
+# end
+# if unsaved.any?
+# flash[:warning] = l(:warning_attachments_not_saved, unsaved.size)
+# end
+# end
+# attached
+# end
+#
+# # Returns the number of objects that should be displayed
+# # on the paginated list
+# def per_page_option
+# per_page = nil
+# if params[:per_page] && Setting.per_page_options_array.include?(params[:per_page].to_s.to_i)
+# per_page = params[:per_page].to_s.to_i
+# session[:per_page] = per_page
+# elsif session[:per_page]
+# per_page = session[:per_page]
+# else
+# per_page = Setting.per_page_options_array.first || 25
+# end
+# per_page
+# end
+#
+# # qvalues http header parser
+# # code taken from webrick
+# def parse_qvalues(value)
+# tmp = []
+# if value
+# parts = value.split(/,\s*/)
+# parts.each {|part|
+# if m = %r{^([^\s,]+?)(?:;\s*q=(\d+(?:\.\d+)?))?$}.match(part)
+# val = m[1]
+# q = (m[2] or 1).to_f
+# tmp.push([val, q])
+# end
+# }
+# tmp = tmp.sort_by{|val, q| -q}
+# tmp.collect!{|val, q| val}
+# end
+# return tmp
+# end
+#
+# # Returns a string that can be used as filename value in Content-Disposition header
+# def filename_for_content_disposition(name)
+# request.env['HTTP_USER_AGENT'] =~ %r{MSIE} ? ERB::Util.url_encode(name) : name
+# end
+}
235 app/controllers/application.php
View
@@ -0,0 +1,235 @@
+<?php
+## redMine - project management software
+## Copyright (C) 2006-2007 Jean-Philippe Lang
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License
+## as published by the Free Software Foundation; either version 2
+## of the License, or (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+#require 'uri'
+#require 'cgi'
+#
+#class ApplicationController < ActionController::Base
+# layout 'base'
+#
+# before_filter :user_setup, :check_if_login_required, :set_localization
+# filter_parameter_logging :password
+#
+# include Redmine::MenuManager::MenuController
+# helper Redmine::MenuManager::MenuHelper
+#
+# REDMINE_SUPPORTED_SCM.each do |scm|
+# require_dependency "repository/#{scm.underscore}"
+# end
+#
+# def current_role
+# @current_role ||= User.current.role_for_project(@project)
+# end
+#
+# def user_setup
+# # Check the settings cache for each request
+# Setting.check_cache
+# # Find the current user
+# User.current = find_current_user
+# end
+#
+# # Returns the current user or nil if no user is logged in
+# def find_current_user
+# if session[:user_id]
+# # existing session
+# (User.active.find(session[:user_id]) rescue nil)
+# elsif cookies[:autologin] && Setting.autologin?
+# # auto-login feature
+# User.find_by_autologin_key(cookies[:autologin])
+# elsif params[:key] && accept_key_auth_actions.include?(params[:action])
+# # RSS key authentication
+# User.find_by_rss_key(params[:key])
+# end
+# end
+#
+# # check if login is globally required to access the application
+# def check_if_login_required
+# # no check needed if user is already logged in
+# return true if User.current.logged?
+# require_login if Setting.login_required?
+# end
+#
+# def set_localization
+# User.current.language = nil unless User.current.logged?
+# lang = begin
+# if !User.current.language.blank? && GLoc.valid_language?(User.current.language)
+# User.current.language
+# elsif request.env['HTTP_ACCEPT_LANGUAGE']
+# accept_lang = parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first.downcase
+# if !accept_lang.blank? && (GLoc.valid_language?(accept_lang) || GLoc.valid_language?(accept_lang = accept_lang.split('-').first))
+# User.current.language = accept_lang
+# end
+# end
+# rescue
+# nil
+# end || Setting.default_language
+# set_language_if_valid(lang)
+# end
+#
+# def require_login
+# if !User.current.logged?
+# redirect_to :controller => "account", :action => "login", :back_url => url_for(params)
+# return false
+# end
+# true
+# end
+#
+# def require_admin
+# return unless require_login
+# if !User.current.admin?
+# render_403
+# return false
+# end
+# true
+# end
+#
+# def deny_access
+# User.current.logged? ? render_403 : require_login
+# end
+#
+# # Authorize the user for the requested action
+# def authorize(ctrl = params[:controller], action = params[:action])
+# allowed = User.current.allowed_to?({:controller => ctrl, :action => action}, @project)
+# allowed ? true : deny_access
+# end
+#
+# # make sure that the user is a member of the project (or admin) if project is private
+# # used as a before_filter for actions that do not require any particular permission on the project
+# def check_project_privacy
+# if @project && @project.active?
+# if @project.is_public? || User.current.member_of?(@project) || User.current.admin?
+# true
+# else
+# User.current.logged? ? render_403 : require_login
+# end
+# else
+# @project = nil
+# render_404
+# false
+# end
+# end
+#
+# def redirect_back_or_default(default)
+# back_url = CGI.unescape(params[:back_url].to_s)
+# if !back_url.blank?
+# begin
+# uri = URI.parse(back_url)
+# # do not redirect user to another host or to the login or register page
+# if (uri.relative? || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
+# redirect_to(back_url) and return
+# end
+# rescue URI::InvalidURIError
+# # redirect to default
+# end
+# end
+# redirect_to default
+# end
+#
+# def render_403
+# @project = nil
+# render :template => "common/403", :layout => !request.xhr?, :status => 403
+# return false
+# end
+#
+# def render_404
+# render :template => "common/404", :layout => !request.xhr?, :status => 404
+# return false
+# end
+#
+# def render_error(msg)
+# flash.now[:error] = msg
+# render :nothing => true, :layout => !request.xhr?, :status => 500
+# end
+#
+# def render_feed(items, options={})
+# @items = items || []
+# @items.sort! {|x,y| y.event_datetime <=> x.event_datetime }
+# @items = @items.slice(0, Setting.feeds_limit.to_i)
+# @title = options[:title] || Setting.app_title
+# render :template => "common/feed.atom.rxml", :layout => false, :content_type => 'application/atom+xml'
+# end
+#
+# def self.accept_key_auth(*actions)
+# actions = actions.flatten.map(&:to_s)
+# write_inheritable_attribute('accept_key_auth_actions', actions)
+# end
+#
+# def accept_key_auth_actions
+# self.class.read_inheritable_attribute('accept_key_auth_actions') || []
+# end
+#
+# # TODO: move to model
+# def attach_files(obj, attachments)
+# attached = []
+# unsaved = []
+# if attachments && attachments.is_a?(Hash)
+# attachments.each_value do |attachment|
+# file = attachment['file']
+# next unless file && file.size > 0
+# a = Attachment.create(:container => obj,
+# :file => file,
+# :description => attachment['description'].to_s.strip,
+# :author => User.current)
+# a.new_record? ? (unsaved << a) : (attached << a)
+# end
+# if unsaved.any?
+# flash[:warning] = l(:warning_attachments_not_saved, unsaved.size)
+# end
+# end
+# attached
+# end
+#
+# # Returns the number of objects that should be displayed
+# # on the paginated list
+# def per_page_option
+# per_page = nil
+# if params[:per_page] && Setting.per_page_options_array.include?(params[:per_page].to_s.to_i)
+# per_page = params[:per_page].to_s.to_i
+# session[:per_page] = per_page
+# elsif session[:per_page]
+# per_page = session[:per_page]
+# else
+# per_page = Setting.per_page_options_array.first || 25
+# end
+# per_page
+# end
+#
+# # qvalues http header parser
+# # code taken from webrick
+# def parse_qvalues(value)
+# tmp = []
+# if value
+# parts = value.split(/,\s*/)
+# parts.each {|part|
+# if m = %r{^([^\s,]+?)(?:;\s*q=(\d+(?:\.\d+)?))?$}.match(part)
+# val = m[1]
+# q = (m[2] or 1).to_f
+# tmp.push([val, q])
+# end
+# }
+# tmp = tmp.sort_by{|val, q| -q}
+# tmp.collect!{|val, q| val}
+# end
+# return tmp
+# end
+#
+# # Returns a string that can be used as filename value in Content-Disposition header
+# def filename_for_content_disposition(name)
+# request.env['HTTP_USER_AGENT'] =~ %r{MSIE} ? ERB::Util.url_encode(name) : name
+# end
+#end
75 app/controllers/attachments_controller.php
View
@@ -0,0 +1,75 @@
+<?php
+## Redmine - project management software
+## Copyright (C) 2006-2008 Jean-Philippe Lang
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License
+## as published by the Free Software Foundation; either version 2
+## of the License, or (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+#class AttachmentsController < ApplicationController
+# before_filter :find_project
+# before_filter :read_authorize, :except => :destroy
+# before_filter :delete_authorize, :only => :destroy
+#
+# verify :method => :post, :only => :destroy
+#
+# def show
+# if @attachment.is_diff?
+# @diff = File.new(@attachment.diskfile, "rb").read
+# render :action => 'diff'
+# elsif @attachment.is_text?
+# @content = File.new(@attachment.diskfile, "rb").read
+# render :action => 'file'
+# elsif
+# download
+# end
+# end
+#
+# def download
+# if @attachment.container.is_a?(Version) || @attachment.container.is_a?(Project)
+# @attachment.increment_download
+# end
+#
+# # images are sent inline
+# send_file @attachment.diskfile, :filename => filename_for_content_disposition(@attachment.filename),
+# :type => @attachment.content_type,
+# :disposition => (@attachment.image? ? 'inline' : 'attachment')
+#
+# end
+#
+# def destroy
+# # Make sure association callbacks are called
+# @attachment.container.attachments.delete(@attachment)
+# redirect_to :back
+# rescue ::ActionController::RedirectBackError
+# redirect_to :controller => 'projects', :action => 'show', :id => @project
+# end
+#
+#private
+# def find_project
+# @attachment = Attachment.find(params[:id])
+# # Show 404 if the filename in the url is wrong
+# raise ActiveRecord::RecordNotFound if params[:filename] && params[:filename] != @attachment.filename
+# @project = @attachment.project
+# rescue ActiveRecord::RecordNotFound
+# render_404
+# end
+#
+# def read_authorize
+# @attachment.visible? ? true : deny_access
+# end
+#
+# def delete_authorize
+# @attachment.deletable? ? true : deny_access
+# end
+#end
83 app/controllers/auth_sources_controller.php
View
@@ -0,0 +1,83 @@
+<?php
+## redMine - project management software
+## Copyright (C) 2006 Jean-Philippe Lang
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License
+## as published by the Free Software Foundation; either version 2
+## of the License, or (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+#class AuthSourcesController < ApplicationController
+# before_filter :require_admin
+#
+# def index
+# list
+# render :action => 'list' unless request.xhr?
+# end
+#
+# # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
+# verify :method => :post, :only => [ :destroy, :create, :update ],
+# :redirect_to => { :action => :list }
+#
+# def list
+# @auth_source_pages, @auth_sources = paginate :auth_sources, :per_page => 10
+# render :action => "list", :layout => false if request.xhr?
+# end
+#
+# def new
+# @auth_source = AuthSourceLdap.new
+# end
+#
+# def create
+# @auth_source = AuthSourceLdap.new(params[:auth_source])
+# if @auth_source.save
+# flash[:notice] = l(:notice_successful_create)
+# redirect_to :action => 'list'
+# else
+# render :action => 'new'
+# end
+# end
+#
+# def edit
+# @auth_source = AuthSource.find(params[:id])
+# end
+#
+# def update
+# @auth_source = AuthSource.find(params[:id])
+# if @auth_source.update_attributes(params[:auth_source])
+# flash[:notice] = l(:notice_successful_update)
+# redirect_to :action => 'list'
+# else
+# render :action => 'edit'
+# end
+# end
+#
+# def test_connection
+# @auth_method = AuthSource.find(params[:id])
+# begin
+# @auth_method.test_connection
+# flash[:notice] = l(:notice_successful_connection)
+# rescue => text
+# flash[:error] = "Unable to connect (#{text})"
+# end
+# redirect_to :action => 'list'
+# end
+#
+# def destroy
+# @auth_source = AuthSource.find(params[:id])
+# unless @auth_source.users.find(:first)
+# @auth_source.destroy
+# flash[:notice] = l(:notice_successful_delete)
+# end
+# redirect_to :action => 'list'
+# end
+#end
88 app/controllers/boards_controller.php
View
@@ -0,0 +1,88 @@
+<?php
+## redMine - project management software
+## Copyright (C) 2006-2007 Jean-Philippe Lang
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License
+## as published by the Free Software Foundation; either version 2
+## of the License, or (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+#class BoardsController < ApplicationController
+# before_filter :find_project, :authorize
+#
+# helper :messages
+# include MessagesHelper
+# helper :sort
+# include SortHelper
+# helper :watchers