PageRenderTime 39ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/protected/config/main.php

https://bitbucket.org/zeroows/bugitor
PHP | 209 lines | 126 code | 31 blank | 52 comment | 0 complexity | 5f2498853762163912345b7a2c553070 MD5 | raw file
Possible License(s): GPL-3.0, BSD-3-Clause, AGPL-1.0, GPL-2.0, MIT, LGPL-2.1
  1. <?php
  2. /*
  3. * This file is part of
  4. * ____ _ __
  5. * / __ )__ ______ _(_) /_____ _____
  6. * / __ / / / / __ `/ / __/ __ \/ ___/
  7. * / /_/ / /_/ / /_/ / / /_/ /_/ / /
  8. * /_____/\__,_/\__, /_/\__/\____/_/
  9. * /____/
  10. * A Yii powered issue tracker
  11. * http://bitbucket.org/jacmoe/bugitor/
  12. *
  13. * Copyright (C) 2009 - 2013 Bugitor Team
  14. *
  15. * Permission is hereby granted, free of charge, to any person
  16. * obtaining a copy of this software and associated documentation files
  17. * (the "Software"), to deal in the Software without restriction,
  18. * including without limitation the rights to use, copy, modify, merge,
  19. * publish, distribute, sublicense, and/or sell copies of the Software,
  20. * and to permit persons to whom the Software is furnished to do so,
  21. * subject to the following conditions:
  22. * The above copyright notice and this permission notice shall be included
  23. * in all copies or substantial portions of the Software.
  24. *
  25. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  26. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  27. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  28. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  29. * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
  30. * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
  31. * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  32. */
  33. ?>
  34. <?php
  35. // uncomment the following to define a path alias
  36. // Yii::setPathOfAlias('local','path/to/local-folder');
  37. // This is the main Web application configuration. Any writable
  38. // CWebApplication properties can be configured here.
  39. return array(
  40. 'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
  41. 'name' => 'Bugitor Issue Tracker',
  42. 'theme' => 'bootstrap',
  43. 'defaultController' => 'site',
  44. 'sourceLanguage' => 'en_gb',
  45. 'language' => 'en_US',
  46. 'preload' => array('log', 'maintenanceMode', 'bootstrap'),
  47. 'import' => array(
  48. 'application.models.*',
  49. 'application.components.*',
  50. 'application.components.textile.*',
  51. 'application.components.scm.*',
  52. 'application.modules.user.models.*',
  53. 'application.modules.user.components.*',
  54. 'application.modules.rights.components.*',
  55. 'application.helpers.*',
  56. 'application.widgets.*',
  57. 'ext.simpleWorkflow.*',
  58. 'ext.editable.*',
  59. 'ext.yii-mail.YiiMailMessage',
  60. ),
  61. 'modules' => array(
  62. 'admin',
  63. 'rights' => array(
  64. 'install' => false,
  65. 'appLayout'=>'application.modules.admin.views.layouts.main',
  66. ),
  67. 'user' => array(
  68. 'returnLogoutUrl' => array('/project/index'),
  69. 'returnUrl' => array('/site/index'),
  70. ),
  71. ),
  72. // application components
  73. 'components' => array(
  74. 'user' => array(
  75. // enable cookie-based authentication
  76. 'class' => 'RWebUser',
  77. 'allowAutoLogin' => true,
  78. 'loginUrl' => array('/user/login'),
  79. ),
  80. 'assetManager'=>array(
  81. // change the path on disk
  82. 'basePath' => dirname(__FILE__).'/../../yiiassets',
  83. 'baseUrl' => '/yiiassets',
  84. ),
  85. 'db' => require(dirname(__FILE__) . '/db.php'),
  86. 'bootstrap' => array(
  87. 'class' => 'ext.yiibooster.components.Bootstrap',
  88. 'responsiveCss' => false,
  89. 'coreCss' => false,
  90. 'yiiCss' => false,
  91. ),
  92. 'mail' => require(dirname(__FILE__) . '/mail.php'),
  93. 'log'=>array(
  94. 'class'=>'CLogRouter',
  95. 'routes'=>array(
  96. array(
  97. 'class'=>'CFileLogRoute',
  98. 'levels'=>'trace, info',
  99. 'categories'=>'bugitor.*',
  100. ),
  101. array(
  102. 'class'=>'CFileLogRoute',
  103. 'levels'=>'error, warning',
  104. ),
  105. ),
  106. ),
  107. 'textile' => array(
  108. 'class' => 'application.components.textile.Textilizer',
  109. ),
  110. 'mutex' => array(
  111. 'class' => 'ext.EMutex',
  112. ),
  113. 'file' => array(
  114. 'class' => 'ext.CFile',
  115. ),
  116. 'scm' => array(
  117. 'class' => 'SCM',
  118. ),
  119. 'maintenanceMode' => array(
  120. 'class' => 'ext.MaintenanceMode.MaintenanceMode',
  121. 'enabledMode' => file_exists(dirname(__FILE__).'/.maintenance'),
  122. 'message' => 'This site is currently undergoing maintenance. It should be up and running pretty soon.<br/>Thanks for your patience.',
  123. // allowed users
  124. 'users' => array('jacmoe', ),
  125. // allowed roles
  126. //'roles' => array('Administrator', ),
  127. ),
  128. 'config' => array(
  129. 'class' => 'application.extensions.EConfig',
  130. 'configTableName' => '{{config}}',
  131. 'autoCreateConfigTable' => false,
  132. 'strictMode' => false,
  133. ),
  134. 'cache' => array(
  135. 'class' => 'system.caching.CFileCache',
  136. ),
  137. 'swSource' => array(
  138. 'class' => 'application.extensions.simpleWorkflow.SWPhpWorkflowSource',
  139. ),
  140. 'timezonekeeper' => array (
  141. 'class' => 'application.components.TimeZoneKeeper',
  142. ),
  143. 'gravatar' => array (
  144. 'class' => 'application.helpers.Gravatar',
  145. ),
  146. 'authManager' => array(
  147. // The authorization manager (default: CDbAuthManager)
  148. 'class' => 'RDbAuthManager',
  149. // The database component used
  150. 'connectionID' => 'db',
  151. // The itemTable name (default: AuthItem)
  152. 'itemTable' => '{{auth_item}}',
  153. // The assignmentTable name (default: AuthAssignment)
  154. 'assignmentTable' => '{{auth_assignment}}',
  155. // The itemChildTable name (default: AuthItemChild)
  156. 'itemChildTable' => '{{auth_item_child}}',
  157. // The itemWeightTable (default: AuthItemWeight)
  158. 'rightsTable' => '{{auth_item_weight}}',
  159. ),
  160. 'urlManager' => array(
  161. 'urlFormat' => 'path',
  162. 'showScriptName' => false,
  163. 'rules' => require(dirname(__FILE__) . '/url_rules.php'),
  164. ),
  165. 'errorHandler' => array(
  166. // use 'site/error' action to display errors
  167. 'errorAction' => 'site/error',
  168. ),
  169. ),
  170. // application-level parameters that can be accessed
  171. // using Yii::app()->params['paramName']
  172. 'params' => array(
  173. // this is used in contact page
  174. //'adminEmail' => 'jacmoe@mail.dk',
  175. 'adminEmail' => 'tracker@tracker.ogitor.org',
  176. 'adminEmailText' => 'Bugitor Issue Tracker',
  177. ),
  178. );