@@ -37,14 +37,14 @@ |
||
37 | 37 | |
38 | 38 | // Core path for CakePHP 2 via composer |
39 | 39 | if (!defined('CAKE_CORE_INCLUDE_PATH')) { |
40 | - define( |
|
41 | - 'CAKE_CORE_INCLUDE_PATH', |
|
42 | - ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'pear-pear.cakephp.org' . DS . 'CakePHP' |
|
43 | - ); |
|
40 | + define( |
|
41 | + 'CAKE_CORE_INCLUDE_PATH', |
|
42 | + ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'pear-pear.cakephp.org' . DS . 'CakePHP' |
|
43 | + ); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | if (!defined('CAKE_CORE_INCLUDE_PATH')) { |
47 | - define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); |
|
47 | + define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib'); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | require APP_DIR . DS . WEBROOT_DIR . DS . 'index.php'; |
@@ -22,66 +22,66 @@ discard block |
||
22 | 22 | * @license http://www.opensource.org/licenses/mit-license.php MIT License |
23 | 23 | */ |
24 | 24 | |
25 | - if (Configure::read('Saito.installed')) { |
|
26 | - /** |
|
27 | - * Default route |
|
28 | - */ |
|
29 | - Router::connect( |
|
30 | - '/', |
|
31 | - ['controller' => 'entries', 'action' => 'index'] |
|
32 | - ); |
|
33 | - } else { |
|
34 | - /** |
|
35 | - * installer route |
|
36 | - */ |
|
37 | - Router::connect( |
|
38 | - '/', |
|
39 | - ['plugin' => 'install', 'controller' => 'install', 'action' => 'index'] |
|
40 | - ); |
|
41 | - } |
|
25 | + if (Configure::read('Saito.installed')) { |
|
26 | + /** |
|
27 | + * Default route |
|
28 | + */ |
|
29 | + Router::connect( |
|
30 | + '/', |
|
31 | + ['controller' => 'entries', 'action' => 'index'] |
|
32 | + ); |
|
33 | + } else { |
|
34 | + /** |
|
35 | + * installer route |
|
36 | + */ |
|
37 | + Router::connect( |
|
38 | + '/', |
|
39 | + ['plugin' => 'install', 'controller' => 'install', 'action' => 'index'] |
|
40 | + ); |
|
41 | + } |
|
42 | 42 | |
43 | - /** |
|
44 | - * /users/login -> /login |
|
45 | - */ |
|
46 | - Router::connect('/login', ['controller' => 'users', 'action' => 'login']); |
|
43 | + /** |
|
44 | + * /users/login -> /login |
|
45 | + */ |
|
46 | + Router::connect('/login', ['controller' => 'users', 'action' => 'login']); |
|
47 | 47 | |
48 | 48 | |
49 | - /** |
|
50 | - * ...and connect the rest of 'Pages' controller's urls. |
|
51 | - */ |
|
52 | - Router::connect('/pages/*', ['controller' => 'pages', 'action' => 'display']); |
|
49 | + /** |
|
50 | + * ...and connect the rest of 'Pages' controller's urls. |
|
51 | + */ |
|
52 | + Router::connect('/pages/*', ['controller' => 'pages', 'action' => 'display']); |
|
53 | 53 | |
54 | - /** |
|
55 | - * Admin Route |
|
56 | - */ |
|
57 | - Router::connect('/admin', |
|
58 | - ['controller' => 'admins', 'action' => 'index', 'admin' => true]); |
|
59 | - Router::connect( |
|
60 | - '/admin/plugins', |
|
61 | - ['controller' => 'admins', 'action' => 'plugins', 'admin' => true] |
|
62 | - ); |
|
54 | + /** |
|
55 | + * Admin Route |
|
56 | + */ |
|
57 | + Router::connect('/admin', |
|
58 | + ['controller' => 'admins', 'action' => 'index', 'admin' => true]); |
|
59 | + Router::connect( |
|
60 | + '/admin/plugins', |
|
61 | + ['controller' => 'admins', 'action' => 'plugins', 'admin' => true] |
|
62 | + ); |
|
63 | 63 | |
64 | - /** |
|
65 | - * Default search action |
|
66 | - */ |
|
67 | - Router::connect('/searches', |
|
68 | - ['controller' => 'searches', 'action' => 'simple']); |
|
64 | + /** |
|
65 | + * Default search action |
|
66 | + */ |
|
67 | + Router::connect('/searches', |
|
68 | + ['controller' => 'searches', 'action' => 'simple']); |
|
69 | 69 | |
70 | - /** |
|
71 | - * Dynamic Assets |
|
72 | - */ |
|
73 | - Router::connect('/da/:action/*', ['controller' => 'DynamicAssets']); |
|
70 | + /** |
|
71 | + * Dynamic Assets |
|
72 | + */ |
|
73 | + Router::connect('/da/:action/*', ['controller' => 'DynamicAssets']); |
|
74 | 74 | |
75 | - /** |
|
76 | - * Sitemaps |
|
77 | - */ |
|
78 | - Router::connect('/sitemap', ['plugin' => 'sitemap', 'controller' => 'sitemaps']); |
|
79 | - Router::connect('/sitemaps/:action/*', ['plugin' => 'sitemap', 'controller' => 'sitemaps']); |
|
75 | + /** |
|
76 | + * Sitemaps |
|
77 | + */ |
|
78 | + Router::connect('/sitemap', ['plugin' => 'sitemap', 'controller' => 'sitemaps']); |
|
79 | + Router::connect('/sitemaps/:action/*', ['plugin' => 'sitemap', 'controller' => 'sitemaps']); |
|
80 | 80 | |
81 | - /** |
|
82 | - * Pagination for entries/index |
|
83 | - */ |
|
84 | - /* |
|
81 | + /** |
|
82 | + * Pagination for entries/index |
|
83 | + */ |
|
84 | + /* |
|
85 | 85 | Router::connect( |
86 | 86 | '/entries/index/*', |
87 | 87 | array('controller' => 'entries', 'action' => 'index'), |
@@ -90,19 +90,19 @@ discard block |
||
90 | 90 | * |
91 | 91 | */ |
92 | 92 | |
93 | - /** |
|
94 | - * RSS & JSON setup |
|
95 | - */ |
|
96 | - Router::parseExtensions('rss', 'json', 'xml'); |
|
93 | + /** |
|
94 | + * RSS & JSON setup |
|
95 | + */ |
|
96 | + Router::parseExtensions('rss', 'json', 'xml'); |
|
97 | 97 | |
98 | - /** |
|
99 | - * Load all plugin routes. See the CakePlugin documentation on |
|
100 | - * how to customize the loading of plugin routes. |
|
101 | - */ |
|
102 | - CakePlugin::routes(); |
|
98 | + /** |
|
99 | + * Load all plugin routes. See the CakePlugin documentation on |
|
100 | + * how to customize the loading of plugin routes. |
|
101 | + */ |
|
102 | + CakePlugin::routes(); |
|
103 | 103 | |
104 | - /** |
|
105 | - * Load the CakePHP default routes. Only remove this if you do not want to use |
|
106 | - * the built-in default routes. |
|
107 | - */ |
|
108 | - require CAKE . 'Config' . DS . 'routes.php'; |
|
104 | + /** |
|
105 | + * Load the CakePHP default routes. Only remove this if you do not want to use |
|
106 | + * the built-in default routes. |
|
107 | + */ |
|
108 | + require CAKE . 'Config' . DS . 'routes.php'; |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | - Configure::write('Saito.v', '4.10.0'); |
|
2 | + Configure::write('Saito.v', '4.10.0'); |
|
3 | 3 | |
4 | - Configure::write('Saito.saitoHomepage', 'http://saito.siezi.com'); |
|
4 | + Configure::write('Saito.saitoHomepage', 'http://saito.siezi.com'); |
@@ -1,60 +1,60 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | - /** |
|
4 | - * Saito Enduser Configuration |
|
5 | - */ |
|
3 | + /** |
|
4 | + * Saito Enduser Configuration |
|
5 | + */ |
|
6 | 6 | |
7 | - /** |
|
8 | - * Setting default language (mandatory) |
|
9 | - * |
|
10 | - * Use ISO 639-2 Code http://www.loc.gov/standards/iso639-2/php/code_list.php |
|
11 | - * So german would be: deu |
|
12 | - */ |
|
13 | - Configure::write('Config.language', 'eng'); |
|
7 | + /** |
|
8 | + * Setting default language (mandatory) |
|
9 | + * |
|
10 | + * Use ISO 639-2 Code http://www.loc.gov/standards/iso639-2/php/code_list.php |
|
11 | + * So german would be: deu |
|
12 | + */ |
|
13 | + Configure::write('Config.language', 'eng'); |
|
14 | 14 | |
15 | - /** |
|
16 | - * Sets the markup parser |
|
17 | - * |
|
18 | - * Parser hould be placed in app/Plugin/<name>Parser |
|
19 | - */ |
|
20 | - Configure::write('Saito.Settings.ParserPlugin', 'Bbcode'); |
|
15 | + /** |
|
16 | + * Sets the markup parser |
|
17 | + * |
|
18 | + * Parser hould be placed in app/Plugin/<name>Parser |
|
19 | + */ |
|
20 | + Configure::write('Saito.Settings.ParserPlugin', 'Bbcode'); |
|
21 | 21 | |
22 | - /** |
|
23 | - * Sets the default theme |
|
24 | - */ |
|
25 | - Configure::write('Saito.themes.default', 'Paz'); |
|
22 | + /** |
|
23 | + * Sets the default theme |
|
24 | + */ |
|
25 | + Configure::write('Saito.themes.default', 'Paz'); |
|
26 | 26 | |
27 | - /** |
|
28 | - * Sets additional themes available for all users |
|
29 | - * |
|
30 | - * `*` - all installed themes (in Themed folder) |
|
31 | - * `['A', 'B']` - only themes 'A' and 'B' (Themed folder names) |
|
32 | - */ |
|
33 | - // Configure::write('Saito.themes.available.all', '*'); |
|
27 | + /** |
|
28 | + * Sets additional themes available for all users |
|
29 | + * |
|
30 | + * `*` - all installed themes (in Themed folder) |
|
31 | + * `['A', 'B']` - only themes 'A' and 'B' (Themed folder names) |
|
32 | + */ |
|
33 | + // Configure::write('Saito.themes.available.all', '*'); |
|
34 | 34 | |
35 | - /** |
|
36 | - * Sets additional themes available for specific users only |
|
37 | - * |
|
38 | - * [<user-id> => '<theme name>', …] |
|
39 | - */ |
|
40 | - // Configure::write('Saito.themes.available.users', [1 => ['C']]); |
|
35 | + /** |
|
36 | + * Sets additional themes available for specific users only |
|
37 | + * |
|
38 | + * [<user-id> => '<theme name>', …] |
|
39 | + */ |
|
40 | + // Configure::write('Saito.themes.available.users', [1 => ['C']]); |
|
41 | 41 | |
42 | - /** |
|
43 | - * Sets the X-Frame-Options header send with each request |
|
44 | - */ |
|
45 | - Configure::write('Saito.X-Frame-Options', 'SAMEORIGIN'); |
|
42 | + /** |
|
43 | + * Sets the X-Frame-Options header send with each request |
|
44 | + */ |
|
45 | + Configure::write('Saito.X-Frame-Options', 'SAMEORIGIN'); |
|
46 | 46 | |
47 | - /** |
|
48 | - * Add additional buttons to editor |
|
49 | - * |
|
50 | - * You can theme them with |
|
51 | - * |
|
52 | - * <code> |
|
53 | - * .markItUp .markItUpButton<Id> a { |
|
54 | - * … |
|
55 | - * } |
|
56 | - * </code> |
|
57 | - * |
|
47 | + /** |
|
48 | + * Add additional buttons to editor |
|
49 | + * |
|
50 | + * You can theme them with |
|
51 | + * |
|
52 | + * <code> |
|
53 | + * .markItUp .markItUpButton<Id> a { |
|
54 | + * … |
|
55 | + * } |
|
56 | + * </code> |
|
57 | + * |
|
58 | 58 | /* |
59 | 59 | Configure::write( |
60 | 60 | 'Saito.markItUp.additionalButtons', |
@@ -75,23 +75,23 @@ discard block |
||
75 | 75 | // image in img/markitup/<replacement> |
76 | 76 | 'replacement' => 'resultofbutton1.png' |
77 | 77 | ), |
78 | - * // … |
|
78 | + * // … |
|
79 | 79 | ) |
80 | 80 | ); |
81 | - * |
|
82 | - */ |
|
81 | + * |
|
82 | + */ |
|
83 | 83 | |
84 | - /** |
|
85 | - * Users to notify via email if a new users registers successfully |
|
86 | - * |
|
87 | - * Provide an array with user IDs. To notify the admin (usually user-id 1): |
|
88 | - * |
|
89 | - * [1] |
|
90 | - * |
|
91 | - * To notify the admin with id 1 and the user with the id 5: |
|
92 | - * |
|
93 | - * [1, 5] |
|
94 | - */ |
|
95 | - /* |
|
84 | + /** |
|
85 | + * Users to notify via email if a new users registers successfully |
|
86 | + * |
|
87 | + * Provide an array with user IDs. To notify the admin (usually user-id 1): |
|
88 | + * |
|
89 | + * [1] |
|
90 | + * |
|
91 | + * To notify the admin with id 1 and the user with the id 5: |
|
92 | + * |
|
93 | + * [1, 5] |
|
94 | + */ |
|
95 | + /* |
|
96 | 96 | Configure::write('Saito.Notification.userActivatedAdminNoticeToUserWithID', [1]); |
97 | 97 | */ |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * In production mode, flash messages redirect after a time interval. |
34 | 34 | * In development mode, you need to click the flash message to continue. |
35 | 35 | */ |
36 | - Configure::write('debug', 0); |
|
36 | + Configure::write('debug', 0); |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * Configure the Error handler used to handle errors for your application. By default |
@@ -50,11 +50,11 @@ discard block |
||
50 | 50 | * |
51 | 51 | * @see ErrorHandler for more information on error handling and configuration. |
52 | 52 | */ |
53 | - Configure::write('Error', array( |
|
54 | - 'handler' => 'ErrorHandler::handleError', |
|
55 | - 'level' => E_ALL & ~E_DEPRECATED, |
|
56 | - 'trace' => true |
|
57 | - )); |
|
53 | + Configure::write('Error', array( |
|
54 | + 'handler' => 'ErrorHandler::handleError', |
|
55 | + 'level' => E_ALL & ~E_DEPRECATED, |
|
56 | + 'trace' => true |
|
57 | + )); |
|
58 | 58 | |
59 | 59 | /** |
60 | 60 | * Configure the Exception handler used for uncaught exceptions. By default, |
@@ -76,16 +76,16 @@ discard block |
||
76 | 76 | * |
77 | 77 | * @see ErrorHandler for more information on exception handling and configuration. |
78 | 78 | */ |
79 | - Configure::write('Exception', array( |
|
80 | - 'handler' => 'ErrorHandler::handleException', |
|
81 | - 'renderer' => 'ExceptionRenderer', |
|
82 | - 'log' => true |
|
83 | - )); |
|
79 | + Configure::write('Exception', array( |
|
80 | + 'handler' => 'ErrorHandler::handleException', |
|
81 | + 'renderer' => 'ExceptionRenderer', |
|
82 | + 'log' => true |
|
83 | + )); |
|
84 | 84 | |
85 | 85 | /** |
86 | 86 | * Application wide charset encoding |
87 | 87 | */ |
88 | - Configure::write('App.encoding', 'UTF-8'); |
|
88 | + Configure::write('App.encoding', 'UTF-8'); |
|
89 | 89 | |
90 | 90 | /** |
91 | 91 | * To configure CakePHP *not* to use mod_rewrite and to |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * included primarily as a development convenience - and |
107 | 107 | * thus not recommended for production applications. |
108 | 108 | */ |
109 | - //Configure::write('App.baseUrl', env('SCRIPT_NAME')); |
|
109 | + //Configure::write('App.baseUrl', env('SCRIPT_NAME')); |
|
110 | 110 | |
111 | 111 | /** |
112 | 112 | * To configure CakePHP to use a particular domain URL |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | * will override the automatic detection of full base URL and can be |
116 | 116 | * useful when generating links from the CLI (e.g. sending emails) |
117 | 117 | */ |
118 | - //Configure::write('App.fullBaseURL', 'http://example.com'); |
|
118 | + //Configure::write('App.fullBaseURL', 'http://example.com'); |
|
119 | 119 | |
120 | 120 | /** |
121 | 121 | * Uncomment the define below to use CakePHP prefix routes. |
@@ -133,12 +133,12 @@ discard block |
||
133 | 133 | * `manager_index()` and `/manager/controller/index` |
134 | 134 | * |
135 | 135 | */ |
136 | - Configure::write('Routing.prefixes', array('admin')); |
|
136 | + Configure::write('Routing.prefixes', array('admin')); |
|
137 | 137 | /** |
138 | - * Turn off all caching application-wide. |
|
139 | - * |
|
140 | - */ |
|
141 | - //Configure::write('Cache.disable', true); |
|
138 | + * Turn off all caching application-wide. |
|
139 | + * |
|
140 | + */ |
|
141 | + //Configure::write('Cache.disable', true); |
|
142 | 142 | |
143 | 143 | /** |
144 | 144 | * Enable cache checking. |
@@ -149,13 +149,13 @@ discard block |
||
149 | 149 | * or in each action using $this->cacheAction = true. |
150 | 150 | * |
151 | 151 | */ |
152 | - //Configure::write('Cache.check', true); |
|
152 | + //Configure::write('Cache.check', true); |
|
153 | 153 | |
154 | 154 | /** |
155 | 155 | * Defines the default error type when using the log() function. Used for |
156 | 156 | * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG. |
157 | 157 | */ |
158 | - define('LOG_ERROR', LOG_ERR); |
|
158 | + define('LOG_ERROR', LOG_ERR); |
|
159 | 159 | |
160 | 160 | /** |
161 | 161 | * Session configuration. |
@@ -194,20 +194,20 @@ discard block |
||
194 | 194 | * the cake shell command: cake schema create Sessions |
195 | 195 | * |
196 | 196 | */ |
197 | - Configure::write('Session', array( |
|
198 | - 'defaults' => 'php', |
|
199 | - 'cookie' => 'Saito', |
|
200 | - )); |
|
197 | + Configure::write('Session', array( |
|
198 | + 'defaults' => 'php', |
|
199 | + 'cookie' => 'Saito', |
|
200 | + )); |
|
201 | 201 | |
202 | 202 | /** |
203 | 203 | * A random string used in security hashing methods. |
204 | 204 | */ |
205 | - Configure::write('Security.salt', 'shouldBeAtLeast22CharsLongNoUnderscores'); |
|
205 | + Configure::write('Security.salt', 'shouldBeAtLeast22CharsLongNoUnderscores'); |
|
206 | 206 | |
207 | 207 | /** |
208 | 208 | * A random numeric string (digits only) used to encrypt/decrypt strings. |
209 | 209 | */ |
210 | - Configure::write('Security.cipherSeed', '0123456789'); |
|
210 | + Configure::write('Security.cipherSeed', '0123456789'); |
|
211 | 211 | |
212 | 212 | /** |
213 | 213 | * Apply timestamps with the last modified time to static assets (js, css, images). |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | * Set to `true` to apply timestamps when debug > 0. Set to 'force' to always enable |
218 | 218 | * timestamping regardless of debug value. |
219 | 219 | */ |
220 | - Configure::write('Asset.timestamp', 'force'); |
|
220 | + Configure::write('Asset.timestamp', 'force'); |
|
221 | 221 | |
222 | 222 | /** |
223 | 223 | * Compress CSS output by removing comments, whitespace, repeating tags, etc. |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | * |
227 | 227 | * To use, prefix the CSS link URL with '/ccss/' instead of '/css/' or use HtmlHelper::css(). |
228 | 228 | */ |
229 | - //Configure::write('Asset.filter.css', 'css.php'); |
|
229 | + //Configure::write('Asset.filter.css', 'css.php'); |
|
230 | 230 | |
231 | 231 | /** |
232 | 232 | * Plug in your own custom JavaScript compressor by dropping a script in your webroot to handle the |
@@ -234,20 +234,20 @@ discard block |
||
234 | 234 | * |
235 | 235 | * To use, prefix your JavaScript link URLs with '/cjs/' instead of '/js/' or use JavaScriptHelper::link(). |
236 | 236 | */ |
237 | - //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php'); |
|
237 | + //Configure::write('Asset.filter.js', 'custom_javascript_output_filter.php'); |
|
238 | 238 | |
239 | 239 | /** |
240 | 240 | * The class name and database used in CakePHP's |
241 | 241 | * access control lists. |
242 | 242 | */ |
243 | - Configure::write('Acl.classname', 'DbAcl'); |
|
244 | - Configure::write('Acl.database', 'default'); |
|
243 | + Configure::write('Acl.classname', 'DbAcl'); |
|
244 | + Configure::write('Acl.database', 'default'); |
|
245 | 245 | |
246 | 246 | /** |
247 | 247 | * Uncomment this line and correct your server timezone to fix |
248 | 248 | * any date & time related errors. |
249 | 249 | */ |
250 | - date_default_timezone_set('UTC'); |
|
250 | + date_default_timezone_set('UTC'); |
|
251 | 251 | |
252 | 252 | /** |
253 | 253 | * |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | // In development mode, caches should expire quickly. |
326 | 326 | $duration = '+999 days'; |
327 | 327 | if (Configure::read('debug') > 0) { |
328 | - $duration = '+10 seconds'; |
|
328 | + $duration = '+10 seconds'; |
|
329 | 329 | } |
330 | 330 | |
331 | 331 | // Prefix each application on the same server with a different string, to avoid Memcache and APC conflicts. |
@@ -336,11 +336,11 @@ discard block |
||
336 | 336 | * object listings, and translation cache files are stored with this configuration. |
337 | 337 | */ |
338 | 338 | Cache::config('_cake_core_', array( |
339 | - 'engine' => $engine, |
|
340 | - 'prefix' => $prefix . 'cake_core_', |
|
341 | - 'path' => CACHE . 'persistent' . DS, |
|
342 | - 'serialize' => ($engine === 'File'), |
|
343 | - 'duration' => $duration |
|
339 | + 'engine' => $engine, |
|
340 | + 'prefix' => $prefix . 'cake_core_', |
|
341 | + 'path' => CACHE . 'persistent' . DS, |
|
342 | + 'serialize' => ($engine === 'File'), |
|
343 | + 'duration' => $duration |
|
344 | 344 | )); |
345 | 345 | |
346 | 346 | /** |
@@ -348,9 +348,9 @@ discard block |
||
348 | 348 | * is used to store schema descriptions, and table listings in connections. |
349 | 349 | */ |
350 | 350 | Cache::config('_cake_model_', array( |
351 | - 'engine' => $engine, |
|
352 | - 'prefix' => $prefix . 'cake_model_', |
|
353 | - 'path' => CACHE . 'models' . DS, |
|
354 | - 'serialize' => ($engine === 'File'), |
|
355 | - 'duration' => $duration |
|
351 | + 'engine' => $engine, |
|
352 | + 'prefix' => $prefix . 'cake_model_', |
|
353 | + 'path' => CACHE . 'models' . DS, |
|
354 | + 'serialize' => ($engine === 'File'), |
|
355 | + 'duration' => $duration |
|
356 | 356 | )); |
@@ -33,43 +33,43 @@ discard block |
||
33 | 33 | |
34 | 34 | |
35 | 35 | if (!isset($engine)) { |
36 | - $engine = 'File'; |
|
37 | - $prefix = 'saito_'; |
|
36 | + $engine = 'File'; |
|
37 | + $prefix = 'saito_'; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | // Setup a 'default' cache configuration for use in the application. |
41 | 41 | Cache::config( |
42 | - 'default', |
|
43 | - [ |
|
44 | - 'engine' => $engine, |
|
45 | - 'prefix' => $prefix |
|
46 | - ] |
|
42 | + 'default', |
|
43 | + [ |
|
44 | + 'engine' => $engine, |
|
45 | + 'prefix' => $prefix |
|
46 | + ] |
|
47 | 47 | ); |
48 | 48 | |
49 | 49 | /** |
50 | 50 | * Long term cache for performance cheating |
51 | 51 | */ |
52 | 52 | Cache::config( |
53 | - 'entries', |
|
54 | - [ |
|
55 | - 'engine' => $engine, |
|
56 | - 'prefix' => $prefix, |
|
57 | - 'groups' => ['entries'], |
|
58 | - 'duration' => 3600 |
|
59 | - ] |
|
53 | + 'entries', |
|
54 | + [ |
|
55 | + 'engine' => $engine, |
|
56 | + 'prefix' => $prefix, |
|
57 | + 'groups' => ['entries'], |
|
58 | + 'duration' => 3600 |
|
59 | + ] |
|
60 | 60 | ); |
61 | 61 | |
62 | 62 | /** |
63 | 63 | * Short term cache for performance cheating |
64 | 64 | */ |
65 | 65 | Cache::config( |
66 | - 'short', |
|
67 | - [ |
|
68 | - 'engine' => $engine, |
|
69 | - 'prefix' => $prefix, |
|
70 | - 'groups' => ['short'], |
|
71 | - 'duration' => 180 |
|
72 | - ] |
|
66 | + 'short', |
|
67 | + [ |
|
68 | + 'engine' => $engine, |
|
69 | + 'prefix' => $prefix, |
|
70 | + 'groups' => ['short'], |
|
71 | + 'duration' => 180 |
|
72 | + ] |
|
73 | 73 | ); |
74 | 74 | |
75 | 75 | /** |
@@ -107,13 +107,13 @@ discard block |
||
107 | 107 | * |
108 | 108 | */ |
109 | 109 | |
110 | - /** |
|
111 | - * Cake doesn't handle Smiley <-> Smilies |
|
112 | - */ |
|
110 | + /** |
|
111 | + * Cake doesn't handle Smiley <-> Smilies |
|
112 | + */ |
|
113 | 113 | Inflector::rules('plural', array( |
114 | - '/^(smil)ey$/i' => '\1ies')); |
|
114 | + '/^(smil)ey$/i' => '\1ies')); |
|
115 | 115 | Inflector::rules('singular', array( |
116 | - '/^(smil)ies$/i' => '\1ey')); |
|
116 | + '/^(smil)ies$/i' => '\1ey')); |
|
117 | 117 | |
118 | 118 | /** |
119 | 119 | * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call |
@@ -126,11 +126,11 @@ discard block |
||
126 | 126 | */ |
127 | 127 | |
128 | 128 | CakePlugin::loadAll( |
129 | - [ |
|
130 | - 'Api' => ['bootstrap' => true, 'routes' => true], |
|
131 | - 'M' => ['bootstrap' => true, 'routes' => true], |
|
132 | - 'SaitoHelp' => ['routes' => true], |
|
133 | - ] |
|
129 | + [ |
|
130 | + 'Api' => ['bootstrap' => true, 'routes' => true], |
|
131 | + 'M' => ['bootstrap' => true, 'routes' => true], |
|
132 | + 'SaitoHelp' => ['routes' => true], |
|
133 | + ] |
|
134 | 134 | ); |
135 | 135 | |
136 | 136 | /** |
@@ -150,8 +150,8 @@ discard block |
||
150 | 150 | * )); |
151 | 151 | */ |
152 | 152 | Configure::write('Dispatcher.filters', array( |
153 | - 'AssetDispatcher', |
|
154 | - 'Stopwatch.StopwatchFilter', |
|
153 | + 'AssetDispatcher', |
|
154 | + 'Stopwatch.StopwatchFilter', |
|
155 | 155 | )); |
156 | 156 | |
157 | 157 | /** |
@@ -159,35 +159,35 @@ discard block |
||
159 | 159 | */ |
160 | 160 | App::uses('CakeLog', 'Log'); |
161 | 161 | CakeLog::config('debug', array( |
162 | - 'engine' => 'FileLog', |
|
163 | - 'types' => array('notice', 'info', 'debug'), |
|
164 | - 'file' => 'debug', |
|
162 | + 'engine' => 'FileLog', |
|
163 | + 'types' => array('notice', 'info', 'debug'), |
|
164 | + 'file' => 'debug', |
|
165 | 165 | )); |
166 | 166 | CakeLog::config('error', array( |
167 | - 'engine' => 'FileLog', |
|
168 | - 'types' => array('warning', 'error', 'critical', 'alert', 'emergency'), |
|
169 | - 'file' => 'error', |
|
167 | + 'engine' => 'FileLog', |
|
168 | + 'types' => array('warning', 'error', 'critical', 'alert', 'emergency'), |
|
169 | + 'file' => 'error', |
|
170 | 170 | )); |
171 | 171 | CakeLog::config('saito-error', array( |
172 | - 'engine' => 'FileLog', |
|
173 | - 'size' => '1MB', |
|
174 | - 'rotate' => '4', |
|
175 | - 'types' => ['saito.error'], |
|
176 | - 'file' => 'saito-error' |
|
172 | + 'engine' => 'FileLog', |
|
173 | + 'size' => '1MB', |
|
174 | + 'rotate' => '4', |
|
175 | + 'types' => ['saito.error'], |
|
176 | + 'file' => 'saito-error' |
|
177 | 177 | )); |
178 | 178 | CakeLog::config('saito', array( |
179 | - 'engine' => 'FileLog', |
|
180 | - 'size' => '1MB', |
|
181 | - 'rotate' => '4', |
|
182 | - 'types' => ['saito.info'], |
|
183 | - 'file' => 'saito-info' |
|
179 | + 'engine' => 'FileLog', |
|
180 | + 'size' => '1MB', |
|
181 | + 'rotate' => '4', |
|
182 | + 'types' => ['saito.info'], |
|
183 | + 'file' => 'saito-info' |
|
184 | 184 | )); |
185 | 185 | CakeLog::config('auth', array( |
186 | - 'engine' => 'FileLog', |
|
187 | - 'size' => '1MB', |
|
188 | - 'rotate' => '4', |
|
189 | - 'types' => ['saito.forbidden'], |
|
190 | - 'file' => 'saito-auth' |
|
186 | + 'engine' => 'FileLog', |
|
187 | + 'size' => '1MB', |
|
188 | + 'rotate' => '4', |
|
189 | + 'types' => ['saito.forbidden'], |
|
190 | + 'file' => 'saito-auth' |
|
191 | 191 | )); |
192 | 192 | |
193 | 193 | include 'version.php'; |
@@ -207,13 +207,13 @@ discard block |
||
207 | 207 | */ |
208 | 208 | Configure::write('Saito.Globals.postingsPerThread', 10); |
209 | 209 | |
210 | - /** |
|
211 | - * Check if the forum is installed |
|
212 | - */ |
|
210 | + /** |
|
211 | + * Check if the forum is installed |
|
212 | + */ |
|
213 | 213 | if ( file_exists(APP . 'Config' . DS . 'installed.txt') ) : |
214 | - Configure::write('Saito.installed', TRUE); |
|
214 | + Configure::write('Saito.installed', TRUE); |
|
215 | 215 | else : |
216 | - Configure::write('Saito.installed', FALSE); |
|
216 | + Configure::write('Saito.installed', FALSE); |
|
217 | 217 | endif; |
218 | 218 | |
219 | 219 | /** |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | * to the roles you defined in the roles configuration. |
106 | 106 | */ |
107 | 107 | $config['map'] = array( |
108 | - 'User' => 'User/username', |
|
109 | - 'Role' => 'User/group_id', |
|
108 | + 'User' => 'User/username', |
|
109 | + 'Role' => 'User/group_id', |
|
110 | 110 | ); |
111 | 111 | |
112 | 112 | /** |
@@ -114,22 +114,22 @@ discard block |
||
114 | 114 | * the roles defined in your role configuration. |
115 | 115 | */ |
116 | 116 | $config['alias'] = array( |
117 | - 'Role/4' => 'Role/editor', |
|
117 | + 'Role/4' => 'Role/editor', |
|
118 | 118 | ); |
119 | 119 | |
120 | 120 | /** |
121 | 121 | * role configuration |
122 | 122 | */ |
123 | 123 | $config['roles'] = array( |
124 | - 'Role/admin' => null, |
|
124 | + 'Role/admin' => null, |
|
125 | 125 | ); |
126 | 126 | |
127 | 127 | /** |
128 | 128 | * rule configuration |
129 | 129 | */ |
130 | 130 | $config['rules'] = array( |
131 | - 'allow' => array( |
|
132 | - '*' => 'Role/admin', |
|
133 | - ), |
|
134 | - 'deny' => array(), |
|
131 | + 'allow' => array( |
|
132 | + '*' => 'Role/admin', |
|
133 | + ), |
|
134 | + 'deny' => array(), |
|
135 | 135 | ); |
@@ -29,46 +29,46 @@ |
||
29 | 29 | */ |
30 | 30 | class DbAclSchema extends CakeSchema { |
31 | 31 | |
32 | - public $name = 'DbAcl'; |
|
32 | + public $name = 'DbAcl'; |
|
33 | 33 | |
34 | - public function before($event = array()) { |
|
35 | - return true; |
|
36 | - } |
|
34 | + public function before($event = array()) { |
|
35 | + return true; |
|
36 | + } |
|
37 | 37 | |
38 | - public function after($event = array()) { |
|
39 | - } |
|
38 | + public function after($event = array()) { |
|
39 | + } |
|
40 | 40 | |
41 | - public $acos = array( |
|
42 | - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
43 | - 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
44 | - 'model' => array('type'=>'string', 'null' => true), |
|
45 | - 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
46 | - 'alias' => array('type'=>'string', 'null' => true), |
|
47 | - 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
48 | - 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
49 | - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) |
|
50 | - ); |
|
41 | + public $acos = array( |
|
42 | + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
43 | + 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
44 | + 'model' => array('type'=>'string', 'null' => true), |
|
45 | + 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
46 | + 'alias' => array('type'=>'string', 'null' => true), |
|
47 | + 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
48 | + 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
49 | + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) |
|
50 | + ); |
|
51 | 51 | |
52 | - public $aros = array( |
|
53 | - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
54 | - 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
55 | - 'model' => array('type'=>'string', 'null' => true), |
|
56 | - 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
57 | - 'alias' => array('type'=>'string', 'null' => true), |
|
58 | - 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
59 | - 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
60 | - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) |
|
61 | - ); |
|
52 | + public $aros = array( |
|
53 | + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
54 | + 'parent_id' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
55 | + 'model' => array('type'=>'string', 'null' => true), |
|
56 | + 'foreign_key' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
57 | + 'alias' => array('type'=>'string', 'null' => true), |
|
58 | + 'lft' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
59 | + 'rght' => array('type'=>'integer', 'null' => true, 'default' => NULL, 'length' => 10), |
|
60 | + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) |
|
61 | + ); |
|
62 | 62 | |
63 | - public $aros_acos = array( |
|
64 | - 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
65 | - 'aro_id' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), |
|
66 | - 'aco_id' => array('type'=>'integer', 'null' => false, 'length' => 10), |
|
67 | - '_create' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
68 | - '_read' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
69 | - '_update' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
70 | - '_delete' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
71 | - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1)) |
|
72 | - ); |
|
63 | + public $aros_acos = array( |
|
64 | + 'id' => array('type'=>'integer', 'null' => false, 'default' => NULL, 'length' => 10, 'key' => 'primary'), |
|
65 | + 'aro_id' => array('type'=>'integer', 'null' => false, 'length' => 10, 'key' => 'index'), |
|
66 | + 'aco_id' => array('type'=>'integer', 'null' => false, 'length' => 10), |
|
67 | + '_create' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
68 | + '_read' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
69 | + '_update' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
70 | + '_delete' => array('type'=>'string', 'null' => false, 'default' => '0', 'length' => 2), |
|
71 | + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'ARO_ACO_KEY' => array('column' => array('aro_id', 'aco_id'), 'unique' => 1)) |
|
72 | + ); |
|
73 | 73 | |
74 | 74 | } |
@@ -29,20 +29,20 @@ |
||
29 | 29 | */ |
30 | 30 | class SessionsSchema extends CakeSchema { |
31 | 31 | |
32 | - public $name = 'Sessions'; |
|
32 | + public $name = 'Sessions'; |
|
33 | 33 | |
34 | - public function before($event = array()) { |
|
35 | - return true; |
|
36 | - } |
|
34 | + public function before($event = array()) { |
|
35 | + return true; |
|
36 | + } |
|
37 | 37 | |
38 | - public function after($event = array()) { |
|
39 | - } |
|
38 | + public function after($event = array()) { |
|
39 | + } |
|
40 | 40 | |
41 | - public $cake_sessions = array( |
|
42 | - 'id' => array('type'=>'string', 'null' => false, 'key' => 'primary'), |
|
43 | - 'data' => array('type'=>'text', 'null' => true, 'default' => NULL), |
|
44 | - 'expires' => array('type'=>'integer', 'null' => true, 'default' => NULL), |
|
45 | - 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) |
|
46 | - ); |
|
41 | + public $cake_sessions = array( |
|
42 | + 'id' => array('type'=>'string', 'null' => false, 'key' => 'primary'), |
|
43 | + 'data' => array('type'=>'text', 'null' => true, 'default' => NULL), |
|
44 | + 'expires' => array('type'=>'integer', 'null' => true, 'default' => NULL), |
|
45 | + 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) |
|
46 | + ); |
|
47 | 47 | |
48 | 48 | } |