PageRenderTime 38ms CodeModel.GetById 29ms app.highlight 2ms RepoModel.GetById 2ms 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
  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
 36// uncomment the following to define a path alias
 37// Yii::setPathOfAlias('local','path/to/local-folder');
 38// This is the main Web application configuration. Any writable
 39// CWebApplication properties can be configured here.
 40
 41return array(
 42    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
 43
 44    'name' => 'Bugitor Issue Tracker',
 45    'theme' => 'bootstrap',
 46
 47    'defaultController' => 'site',
 48
 49    'sourceLanguage' => 'en_gb',
 50    'language' => 'en_US',
 51
 52    'preload' => array('log', 'maintenanceMode', 'bootstrap'),
 53
 54    'import' => array(
 55        'application.models.*',
 56        'application.components.*',
 57        'application.components.textile.*',
 58        'application.components.scm.*',
 59        'application.modules.user.models.*',
 60        'application.modules.user.components.*',
 61        'application.modules.rights.components.*',
 62        'application.helpers.*',
 63        'application.widgets.*',
 64        'ext.simpleWorkflow.*',
 65        'ext.editable.*',
 66        'ext.yii-mail.YiiMailMessage',
 67    ),
 68
 69    'modules' => array(
 70
 71        'admin',
 72
 73        'rights' => array(
 74            'install' => false,
 75            'appLayout'=>'application.modules.admin.views.layouts.main',
 76        ),
 77
 78        'user' => array(
 79            'returnLogoutUrl' => array('/project/index'),
 80            'returnUrl' => array('/site/index'),
 81        ),
 82    ),
 83
 84    // application components
 85    'components' => array(
 86
 87        'user' => array(
 88            // enable cookie-based authentication
 89            'class' => 'RWebUser',
 90            'allowAutoLogin' => true,
 91            'loginUrl' => array('/user/login'),
 92        ),
 93
 94       'assetManager'=>array(
 95            // change the path on disk
 96            'basePath' => dirname(__FILE__).'/../../yiiassets',
 97            'baseUrl' => '/yiiassets',
 98        ),
 99
100        'db' => require(dirname(__FILE__) . '/db.php'),
101
102        'bootstrap' => array(
103            'class' => 'ext.yiibooster.components.Bootstrap',
104            'responsiveCss' => false,
105            'coreCss' => false,
106            'yiiCss' => false,
107        ),
108
109        'mail' => require(dirname(__FILE__) . '/mail.php'),
110
111        'log'=>array(
112            'class'=>'CLogRouter',
113            'routes'=>array(
114                array(
115                    'class'=>'CFileLogRoute',
116                    'levels'=>'trace, info',
117                    'categories'=>'bugitor.*',
118                ),
119                array(
120                    'class'=>'CFileLogRoute',
121                    'levels'=>'error, warning',
122                ),
123            ),
124        ),
125
126        'textile' => array(
127            'class' => 'application.components.textile.Textilizer',
128        ),
129
130        'mutex' => array(
131            'class' => 'ext.EMutex',
132        ),
133
134        'file' => array(
135            'class' => 'ext.CFile',
136        ),
137
138        'scm' => array(
139            'class' => 'SCM',
140        ),
141
142        'maintenanceMode' => array(
143            'class' => 'ext.MaintenanceMode.MaintenanceMode',
144            'enabledMode' => file_exists(dirname(__FILE__).'/.maintenance'),
145            'message' => 'This site is currently undergoing maintenance. It should be up and running pretty soon.<br/>Thanks for your patience.',
146            // allowed users
147            'users' => array('jacmoe', ),
148            // allowed roles
149            //'roles' => array('Administrator', ),
150        ),
151
152        'config' => array(
153            'class' => 'application.extensions.EConfig',
154            'configTableName' => '{{config}}',
155            'autoCreateConfigTable' => false,
156            'strictMode' => false,
157        ),
158
159        'cache' => array(
160            'class' => 'system.caching.CFileCache',
161        ),
162
163        'swSource' => array(
164            'class' => 'application.extensions.simpleWorkflow.SWPhpWorkflowSource',
165        ),
166
167        'timezonekeeper' => array (
168            'class' => 'application.components.TimeZoneKeeper',
169        ),
170
171        'gravatar' => array (
172            'class' => 'application.helpers.Gravatar',
173        ),
174
175        'authManager' => array(
176            // The authorization manager (default: CDbAuthManager)
177            'class' => 'RDbAuthManager',
178            // The database component used
179            'connectionID' => 'db',
180            // The itemTable name (default: AuthItem)
181            'itemTable' => '{{auth_item}}',
182            // The assignmentTable name (default: AuthAssignment)
183            'assignmentTable' => '{{auth_assignment}}',
184            // The itemChildTable name (default: AuthItemChild)
185            'itemChildTable' => '{{auth_item_child}}',
186            // The itemWeightTable (default: AuthItemWeight)
187            'rightsTable' => '{{auth_item_weight}}',
188        ),
189
190        'urlManager' => array(
191            'urlFormat' => 'path',
192            'showScriptName' => false,
193            'rules' => require(dirname(__FILE__) . '/url_rules.php'),
194        ),
195
196        'errorHandler' => array(
197            // use 'site/error' action to display errors
198            'errorAction' => 'site/error',
199        ),
200    ),
201    // application-level parameters that can be accessed
202    // using Yii::app()->params['paramName']
203    'params' => array(
204        // this is used in contact page
205        //'adminEmail' => 'jacmoe@mail.dk',
206        'adminEmail' => 'tracker@tracker.ogitor.org',
207        'adminEmailText' => 'Bugitor Issue Tracker',
208    ),
209);