Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: IyadKandalaft/Health-Promotion
base: 34772886c3
...
head fork: IyadKandalaft/Health-Promotion
compare: 8d970cf5b6
  • 2 commits
  • 1,017 files changed
  • 0 commit comments
  • 1 contributor
Showing with 30,644 additions and 1 deletion.
  1. +13 −1 .gitignore
  2. +5 −0 .htaccess
  3. +110 −0 .travis.yml
  4. +28 −0 README
  5. +5 −0 app/.htaccess
  6. +31 −0 app/Console/Command/AppShell.php
  7. 0  app/Console/Command/Task/empty
  8. 0  app/Console/Templates/empty
  9. +33 −0 app/Console/cake
  10. +32 −0 app/Console/cake.bat
  11. +33 −0 app/Console/cake.php
  12. +35 −0 app/Controller/AppController.php
  13. +96 −0 app/Controller/CategoriesController.php
  14. 0  app/Controller/Component/empty
  15. +181 −0 app/Controller/PeopleController.php
  16. +193 −0 app/Controller/ProjectsController.php
  17. +96 −0 app/Controller/RegionsController.php
  18. +96 −0 app/Controller/RolesController.php
  19. 0  app/Lib/empty
  20. 0  app/Locale/eng/LC_MESSAGES/empty
  21. +34 −0 app/Model/AppModel.php
  22. 0  app/Model/Behavior/empty
  23. +66 −0 app/Model/Category.php
  24. 0  app/Model/Datasource/empty
  25. +71 −0 app/Model/Discussion.php
  26. +49 −0 app/Model/FundPage.php
  27. +49 −0 app/Model/MainPage.php
  28. +157 −0 app/Model/Page.php
  29. +91 −0 app/Model/Permission.php
  30. +134 −0 app/Model/Person.php
  31. +49 −0 app/Model/ProcessPage.php
  32. +124 −0 app/Model/Project.php
  33. +79 −0 app/Model/ProjectMembership.php
  34. +56 −0 app/Model/Region.php
  35. +70 −0 app/Model/Role.php
  36. 0  app/Plugin/empty
  37. +102 −0 app/Test/Case/Controller/CategoriesControllerTest.php
  38. 0  app/Test/Case/Controller/Component/empty
  39. +142 −0 app/Test/Case/Controller/PeopleControllerTest.php
  40. +102 −0 app/Test/Case/Controller/PeopleProjectsRolesControllerTest.php
  41. +142 −0 app/Test/Case/Controller/ProjectsControllerTest.php
  42. +102 −0 app/Test/Case/Controller/RegionsControllerTest.php
  43. +102 −0 app/Test/Case/Controller/RolesControllerTest.php
  44. 0  app/Test/Case/Model/Behavior/empty
  45. +37 −0 app/Test/Case/Model/CategoryTest.php
  46. +37 −0 app/Test/Case/Model/DiscussionTest.php
  47. +37 −0 app/Test/Case/Model/FundPageTest.php
  48. +37 −0 app/Test/Case/Model/MainPageTest.php
  49. +37 −0 app/Test/Case/Model/PageTest.php
  50. +37 −0 app/Test/Case/Model/PagesRoleTest.php
  51. +37 −0 app/Test/Case/Model/PeopleProjectsRoleTest.php
  52. +37 −0 app/Test/Case/Model/PermissionTest.php
  53. +37 −0 app/Test/Case/Model/PersonTest.php
  54. +37 −0 app/Test/Case/Model/ProcessPageTest.php
  55. +37 −0 app/Test/Case/Model/ProjectTest.php
  56. +37 −0 app/Test/Case/Model/RegionTest.php
  57. +37 −0 app/Test/Case/Model/RoleTest.php
  58. 0  app/Test/Case/View/Helper/empty
  59. +33 −0 app/Test/Fixture/CategoryFixture.php
  60. +37 −0 app/Test/Fixture/DiscussionFixture.php
  61. +35 −0 app/Test/Fixture/FundPageFixture.php
  62. +33 −0 app/Test/Fixture/MainPageFixture.php
  63. +37 −0 app/Test/Fixture/PageFixture.php
  64. +39 −0 app/Test/Fixture/PagesRoleFixture.php
  65. +35 −0 app/Test/Fixture/PeopleProjectsRoleFixture.php
  66. +39 −0 app/Test/Fixture/PermissionFixture.php
  67. +55 −0 app/Test/Fixture/PersonFixture.php
  68. +31 −0 app/Test/Fixture/ProcessPageFixture.php
  69. +39 −0 app/Test/Fixture/ProjectFixture.php
  70. +35 −0 app/Test/Fixture/ProjectMembershipFixture.php
  71. +31 −0 app/Test/Fixture/RegionFixture.php
  72. +31 −0 app/Test/Fixture/RoleFixture.php
  73. 0  app/Test/Fixture/empty
  74. 0  app/Vendor/empty
  75. +20 −0 app/View/Categories/admin_add.ctp
  76. +22 −0 app/View/Categories/admin_edit.ctp
  77. +46 −0 app/View/Categories/admin_index.ctp
  78. +70 −0 app/View/Categories/admin_view.ctp
  79. 0  app/View/Elements/empty
  80. +25 −0 app/View/Emails/html/default.ctp
  81. +19 −0 app/View/Emails/text/default.ctp
  82. +31 −0 app/View/Errors/error400.ctp
  83. +28 −0 app/View/Errors/error500.ctp
  84. +34 −0 app/View/Helper/AppHelper.php
  85. +29 −0 app/View/Layouts/Emails/html/default.ctp
  86. +21 −0 app/View/Layouts/Emails/text/default.ctp
  87. +19 −0 app/View/Layouts/ajax.ctp
  88. +61 −0 app/View/Layouts/default.ctp
  89. +37 −0 app/View/Layouts/flash.ctp
  90. +2 −0  app/View/Layouts/js/default.ctp
  91. +14 −0 app/View/Layouts/rss/default.ctp
  92. +1 −0  app/View/Layouts/xml/default.ctp
  93. +188 −0 app/View/Pages/home.ctp
  94. +33 −0 app/View/People/add.ctp
  95. +33 −0 app/View/People/admin_add.ctp
  96. +35 −0 app/View/People/admin_edit.ctp
  97. +70 −0 app/View/People/admin_index.ctp
  98. +160 −0 app/View/People/admin_view.ctp
  99. +35 −0 app/View/People/edit.ctp
  100. +70 −0 app/View/People/index.ctp
  101. +160 −0 app/View/People/view.ctp
  102. +28 −0 app/View/Projects/add.ctp
  103. +28 −0 app/View/Projects/admin_add.ctp
  104. +30 −0 app/View/Projects/admin_edit.ctp
  105. +62 −0 app/View/Projects/admin_index.ctp
  106. +124 −0 app/View/Projects/admin_view.ctp
  107. +30 −0 app/View/Projects/edit.ctp
  108. +62 −0 app/View/Projects/index.ctp
  109. +124 −0 app/View/Projects/view.ctp
  110. +19 −0 app/View/Regions/admin_add.ctp
  111. +21 −0 app/View/Regions/admin_edit.ctp
  112. +44 −0 app/View/Regions/admin_index.ctp
  113. +65 −0 app/View/Regions/admin_view.ctp
  114. +21 −0 app/View/Roles/admin_add.ctp
  115. +23 −0 app/View/Roles/admin_edit.ctp
  116. +46 −0 app/View/Roles/admin_index.ctp
  117. +102 −0 app/View/Roles/admin_view.ctp
  118. 0  app/View/Scaffolds/empty
  119. +17 −0 app/index.php
  120. +6 −0 app/webroot/.htaccess
  121. +739 −0 app/webroot/css/cake.generic.css
  122. BIN  app/webroot/favicon.ico
  123. 0  app/webroot/files/empty
  124. BIN  app/webroot/img/cake.icon.png
  125. BIN  app/webroot/img/cake.power.gif
  126. BIN  app/webroot/img/test-error-icon.png
  127. BIN  app/webroot/img/test-fail-icon.png
  128. BIN  app/webroot/img/test-pass-icon.png
  129. BIN  app/webroot/img/test-skip-icon.png
  130. +92 −0 app/webroot/index.php
  131. 0  app/webroot/js/empty
  132. +92 −0 app/webroot/test.php
  133. +12 −0 build.properties
  134. +214 −0 build.xml
  135. +40 −0 index.php
  136. +482 −0 lib/Cake/Cache/Cache.php
  137. +134 −0 lib/Cake/Cache/CacheEngine.php
  138. +130 −0 lib/Cake/Cache/Engine/ApcEngine.php
  139. +326 −0 lib/Cake/Cache/Engine/FileEngine.php
  140. +238 −0 lib/Cake/Cache/Engine/MemcacheEngine.php
  141. +137 −0 lib/Cake/Cache/Engine/WincacheEngine.php
  142. +177 −0 lib/Cake/Cache/Engine/XcacheEngine.php
  143. +21 −0 lib/Cake/Config/config.php
  144. +86 −0 lib/Cake/Config/routes.php
  145. +73 −0 lib/Cake/Config/unicode/casefolding/0080_00ff.php
  146. +106 −0 lib/Cake/Config/unicode/casefolding/0100_017f.php
  147. +148 −0 lib/Cake/Config/unicode/casefolding/0180_024F.php
  148. +41 −0 lib/Cake/Config/unicode/casefolding/0250_02af.php
  149. +102 −0 lib/Cake/Config/unicode/casefolding/0370_03ff.php
  150. +164 −0 lib/Cake/Config/unicode/casefolding/0400_04ff.php
  151. +50 −0 lib/Cake/Config/unicode/casefolding/0500_052f.php
  152. +78 −0 lib/Cake/Config/unicode/casefolding/0530_058f.php
  153. +168 −0 lib/Cake/Config/unicode/casefolding/1e00_1eff.php
  154. +216 −0 lib/Cake/Config/unicode/casefolding/1f00_1fff.php
  155. +44 −0 lib/Cake/Config/unicode/casefolding/2100_214f.php
  156. +57 −0 lib/Cake/Config/unicode/casefolding/2150_218f.php
  157. +66 −0 lib/Cake/Config/unicode/casefolding/2460_24ff.php
  158. +87 −0 lib/Cake/Config/unicode/casefolding/2c00_2c5f.php
  159. +48 −0 lib/Cake/Config/unicode/casefolding/2c60_2c7f.php
  160. +90 −0 lib/Cake/Config/unicode/casefolding/2c80_2cff.php
  161. +66 −0 lib/Cake/Config/unicode/casefolding/ff00_ffef.php
  162. +33 −0 lib/Cake/Configure/ConfigReaderInterface.php
  163. +138 −0 lib/Cake/Configure/IniReader.php
  164. +90 −0 lib/Cake/Configure/PhpReader.php
  165. +608 −0 lib/Cake/Console/Command/AclShell.php
  166. +238 −0 lib/Cake/Console/Command/ApiShell.php
  167. +31 −0 lib/Cake/Console/Command/AppShell.php
  168. +248 −0 lib/Cake/Console/Command/BakeShell.php
  169. +234 −0 lib/Cake/Console/Command/CommandListShell.php
  170. +359 −0 lib/Cake/Console/Command/ConsoleShell.php
  171. +121 −0 lib/Cake/Console/Command/I18nShell.php
  172. +533 −0 lib/Cake/Console/Command/SchemaShell.php
  173. +93 −0 lib/Cake/Console/Command/Task/BakeTask.php
  174. +470 −0 lib/Cake/Console/Command/Task/ControllerTask.php
  175. +384 −0 lib/Cake/Console/Command/Task/DbConfigTask.php
  176. +702 −0 lib/Cake/Console/Command/Task/ExtractTask.php
  177. +418 −0 lib/Cake/Console/Command/Task/FixtureTask.php
  178. +988 −0 lib/Cake/Console/Command/Task/ModelTask.php
  179. +196 −0 lib/Cake/Console/Command/Task/PluginTask.php
  180. +434 −0 lib/Cake/Console/Command/Task/ProjectTask.php
  181. +218 −0 lib/Cake/Console/Command/Task/TemplateTask.php
  182. +535 −0 lib/Cake/Console/Command/Task/TestTask.php
  183. +468 −0 lib/Cake/Console/Command/Task/ViewTask.php
  184. +434 −0 lib/Cake/Console/Command/TestShell.php
  185. +101 −0 lib/Cake/Console/Command/TestsuiteShell.php
  186. +859 −0 lib/Cake/Console/Command/UpgradeShell.php
  187. +98 −0 lib/Cake/Console/ConsoleErrorHandler.php
  188. +51 −0 lib/Cake/Console/ConsoleInput.php
  189. +170 −0 lib/Cake/Console/ConsoleInputArgument.php
  190. +221 −0 lib/Cake/Console/ConsoleInputOption.php
  191. +121 −0 lib/Cake/Console/ConsoleInputSubcommand.php
  192. +651 −0 lib/Cake/Console/ConsoleOptionParser.php
  193. +288 −0 lib/Cake/Console/ConsoleOutput.php
  194. +201 −0 lib/Cake/Console/HelpFormatter.php
  195. +816 −0 lib/Cake/Console/Shell.php
  196. +332 −0 lib/Cake/Console/ShellDispatcher.php
  197. +82 −0 lib/Cake/Console/TaskCollection.php
  198. +157 −0 lib/Cake/Console/Templates/default/actions/controller_actions.ctp
  199. +81 −0 lib/Cake/Console/Templates/default/classes/controller.ctp
  200. +62 −0 lib/Cake/Console/Templates/default/classes/fixture.ctp
  201. +175 −0 lib/Cake/Console/Templates/default/classes/model.ctp
  202. +100 −0 lib/Cake/Console/Templates/default/classes/test.ctp
  203. +65 −0 lib/Cake/Console/Templates/default/views/form.ctp
  204. +113 −0 lib/Cake/Console/Templates/default/views/home.ctp
  205. +93 −0 lib/Cake/Console/Templates/default/views/index.ctp
  206. +139 −0 lib/Cake/Console/Templates/default/views/view.ctp
  207. +5 −0 lib/Cake/Console/Templates/skel/.htaccess
  208. +74 −0 lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php
  209. +40 −0 lib/Cake/Console/Templates/skel/Config/Schema/db_acl.sql
  210. +51 −0 lib/Cake/Console/Templates/skel/Config/Schema/i18n.php
  211. +26 −0 lib/Cake/Console/Templates/skel/Config/Schema/i18n.sql
  212. +48 −0 lib/Cake/Console/Templates/skel/Config/Schema/sessions.php
  213. +16 −0 lib/Cake/Console/Templates/skel/Config/Schema/sessions.sql
  214. +68 −0 lib/Cake/Console/Templates/skel/Config/acl.ini.php
  215. +72 −0 lib/Cake/Console/Templates/skel/Config/bootstrap.php
  216. +336 −0 lib/Cake/Console/Templates/skel/Config/core.php
  217. +84 −0 lib/Cake/Console/Templates/skel/Config/database.php.default
  218. +97 −0 lib/Cake/Console/Templates/skel/Config/email.php.default
  219. +44 −0 lib/Cake/Console/Templates/skel/Config/routes.php
  220. +31 −0 lib/Cake/Console/Templates/skel/Console/Command/AppShell.php
  221. 0  lib/Cake/Console/Templates/skel/Console/Command/Task/empty
  222. 0  lib/Cake/Console/Templates/skel/Console/Templates/empty
  223. +33 −0 lib/Cake/Console/Templates/skel/Console/cake
  224. +32 −0 lib/Cake/Console/Templates/skel/Console/cake.bat
  225. +33 −0 lib/Cake/Console/Templates/skel/Console/cake.php
  226. +35 −0 lib/Cake/Console/Templates/skel/Controller/AppController.php
  227. 0  lib/Cake/Console/Templates/skel/Controller/Component/empty
  228. +74 −0 lib/Cake/Console/Templates/skel/Controller/PagesController.php
  229. 0  lib/Cake/Console/Templates/skel/Lib/empty
  230. 0  lib/Cake/Console/Templates/skel/Locale/eng/LC_MESSAGES/empty
  231. +34 −0 lib/Cake/Console/Templates/skel/Model/AppModel.php
  232. 0  lib/Cake/Console/Templates/skel/Model/Behavior/empty
  233. 0  lib/Cake/Console/Templates/skel/Model/Datasource/empty
  234. 0  lib/Cake/Console/Templates/skel/Plugin/empty
  235. 0  lib/Cake/Console/Templates/skel/Test/Case/Controller/Component/empty
  236. 0  lib/Cake/Console/Templates/skel/Test/Case/Model/Behavior/empty
  237. 0  lib/Cake/Console/Templates/skel/Test/Case/View/Helper/empty
  238. 0  lib/Cake/Console/Templates/skel/Test/Fixture/empty
  239. 0  lib/Cake/Console/Templates/skel/Vendor/empty
  240. 0  lib/Cake/Console/Templates/skel/View/Elements/empty
  241. +25 −0 lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp
  242. +19 −0 lib/Cake/Console/Templates/skel/View/Emails/text/default.ctp
  243. +31 −0 lib/Cake/Console/Templates/skel/View/Errors/error400.ctp
  244. +28 −0 lib/Cake/Console/Templates/skel/View/Errors/error500.ctp
  245. +33 −0 lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php
  246. +31 −0 lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp
  247. +22 −0 lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp
  248. +19 −0 lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp
  249. +59 −0 lib/Cake/Console/Templates/skel/View/Layouts/default.ctp
  250. +37 −0 lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp
  251. +2 −0  lib/Cake/Console/Templates/skel/View/Layouts/js/default.ctp
  252. +14 −0 lib/Cake/Console/Templates/skel/View/Layouts/rss/default.ctp
  253. +1 −0  lib/Cake/Console/Templates/skel/View/Layouts/xml/default.ctp
  254. +188 −0 lib/Cake/Console/Templates/skel/View/Pages/home.ctp
  255. 0  lib/Cake/Console/Templates/skel/View/Scaffolds/empty
  256. +17 −0 lib/Cake/Console/Templates/skel/index.php
  257. +6 −0 lib/Cake/Console/Templates/skel/webroot/.htaccess
  258. +739 −0 lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css
  259. BIN  lib/Cake/Console/Templates/skel/webroot/favicon.ico
  260. 0  lib/Cake/Console/Templates/skel/webroot/files/empty
  261. BIN  lib/Cake/Console/Templates/skel/webroot/img/cake.icon.png
  262. BIN  lib/Cake/Console/Templates/skel/webroot/img/cake.power.gif
  263. BIN  lib/Cake/Console/Templates/skel/webroot/img/test-error-icon.png
  264. BIN  lib/Cake/Console/Templates/skel/webroot/img/test-fail-icon.png
  265. BIN  lib/Cake/Console/Templates/skel/webroot/img/test-pass-icon.png
  266. BIN  lib/Cake/Console/Templates/skel/webroot/img/test-skip-icon.png
  267. +97 −0 lib/Cake/Console/Templates/skel/webroot/index.php
  268. 0  lib/Cake/Console/Templates/skel/webroot/js/empty
  269. +94 −0 lib/Cake/Console/Templates/skel/webroot/test.php
  270. +33 −0 lib/Cake/Console/cake
  271. +32 −0 lib/Cake/Console/cake.bat
  272. +41 −0 lib/Cake/Console/cake.php
  273. +79 −0 lib/Cake/Controller/CakeErrorController.php
  274. +165 −0 lib/Cake/Controller/Component.php
  275. +70 −0 lib/Cake/Controller/Component/Acl/AclInterface.php
  276. +293 −0 lib/Cake/Controller/Component/Acl/DbAcl.php
  277. +172 −0 lib/Cake/Controller/Component/Acl/IniAcl.php
  278. +539 −0 lib/Cake/Controller/Component/Acl/PhpAcl.php
  279. +181 −0 lib/Cake/Controller/Component/AclComponent.php
  280. +42 −0 lib/Cake/Controller/Component/Auth/ActionsAuthorize.php
  281. +138 −0 lib/Cake/Controller/Component/Auth/BaseAuthenticate.php
  282. +161 −0 lib/Cake/Controller/Component/Auth/BaseAuthorize.php
  283. +126 −0 lib/Cake/Controller/Component/Auth/BasicAuthenticate.php
  284. +67 −0 lib/Cake/Controller/Component/Auth/ControllerAuthorize.php
  285. +102 −0 lib/Cake/Controller/Component/Auth/CrudAuthorize.php
  286. +268 −0 lib/Cake/Controller/Component/Auth/DigestAuthenticate.php
  287. +68 −0 lib/Cake/Controller/Component/Auth/FormAuthenticate.php
  288. +726 −0 lib/Cake/Controller/Component/AuthComponent.php
  289. +514 −0 lib/Cake/Controller/Component/CookieComponent.php
  290. +464 −0 lib/Cake/Controller/Component/EmailComponent.php
  291. +381 −0 lib/Cake/Controller/Component/PaginatorComponent.php
Sorry, we could not display the entire diff because too many files (1,017) changed.
View
14 .gitignore
@@ -1,5 +1,17 @@
+<<<<<<< HEAD
+/app/Config
+/app/tmp
+/lib/Cake/Console/Templates/skel/tmp/
+/plugins
+/vendors
+/build
+/dist
+.DS_Store
+/tags
+=======
tmp/*
config/database.php
app/tmp/*
app/config/database.php
-!empty
+!empty
+>>>>>>> origin/master
View
5 .htaccess
@@ -0,0 +1,5 @@
+<IfModule mod_rewrite.c>
+ RewriteEngine on
+ RewriteRule ^$ app/webroot/ [L]
+ RewriteRule (.*) app/webroot/$1 [L]
+</IfModule>
View
110 .travis.yml
@@ -0,0 +1,110 @@
+language: php
+
+php:
+ - 5.3
+ - 5.4
+
+env:
+ - DB=mysql
+ - DB=pgsql
+ - DB=sqlite
+
+before_script:
+ - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
+ - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test2;'; fi"
+ - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test3;'; fi"
+ - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"
+ - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test2;' -U postgres -d cakephp_test; fi"
+ - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE SCHEMA test3;' -U postgres -d cakephp_test; fi"
+ - chmod -R 777 ./app/tmp
+ - echo "var net = require('net');
+ var server = net.createServer();
+ server.listen(80, 'localhost');
+ console.log('TCP server listening on port 80 at localhost.');" > app/tmp/socket.js
+ - sudo node ./app/tmp/socket.js &
+ - set +H
+ - echo "<?php
+ class DATABASE_CONFIG {
+ private \$identities = array(
+ 'mysql' => array(
+ 'datasource' => 'Database/Mysql',
+ 'host' => '0.0.0.0',
+ 'login' => 'travis'
+ ),
+ 'pgsql' => array(
+ 'datasource' => 'Database/Postgres',
+ 'host' => '127.0.0.1',
+ 'login' => 'postgres',
+ 'database' => 'cakephp_test',
+ 'schema' => array(
+ 'default' => 'public',
+ 'test' => 'public',
+ 'test2' => 'test2',
+ 'test_database_three' => 'test3'
+ )
+ ),
+ 'sqlite' => array(
+ 'datasource' => 'Database/Sqlite',
+ 'database' => array(
+ 'default' => ':memory:',
+ 'test' => ':memory:',
+ 'test2' => '/tmp/cakephp_test2.db',
+ 'test_database_three' => '/tmp/cakephp_test3.db'
+ ),
+ )
+ );
+ public \$default = array(
+ 'persistent' => false,
+ 'host' => '',
+ 'login' => '',
+ 'password' => '',
+ 'database' => 'cakephp_test',
+ 'prefix' => ''
+ );
+ public \$test = array(
+ 'persistent' => false,
+ 'host' => '',
+ 'login' => '',
+ 'password' => '',
+ 'database' => 'cakephp_test',
+ 'prefix' => ''
+ );
+ public \$test2 = array(
+ 'persistent' => false,
+ 'host' => '',
+ 'login' => '',
+ 'password' => '',
+ 'database' => 'cakephp_test2',
+ 'prefix' => ''
+ );
+ public \$test_database_three = array(
+ 'persistent' => false,
+ 'host' => '',
+ 'login' => '',
+ 'password' => '',
+ 'database' => 'cakephp_test3',
+ 'prefix' => ''
+ );
+ public function __construct() {
+ \$db = 'mysql';
+ if (!empty(\$_SERVER['DB'])) {
+ \$db = \$_SERVER['DB'];
+ }
+ foreach (array('default', 'test', 'test2', 'test_database_three') as \$source) {
+ \$config = array_merge(\$this->{\$source}, \$this->identities[\$db]);
+ if (is_array(\$config['database'])) {
+ \$config['database'] = \$config['database'][\$source];
+ }
+ if (!empty(\$config['schema']) && is_array(\$config['schema'])) {
+ \$config['schema'] = \$config['schema'][\$source];
+ }
+ \$this->{\$source} = \$config;
+ }
+ }
+ }" > app/Config/database.php
+
+script:
+ - ./lib/Cake/Console/cake test core AllTests --stderr
+
+notifications:
+ email: false
View
28 README
@@ -0,0 +1,28 @@
+CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC. Our primary goal is to provide a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss to flexibility.
+
+The Cake Software Foundation - promoting development related to CakePHP
+http://cakefoundation.org/
+
+CakePHP - the rapid development PHP framework
+http://www.cakephp.org
+
+Cookbook - user documentation for learning about CakePHP
+http://book.cakephp.org
+
+API - quick reference to CakePHP
+http://api.cakephp.org
+
+The Bakery - everything CakePHP
+http://bakery.cakephp.org
+
+The Show - live and archived podcasts about CakePHP and more
+http://live.cakephp.org
+
+CakePHP TV - screen casts from events and video tutorials
+http://tv.cakephp.org
+
+CakePHP Google Group - community mailing list and forum
+http://groups.google.com/group/cake-php
+
+#cakephp on irc.freenode.net - chat with CakePHP developers
+irc://irc.freenode.net/cakephp
View
5 app/.htaccess
@@ -0,0 +1,5 @@
+<IfModule mod_rewrite.c>
+ RewriteEngine on
+ RewriteRule ^$ webroot/ [L]
+ RewriteRule (.*) webroot/$1 [L]
+</IfModule>
View
31 app/Console/Command/AppShell.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * AppShell file
+ *
+ * PHP 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @since CakePHP(tm) v 2.0
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+
+App::uses('Shell', 'Console');
+
+/**
+ * Application Shell
+ *
+ * Add your application-wide methods in the class below, your shells
+ * will inherit them.
+ *
+ * @package app.Console.Command
+ */
+class AppShell extends Shell {
+
+}
View
0  app/Console/Command/Task/empty
No changes.
View
0  app/Console/Templates/empty
No changes.
View
33 app/Console/cake
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+################################################################################
+#
+# Bake is a shell script for running CakePHP bake script
+# PHP 5
+#
+# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+# Copyright 2005-2012, Cake Software Foundation, Inc.
+#
+# Licensed under The MIT License
+# Redistributions of files must retain the above copyright notice.
+#
+# @copyright Copyright 2005-2012, Cake Software Foundation, Inc.
+# @link http://cakephp.org CakePHP(tm) Project
+# @package app.Console
+# @since CakePHP(tm) v 2.0
+# @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+#
+################################################################################
+LIB=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && LIB=$LIB/$(basename -- "$0")
+
+while [ -h "$LIB" ]; do
+ DIR=$(dirname -- "$LIB")
+ SYM=$(readlink "$LIB")
+ LIB=$(cd "$DIR" && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
+done
+
+LIB=$(dirname -- "$LIB")/
+APP=`pwd`
+
+exec php -q "$LIB"cake.php -working "$APP" "$@"
+
+exit;
View
32 app/Console/cake.bat
@@ -0,0 +1,32 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::
+:: Bake is a shell script for running CakePHP bake script
+:: PHP 5
+::
+:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+:: Copyright 2005-2012, Cake Software Foundation, Inc.
+::
+:: Licensed under The MIT License
+:: Redistributions of files must retain the above copyright notice.
+::
+:: @copyright Copyright 2005-2012, Cake Software Foundation, Inc.
+:: @link http://cakephp.org CakePHP(tm) Project
+:: @package app.Console
+:: @since CakePHP(tm) v 2.0
+:: @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+:: In order for this script to work as intended, the cake\console\ folder must be in your PATH
+
+@echo.
+@echo off
+
+SET app=%0
+SET lib=%~dp0
+
+php -q "%lib%cake.php" -working "%CD% " %*
+
+echo.
+
+exit /B %ERRORLEVEL%
View
33 app/Console/cake.php
@@ -0,0 +1,33 @@
+#!/usr/bin/php -q
+<?php
+/**
+ * Command-line code generation utility to automate programmer chores.
+ *
+ * PHP 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright 2005-2012, Cake Software Foundation, Inc.
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @package app.Console
+ * @since CakePHP(tm) v 2.0
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+$ds = DIRECTORY_SEPARATOR;
+$dispatcher = 'Cake' . $ds . 'Console' . $ds . 'ShellDispatcher.php';
+
+if (function_exists('ini_set')) {
+ $root = dirname(dirname(dirname(__FILE__)));
+ ini_set('include_path', $root . $ds. 'lib' . PATH_SEPARATOR . ini_get('include_path'));
+}
+
+if (!include($dispatcher)) {
+ trigger_error('Could not locate CakePHP core files.', E_USER_ERROR);
+}
+unset($paths, $path, $dispatcher, $root, $ds);
+
+return ShellDispatcher::run($argv);
View
35 app/Controller/AppController.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Application level Controller
+ *
+ * This file is application-wide controller file. You can put all
+ * application-wide controller-related methods here.
+ *
+ * PHP 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @package app.Controller
+ * @since CakePHP(tm) v 0.2.9
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+
+App::uses('Controller', 'Controller');
+
+/**
+ * Application Controller
+ *
+ * Add your application-wide methods in the class below, your controllers
+ * will inherit them.
+ *
+ * @package app.Controller
+ * @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller
+ */
+class AppController extends Controller {
+}
View
96 app/Controller/CategoriesController.php
@@ -0,0 +1,96 @@
+<?php
+App::uses('AppController', 'Controller');
+/**
+ * Categories Controller
+ *
+ * @property Category $Category
+ */
+class CategoriesController extends AppController {
+
+
+/**
+ * admin_index method
+ *
+ * @return void
+ */
+ public function admin_index() {
+ $this->Category->recursive = 0;
+ $this->set('categories', $this->paginate());
+ }
+
+/**
+ * admin_view method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_view($id = null) {
+ $this->Category->id = $id;
+ if (!$this->Category->exists()) {
+ throw new NotFoundException(__('Invalid category'));
+ }
+ $this->set('category', $this->Category->read(null, $id));
+ }
+
+/**
+ * admin_add method
+ *
+ * @return void
+ */
+ public function admin_add() {
+ if ($this->request->is('post')) {
+ $this->Category->create();
+ if ($this->Category->save($this->request->data)) {
+ $this->Session->setFlash(__('The category has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The category could not be saved. Please, try again.'));
+ }
+ }
+ }
+
+/**
+ * admin_edit method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_edit($id = null) {
+ $this->Category->id = $id;
+ if (!$this->Category->exists()) {
+ throw new NotFoundException(__('Invalid category'));
+ }
+ if ($this->request->is('post') || $this->request->is('put')) {
+ if ($this->Category->save($this->request->data)) {
+ $this->Session->setFlash(__('The category has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The category could not be saved. Please, try again.'));
+ }
+ } else {
+ $this->request->data = $this->Category->read(null, $id);
+ }
+ }
+
+/**
+ * admin_delete method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_delete($id = null) {
+ if (!$this->request->is('post')) {
+ throw new MethodNotAllowedException();
+ }
+ $this->Category->id = $id;
+ if (!$this->Category->exists()) {
+ throw new NotFoundException(__('Invalid category'));
+ }
+ if ($this->Category->delete()) {
+ $this->Session->setFlash(__('Category deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+ $this->Session->setFlash(__('Category was not deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+}
View
0  app/Controller/Component/empty
No changes.
View
181 app/Controller/PeopleController.php
@@ -0,0 +1,181 @@
+<?php
+App::uses('AppController', 'Controller');
+/**
+ * People Controller
+ *
+ * @property Person $Person
+ */
+class PeopleController extends AppController {
+
+
+/**
+ * index method
+ *
+ * @return void
+ */
+ public function index() {
+ $this->Person->recursive = 0;
+ $this->set('people', $this->paginate());
+ }
+
+/**
+ * view method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function view($id = null) {
+ $this->Person->id = $id;
+ if (!$this->Person->exists()) {
+ throw new NotFoundException(__('Invalid person'));
+ }
+ $this->set('person', $this->Person->read(null, $id));
+ }
+
+/**
+ * add method
+ *
+ * @return void
+ */
+ public function add() {
+ if ($this->request->is('post')) {
+ $this->Person->create();
+ if ($this->Person->save($this->request->data)) {
+ $this->Session->setFlash(__('The person has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The person could not be saved. Please, try again.'));
+ }
+ }
+ }
+
+/**
+ * edit method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function edit($id = null) {
+ $this->Person->id = $id;
+ if (!$this->Person->exists()) {
+ throw new NotFoundException(__('Invalid person'));
+ }
+ if ($this->request->is('post') || $this->request->is('put')) {
+ if ($this->Person->save($this->request->data)) {
+ $this->Session->setFlash(__('The person has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The person could not be saved. Please, try again.'));
+ }
+ } else {
+ $this->request->data = $this->Person->read(null, $id);
+ }
+ }
+
+/**
+ * delete method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function delete($id = null) {
+ if (!$this->request->is('post')) {
+ throw new MethodNotAllowedException();
+ }
+ $this->Person->id = $id;
+ if (!$this->Person->exists()) {
+ throw new NotFoundException(__('Invalid person'));
+ }
+ if ($this->Person->delete()) {
+ $this->Session->setFlash(__('Person deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+ $this->Session->setFlash(__('Person was not deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+/**
+ * admin_index method
+ *
+ * @return void
+ */
+ public function admin_index() {
+ $this->Person->recursive = 0;
+ $this->set('people', $this->paginate());
+ }
+
+/**
+ * admin_view method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_view($id = null) {
+ $this->Person->id = $id;
+ if (!$this->Person->exists()) {
+ throw new NotFoundException(__('Invalid person'));
+ }
+ $this->set('person', $this->Person->read(null, $id));
+ }
+
+/**
+ * admin_add method
+ *
+ * @return void
+ */
+ public function admin_add() {
+ if ($this->request->is('post')) {
+ $this->Person->create();
+ if ($this->Person->save($this->request->data)) {
+ $this->Session->setFlash(__('The person has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The person could not be saved. Please, try again.'));
+ }
+ }
+ }
+
+/**
+ * admin_edit method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_edit($id = null) {
+ $this->Person->id = $id;
+ if (!$this->Person->exists()) {
+ throw new NotFoundException(__('Invalid person'));
+ }
+ if ($this->request->is('post') || $this->request->is('put')) {
+ if ($this->Person->save($this->request->data)) {
+ $this->Session->setFlash(__('The person has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The person could not be saved. Please, try again.'));
+ }
+ } else {
+ $this->request->data = $this->Person->read(null, $id);
+ }
+ }
+
+/**
+ * admin_delete method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_delete($id = null) {
+ if (!$this->request->is('post')) {
+ throw new MethodNotAllowedException();
+ }
+ $this->Person->id = $id;
+ if (!$this->Person->exists()) {
+ throw new NotFoundException(__('Invalid person'));
+ }
+ if ($this->Person->delete()) {
+ $this->Session->setFlash(__('Person deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+ $this->Session->setFlash(__('Person was not deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+}
View
193 app/Controller/ProjectsController.php
@@ -0,0 +1,193 @@
+<?php
+App::uses('AppController', 'Controller');
+/**
+ * Projects Controller
+ *
+ * @property Project $Project
+ */
+class ProjectsController extends AppController {
+
+
+/**
+ * index method
+ *
+ * @return void
+ */
+ public function index() {
+ $this->Project->recursive = 0;
+ $this->set('projects', $this->paginate());
+ }
+
+/**
+ * view method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function view($id = null) {
+ $this->Project->id = $id;
+ if (!$this->Project->exists()) {
+ throw new NotFoundException(__('Invalid project'));
+ }
+ $this->set('project', $this->Project->read(null, $id));
+ }
+
+/**
+ * add method
+ *
+ * @return void
+ */
+ public function add() {
+ if ($this->request->is('post')) {
+ $this->Project->create();
+ if ($this->Project->save($this->request->data)) {
+ $this->Session->setFlash(__('The project has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The project could not be saved. Please, try again.'));
+ }
+ }
+ $categories = $this->Project->Category->find('list');
+ $regions = $this->Project->Region->find('list');
+ $this->set(compact('categories', 'regions'));
+ }
+
+/**
+ * edit method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function edit($id = null) {
+ $this->Project->id = $id;
+ if (!$this->Project->exists()) {
+ throw new NotFoundException(__('Invalid project'));
+ }
+ if ($this->request->is('post') || $this->request->is('put')) {
+ if ($this->Project->save($this->request->data)) {
+ $this->Session->setFlash(__('The project has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The project could not be saved. Please, try again.'));
+ }
+ } else {
+ $this->request->data = $this->Project->read(null, $id);
+ }
+ $categories = $this->Project->Category->find('list');
+ $regions = $this->Project->Region->find('list');
+ $this->set(compact('categories', 'regions'));
+ }
+
+/**
+ * delete method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function delete($id = null) {
+ if (!$this->request->is('post')) {
+ throw new MethodNotAllowedException();
+ }
+ $this->Project->id = $id;
+ if (!$this->Project->exists()) {
+ throw new NotFoundException(__('Invalid project'));
+ }
+ if ($this->Project->delete()) {
+ $this->Session->setFlash(__('Project deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+ $this->Session->setFlash(__('Project was not deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+/**
+ * admin_index method
+ *
+ * @return void
+ */
+ public function admin_index() {
+ $this->Project->recursive = 0;
+ $this->set('projects', $this->paginate());
+ }
+
+/**
+ * admin_view method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_view($id = null) {
+ $this->Project->id = $id;
+ if (!$this->Project->exists()) {
+ throw new NotFoundException(__('Invalid project'));
+ }
+ $this->set('project', $this->Project->read(null, $id));
+ }
+
+/**
+ * admin_add method
+ *
+ * @return void
+ */
+ public function admin_add() {
+ if ($this->request->is('post')) {
+ $this->Project->create();
+ if ($this->Project->save($this->request->data)) {
+ $this->Session->setFlash(__('The project has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The project could not be saved. Please, try again.'));
+ }
+ }
+ $categories = $this->Project->Category->find('list');
+ $regions = $this->Project->Region->find('list');
+ $this->set(compact('categories', 'regions'));
+ }
+
+/**
+ * admin_edit method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_edit($id = null) {
+ $this->Project->id = $id;
+ if (!$this->Project->exists()) {
+ throw new NotFoundException(__('Invalid project'));
+ }
+ if ($this->request->is('post') || $this->request->is('put')) {
+ if ($this->Project->save($this->request->data)) {
+ $this->Session->setFlash(__('The project has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The project could not be saved. Please, try again.'));
+ }
+ } else {
+ $this->request->data = $this->Project->read(null, $id);
+ }
+ $categories = $this->Project->Category->find('list');
+ $regions = $this->Project->Region->find('list');
+ $this->set(compact('categories', 'regions'));
+ }
+
+/**
+ * admin_delete method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_delete($id = null) {
+ if (!$this->request->is('post')) {
+ throw new MethodNotAllowedException();
+ }
+ $this->Project->id = $id;
+ if (!$this->Project->exists()) {
+ throw new NotFoundException(__('Invalid project'));
+ }
+ if ($this->Project->delete()) {
+ $this->Session->setFlash(__('Project deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+ $this->Session->setFlash(__('Project was not deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+}
View
96 app/Controller/RegionsController.php
@@ -0,0 +1,96 @@
+<?php
+App::uses('AppController', 'Controller');
+/**
+ * Regions Controller
+ *
+ * @property Region $Region
+ */
+class RegionsController extends AppController {
+
+
+/**
+ * admin_index method
+ *
+ * @return void
+ */
+ public function admin_index() {
+ $this->Region->recursive = 0;
+ $this->set('regions', $this->paginate());
+ }
+
+/**
+ * admin_view method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_view($id = null) {
+ $this->Region->id = $id;
+ if (!$this->Region->exists()) {
+ throw new NotFoundException(__('Invalid region'));
+ }
+ $this->set('region', $this->Region->read(null, $id));
+ }
+
+/**
+ * admin_add method
+ *
+ * @return void
+ */
+ public function admin_add() {
+ if ($this->request->is('post')) {
+ $this->Region->create();
+ if ($this->Region->save($this->request->data)) {
+ $this->Session->setFlash(__('The region has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The region could not be saved. Please, try again.'));
+ }
+ }
+ }
+
+/**
+ * admin_edit method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_edit($id = null) {
+ $this->Region->id = $id;
+ if (!$this->Region->exists()) {
+ throw new NotFoundException(__('Invalid region'));
+ }
+ if ($this->request->is('post') || $this->request->is('put')) {
+ if ($this->Region->save($this->request->data)) {
+ $this->Session->setFlash(__('The region has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The region could not be saved. Please, try again.'));
+ }
+ } else {
+ $this->request->data = $this->Region->read(null, $id);
+ }
+ }
+
+/**
+ * admin_delete method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_delete($id = null) {
+ if (!$this->request->is('post')) {
+ throw new MethodNotAllowedException();
+ }
+ $this->Region->id = $id;
+ if (!$this->Region->exists()) {
+ throw new NotFoundException(__('Invalid region'));
+ }
+ if ($this->Region->delete()) {
+ $this->Session->setFlash(__('Region deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+ $this->Session->setFlash(__('Region was not deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+}
View
96 app/Controller/RolesController.php
@@ -0,0 +1,96 @@
+<?php
+App::uses('AppController', 'Controller');
+/**
+ * Roles Controller
+ *
+ * @property Role $Role
+ */
+class RolesController extends AppController {
+
+
+/**
+ * admin_index method
+ *
+ * @return void
+ */
+ public function admin_index() {
+ $this->Role->recursive = 0;
+ $this->set('roles', $this->paginate());
+ }
+
+/**
+ * admin_view method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_view($id = null) {
+ $this->Role->id = $id;
+ if (!$this->Role->exists()) {
+ throw new NotFoundException(__('Invalid role'));
+ }
+ $this->set('role', $this->Role->read(null, $id));
+ }
+
+/**
+ * admin_add method
+ *
+ * @return void
+ */
+ public function admin_add() {
+ if ($this->request->is('post')) {
+ $this->Role->create();
+ if ($this->Role->save($this->request->data)) {
+ $this->Session->setFlash(__('The role has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The role could not be saved. Please, try again.'));
+ }
+ }
+ }
+
+/**
+ * admin_edit method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_edit($id = null) {
+ $this->Role->id = $id;
+ if (!$this->Role->exists()) {
+ throw new NotFoundException(__('Invalid role'));
+ }
+ if ($this->request->is('post') || $this->request->is('put')) {
+ if ($this->Role->save($this->request->data)) {
+ $this->Session->setFlash(__('The role has been saved'));
+ $this->redirect(array('action' => 'index'));
+ } else {
+ $this->Session->setFlash(__('The role could not be saved. Please, try again.'));
+ }
+ } else {
+ $this->request->data = $this->Role->read(null, $id);
+ }
+ }
+
+/**
+ * admin_delete method
+ *
+ * @param string $id
+ * @return void
+ */
+ public function admin_delete($id = null) {
+ if (!$this->request->is('post')) {
+ throw new MethodNotAllowedException();
+ }
+ $this->Role->id = $id;
+ if (!$this->Role->exists()) {
+ throw new NotFoundException(__('Invalid role'));
+ }
+ if ($this->Role->delete()) {
+ $this->Session->setFlash(__('Role deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+ $this->Session->setFlash(__('Role was not deleted'));
+ $this->redirect(array('action' => 'index'));
+ }
+}
View
0  app/Lib/empty
No changes.
View
0  app/Locale/eng/LC_MESSAGES/empty
No changes.
View
34 app/Model/AppModel.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Application model for Cake.
+ *
+ * This file is application-wide model file. You can put all
+ * application-wide model-related methods here.
+ *
+ * PHP 5
+ *
+ * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
+ * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ *
+ * Licensed under The MIT License
+ * Redistributions of files must retain the above copyright notice.
+ *
+ * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
+ * @link http://cakephp.org CakePHP(tm) Project
+ * @package app.Model
+ * @since CakePHP(tm) v 0.2.9
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
+ */
+
+App::uses('Model', 'Model');
+
+/**
+ * Application model for Cake.
+ *
+ * Add your application-wide methods in the class below, your models
+ * will inherit them.
+ *
+ * @package app.Model
+ */
+class AppModel extends Model {
+}
View
0  app/Model/Behavior/empty
No changes.
View
66 app/Model/Category.php
@@ -0,0 +1,66 @@
+<?php
+App::uses('AppModel', 'Model');
+/**
+ * Category Model
+ *
+ * @property Project $Project
+ */
+class Category extends AppModel {
+/**
+ * Display field
+ *
+ * @var string
+ */
+ public $displayField = 'name';
+/**
+ * Validation rules
+ *
+ * @var array
+ */
+ public $validate = array(
+ 'name' => array(
+ 'alphanumeric' => array(
+ 'rule' => array('alphanumeric'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'description' => array(
+ 'notempty' => array(
+ 'rule' => array('notempty'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ );
+
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+
+/**
+ * hasMany associations
+ *
+ * @var array
+ */
+ public $hasMany = array(
+ 'Project' => array(
+ 'className' => 'Project',
+ 'foreignKey' => 'category_id',
+ 'dependent' => false,
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => '',
+ 'limit' => '',
+ 'offset' => '',
+ 'exclusive' => '',
+ 'finderQuery' => '',
+ 'counterQuery' => ''
+ )
+ );
+
+}
View
0  app/Model/Datasource/empty
No changes.
View
71 app/Model/Discussion.php
@@ -0,0 +1,71 @@
+<?php
+App::uses('AppModel', 'Model');
+/**
+ * Discussion Model
+ *
+ * @property Person $Person
+ * @property Page $Page
+ */
+class Discussion extends AppModel {
+/**
+ * Validation rules
+ *
+ * @var array
+ */
+ public $validate = array(
+ 'post' => array(
+ 'y' => array(
+ 'rule' => array('y'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'person_id' => array(
+ 'numeric' => array(
+ 'rule' => array('numeric'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'page_id' => array(
+ 'numeric' => array(
+ 'rule' => array('numeric'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ );
+
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+
+/**
+ * belongsTo associations
+ *
+ * @var array
+ */
+ public $belongsTo = array(
+ 'Person' => array(
+ 'className' => 'Person',
+ 'foreignKey' => 'person_id',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ ),
+ 'Page' => array(
+ 'className' => 'Page',
+ 'foreignKey' => 'page_id',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ )
+ );
+}
View
49 app/Model/FundPage.php
@@ -0,0 +1,49 @@
+<?php
+App::uses('AppModel', 'Model');
+/**
+ * FundPage Model
+ *
+ * @property Page $Page
+ */
+class FundPage extends AppModel {
+/**
+ * Primary key field
+ *
+ * @var string
+ */
+ public $primaryKey = 'page_id';
+/**
+ * Validation rules
+ *
+ * @var array
+ */
+ public $validate = array(
+ 'page_id' => array(
+ 'numeric' => array(
+ 'rule' => array('numeric'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ );
+
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+
+/**
+ * belongsTo associations
+ *
+ * @var array
+ */
+ public $belongsTo = array(
+ 'Page' => array(
+ 'className' => 'Page',
+ 'foreignKey' => 'page_id',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ )
+ );
+}
View
49 app/Model/MainPage.php
@@ -0,0 +1,49 @@
+<?php
+App::uses('AppModel', 'Model');
+/**
+ * MainPage Model
+ *
+ * @property Page $Page
+ */
+class MainPage extends AppModel {
+/**
+ * Primary key field
+ *
+ * @var string
+ */
+ public $primaryKey = 'page_id';
+/**
+ * Validation rules
+ *
+ * @var array
+ */
+ public $validate = array(
+ 'page_id' => array(
+ 'numeric' => array(
+ 'rule' => array('numeric'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ );
+
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+
+/**
+ * belongsTo associations
+ *
+ * @var array
+ */
+ public $belongsTo = array(
+ 'Page' => array(
+ 'className' => 'Page',
+ 'foreignKey' => 'page_id',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ )
+ );
+}
View
157 app/Model/Page.php
@@ -0,0 +1,157 @@
+<?php
+App::uses('AppModel', 'Model');
+/**
+ * Page Model
+ *
+ * @property Project $Project
+ * @property Discussion $Discussion
+ * @property Permission $Permission
+ * @property Fund $Fund
+ * @property Main $Main
+ * @property Process $Process
+ */
+class Page extends AppModel {
+/**
+ * Validation rules
+ *
+ * @var array
+ */
+ public $validate = array(
+ 'path' => array(
+ 'notempty' => array(
+ 'rule' => array('notempty'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'version' => array(
+ 'notempty' => array(
+ 'rule' => array('notempty'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'project_id' => array(
+ 'numeric' => array(
+ 'rule' => array('numeric'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ );
+
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+
+/**
+ * belongsTo associations
+ *
+ * @var array
+ */
+ public $belongsTo = array(
+ 'Project' => array(
+ 'className' => 'Project',
+ 'foreignKey' => 'project_id',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ )
+ );
+
+/**
+ * hasMany associations
+ *
+ * @var array
+ */
+ public $hasMany = array(
+ 'Discussion' => array(
+ 'className' => 'Discussion',
+ 'foreignKey' => 'page_id',
+ 'dependent' => false,
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => '',
+ 'limit' => '',
+ 'offset' => '',
+ 'exclusive' => '',
+ 'finderQuery' => '',
+ 'counterQuery' => ''
+ ),
+ 'Permission' => array(
+ 'className' => 'Permission',
+ 'foreignKey' => 'page_id',
+ 'dependent' => false,
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => '',
+ 'limit' => '',
+ 'offset' => '',
+ 'exclusive' => '',
+ 'finderQuery' => '',
+ 'counterQuery' => ''
+ )
+ );
+
+
+/**
+ * hasAndBelongsToMany associations
+ *
+ * @var array
+ */
+ public $hasAndBelongsToMany = array(
+ 'Fund' => array(
+ 'className' => 'Fund',
+ 'joinTable' => 'fund_pages',
+ 'foreignKey' => 'page_id',
+ 'associationForeignKey' => 'fund_id',
+ 'unique' => 'keepExisting',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => '',
+ 'limit' => '',
+ 'offset' => '',
+ 'finderQuery' => '',
+ 'deleteQuery' => '',
+ 'insertQuery' => ''
+ ),
+ 'Main' => array(
+ 'className' => 'Main',
+ 'joinTable' => 'main_pages',
+ 'foreignKey' => 'page_id',
+ 'associationForeignKey' => 'main_id',
+ 'unique' => 'keepExisting',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => '',
+ 'limit' => '',
+ 'offset' => '',
+ 'finderQuery' => '',
+ 'deleteQuery' => '',
+ 'insertQuery' => ''
+ ),
+ 'Process' => array(
+ 'className' => 'Process',
+ 'joinTable' => 'process_pages',
+ 'foreignKey' => 'page_id',
+ 'associationForeignKey' => 'process_id',
+ 'unique' => 'keepExisting',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => '',
+ 'limit' => '',
+ 'offset' => '',
+ 'finderQuery' => '',
+ 'deleteQuery' => '',
+ 'insertQuery' => ''
+ )
+ );
+
+}
View
91 app/Model/Permission.php
@@ -0,0 +1,91 @@
+<?php
+App::uses('AppModel', 'Model');
+/**
+ * Permission Model
+ *
+ * @property Role $Role
+ * @property Page $Page
+ */
+class Permission extends AppModel {
+/**
+ * Validation rules
+ *
+ * @var array
+ */
+ public $validate = array(
+ 'role_id' => array(
+ 'numeric' => array(
+ 'rule' => array('numeric'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'page_id' => array(
+ 'numeric' => array(
+ 'rule' => array('numeric'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'read' => array(
+ 'boolean' => array(
+ 'rule' => array('boolean'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'write' => array(
+ 'boolean' => array(
+ 'rule' => array('boolean'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'post' => array(
+ 'boolean' => array(
+ 'rule' => array('boolean'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ );
+
+ //The Associations below have been created with all possible keys, those that are not needed can be removed
+
+/**
+ * belongsTo associations
+ *
+ * @var array
+ */
+ public $belongsTo = array(
+ 'Role' => array(
+ 'className' => 'Role',
+ 'foreignKey' => 'role_id',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ ),
+ 'Page' => array(
+ 'className' => 'Page',
+ 'foreignKey' => 'page_id',
+ 'conditions' => '',
+ 'fields' => '',
+ 'order' => ''
+ )
+ );
+}
View
134 app/Model/Person.php
@@ -0,0 +1,134 @@
+<?php
+App::uses('AppModel', 'Model');
+/**
+ * Person Model
+ *
+ * @property Discussion $Discussion
+ * @property ProjectMembership $ProjectMembership
+ */
+class Person extends AppModel {
+/**
+ * Validation rules
+ *
+ * @var array
+ */
+ public $validate = array(
+ 'email' => array(
+ 'email' => array(
+ 'rule' => array('email'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'password' => array(
+ 'notempty' => array(
+ 'rule' => array('notempty'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'firstname' => array(
+ 'notempty' => array(
+ 'rule' => array('notempty'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'lastname' => array(
+ 'notempty' => array(
+ 'rule' => array('notempty'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'age' => array(
+ 'numeric' => array(
+ 'rule' => array('numeric'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'phone_home' => array(
+ 'phone' => array(
+ 'rule' => array('phone'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'phone_cell' => array(
+ 'phone' => array(
+ 'rule' => array('phone'),
+ //'message' => 'Your custom message here',
+ //'allowEmpty' => false,
+ //'required' => false,
+ //'last' => false, // Stop validation after this rule
+ //'on' => 'create', // Limit validation to 'create' or 'update' operations
+ ),
+ ),
+ 'administrator' => array(