Skip to content

Commit f5eca71

Browse files
author
Phil Sturgeon
committed
2 parents 582e248 + e9e7d2c commit f5eca71

File tree

166 files changed

+1896
-595
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+1896
-595
lines changed

application/config/autoload.php

100644100755
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
|
1919
| These are the things you can load automatically:
2020
|
21-
| 1. Libraries
22-
| 2. Helper files
23-
| 3. Plugins
21+
| 1. Packages
22+
| 2. Libraries
23+
| 3. Helper files
2424
| 4. Custom config files
2525
| 5. Language files
2626
| 6. Models
@@ -29,41 +29,42 @@
2929

3030
/*
3131
| -------------------------------------------------------------------
32-
| Auto-load Libraries
32+
| Auto-load Packges
3333
| -------------------------------------------------------------------
34-
| These are the classes located in the system/libraries folder
35-
| or in your system/application/libraries folder.
36-
|
3734
| Prototype:
3835
|
39-
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
36+
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
37+
|
4038
*/
4139

42-
$autoload['libraries'] = array();
40+
$autoload['packages'] = array(APPPATH.'third_party');
4341

4442

4543
/*
4644
| -------------------------------------------------------------------
47-
| Auto-load Helper Files
45+
| Auto-load Libraries
4846
| -------------------------------------------------------------------
47+
| These are the classes located in the system/libraries folder
48+
| or in your application/libraries folder.
49+
|
4950
| Prototype:
5051
|
51-
| $autoload['helper'] = array('url', 'file');
52+
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
5253
*/
5354

54-
$autoload['helper'] = array();
55+
$autoload['libraries'] = array();
5556

5657

5758
/*
5859
| -------------------------------------------------------------------
59-
| Auto-load Plugins
60+
| Auto-load Helper Files
6061
| -------------------------------------------------------------------
6162
| Prototype:
6263
|
63-
| $autoload['plugin'] = array('captcha', 'js_calendar');
64+
| $autoload['helper'] = array('url', 'file');
6465
*/
6566

66-
$autoload['plugin'] = array();
67+
$autoload['helper'] = array();
6768

6869

6970
/*
@@ -90,7 +91,7 @@
9091
|
9192
| $autoload['language'] = array('lang1', 'lang2');
9293
|
93-
| NOTE: Do not include the "_lang" part of your file. For example
94+
| NOTE: Do not include the "_lang" part of your file. For example
9495
| "codeigniter_lang.php" would be referenced as array('codeigniter');
9596
|
9697
*/
@@ -111,6 +112,5 @@
111112
$autoload['model'] = array();
112113

113114

114-
115115
/* End of file autoload.php */
116-
/* Location: ./system/application/config/autoload.php */
116+
/* Location: ./application/config/autoload.php */

application/config/config.php

100644100755
Lines changed: 64 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@
1010
|
1111
| http://example.com/
1212
|
13+
| If this is not set then CodeIgniter will guess the protocol, domain and
14+
| path to your installation.
15+
|
1316
*/
14-
$config['base_url'] = "http://localhost/classes/codeigniter-restserver/";
17+
$config['base_url'] = '';
1518

1619
/*
1720
|--------------------------------------------------------------------------
@@ -23,15 +26,15 @@
2326
| variable so that it is blank.
2427
|
2528
*/
26-
$config['index_page'] = "index.php";
29+
$config['index_page'] = 'index.php';
2730

2831
/*
2932
|--------------------------------------------------------------------------
3033
| URI PROTOCOL
3134
|--------------------------------------------------------------------------
3235
|
3336
| This item determines which server global should be used to retrieve the
34-
| URI string. The default setting of "AUTO" works for most servers.
37+
| URI string. The default setting of 'AUTO' works for most servers.
3538
| If your links do not seem to work, try one of the other delicious flavors:
3639
|
3740
| 'AUTO' Default - auto detects
@@ -41,7 +44,7 @@
4144
| 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
4245
|
4346
*/
44-
$config['uri_protocol'] = "PATH_INFO"; // You need to use PATH_INFO to enable ?var=somthing strings
47+
$config['uri_protocol'] = 'AUTO';
4548

4649
/*
4750
|--------------------------------------------------------------------------
@@ -54,7 +57,7 @@
5457
| http://codeigniter.com/user_guide/general/urls.html
5558
*/
5659

57-
$config['url_suffix'] = "";
60+
$config['url_suffix'] = '';
5861

5962
/*
6063
|--------------------------------------------------------------------------
@@ -66,7 +69,7 @@
6669
| than english.
6770
|
6871
*/
69-
$config['language'] = "english";
72+
$config['language'] = 'english';
7073

7174
/*
7275
|--------------------------------------------------------------------------
@@ -77,14 +80,14 @@
7780
| that require a character set to be provided.
7881
|
7982
*/
80-
$config['charset'] = "UTF-8";
83+
$config['charset'] = 'UTF-8';
8184

8285
/*
8386
|--------------------------------------------------------------------------
8487
| Enable/Disable System Hooks
8588
|--------------------------------------------------------------------------
8689
|
87-
| If you would like to use the "hooks" feature you must enable it by
90+
| If you would like to use the 'hooks' feature you must enable it by
8891
| setting this variable to TRUE (boolean). See the user guide for details.
8992
|
9093
*/
@@ -134,12 +137,15 @@
134137
| By default CodeIgniter uses search-engine friendly segment based URLs:
135138
| example.com/who/what/where/
136139
|
140+
| By default CodeIgniter enables access to the $_GET array. If for some
141+
| reason you would like to disable it, set 'allow_get_array' to FALSE.
142+
|
137143
| You can optionally enable standard query string based URLs:
138144
| example.com?who=me&what=something&where=here
139145
|
140146
| Options are: TRUE or FALSE (boolean)
141147
|
142-
| The other items let you set the query string "words" that will
148+
| The other items let you set the query string 'words' that will
143149
| invoke your controllers and its functions:
144150
| example.com/index.php?c=controller&m=function
145151
|
@@ -148,17 +154,18 @@
148154
| use segment based URLs.
149155
|
150156
*/
151-
$config['enable_query_strings'] = TRUE;
152-
$config['controller_trigger'] = 'c';
153-
$config['function_trigger'] = 'm';
154-
$config['directory_trigger'] = 'd'; // experimental not currently in use
157+
$config['allow_get_array'] = TRUE;
158+
$config['enable_query_strings'] = FALSE;
159+
$config['controller_trigger'] = 'c';
160+
$config['function_trigger'] = 'm';
161+
$config['directory_trigger'] = 'd'; // experimental not currently in use
155162

156163
/*
157164
|--------------------------------------------------------------------------
158165
| Error Logging Threshold
159166
|--------------------------------------------------------------------------
160167
|
161-
| If you have enabled error logging, you can set an error threshold to
168+
| If you have enabled error logging, you can set an error threshold to
162169
| determine what gets logged. Threshold options are:
163170
| You can enable error logging by setting a threshold over zero. The
164171
| threshold determines what gets logged. Threshold options are:
@@ -173,15 +180,15 @@
173180
| your log files will fill up very fast.
174181
|
175182
*/
176-
$config['log_threshold'] = 3;
183+
$config['log_threshold'] = 0;
177184

178185
/*
179186
|--------------------------------------------------------------------------
180187
| Error Logging Directory Path
181188
|--------------------------------------------------------------------------
182189
|
183190
| Leave this BLANK unless you would like to set something other than the default
184-
| system/logs/ folder. Use a full server path with trailing slash.
191+
| application/logs/ folder. Use a full server path with trailing slash.
185192
|
186193
*/
187194
$config['log_path'] = '';
@@ -213,32 +220,39 @@
213220
| Encryption Key
214221
|--------------------------------------------------------------------------
215222
|
216-
| If you use the Encryption class or the Sessions class with encryption
217-
| enabled you MUST set an encryption key. See the user guide for info.
223+
| If you use the Encryption class or the Session class you
224+
| MUST set an encryption key. See the user guide for info.
218225
|
219226
*/
220-
$config['encryption_key'] = "";
227+
$config['encryption_key'] = '';
221228

222229
/*
223230
|--------------------------------------------------------------------------
224231
| Session Variables
225232
|--------------------------------------------------------------------------
226233
|
227-
| 'session_cookie_name' = the name you want for the cookie
228-
| 'encrypt_sess_cookie' = TRUE/FALSE (boolean). Whether to encrypt the cookie
229-
| 'session_expiration' = the number of SECONDS you want the session to last.
230-
| by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
231-
| 'time_to_update' = how many seconds between CI refreshing Session Information
234+
| 'sess_cookie_name' = the name you want for the cookie
235+
| 'sess_expiration' = the number of SECONDS you want the session to last.
236+
| by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
237+
| 'sess_expire_on_close' = Whether to cause the session to expire automatically
238+
| when the browser window is closed
239+
| 'sess_encrypt_cookie' = Whether to encrypt the cookie
240+
| 'sess_use_database' = Whether to save the session data to a database
241+
| 'sess_table_name' = The name of the session database table
242+
| 'sess_match_ip' = Whether to match the user's IP address when reading the session data
243+
| 'sess_match_useragent' = Whether to match the User Agent when reading the session data
244+
| 'sess_time_to_update' = how many seconds between CI refreshing Session Information
232245
|
233246
*/
234247
$config['sess_cookie_name'] = 'ci_session';
235248
$config['sess_expiration'] = 7200;
249+
$config['sess_expire_on_close'] = FALSE;
236250
$config['sess_encrypt_cookie'] = FALSE;
237251
$config['sess_use_database'] = FALSE;
238252
$config['sess_table_name'] = 'ci_sessions';
239253
$config['sess_match_ip'] = FALSE;
240254
$config['sess_match_useragent'] = TRUE;
241-
$config['sess_time_to_update'] = 300;
255+
$config['sess_time_to_update'] = 300;
242256

243257
/*
244258
|--------------------------------------------------------------------------
@@ -250,9 +264,9 @@
250264
| 'cookie_path' = Typically will be a forward slash
251265
|
252266
*/
253-
$config['cookie_prefix'] = "";
254-
$config['cookie_domain'] = "";
255-
$config['cookie_path'] = "/";
267+
$config['cookie_prefix'] = '';
268+
$config['cookie_domain'] = '';
269+
$config['cookie_path'] = '/';
256270

257271
/*
258272
|--------------------------------------------------------------------------
@@ -265,6 +279,23 @@
265279
*/
266280
$config['global_xss_filtering'] = FALSE;
267281

282+
/*
283+
|--------------------------------------------------------------------------
284+
| Cross Site Request Forgery
285+
|--------------------------------------------------------------------------
286+
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
287+
| checked on a submitted form. If you are accepting user data, it is strongly
288+
| recommended CSRF protection be enabled.
289+
|
290+
| 'csrf_token_name' = The token name
291+
| 'csrf_cookie_name' = The cookie name
292+
| 'csrf_expire' = The number in seconds the token should expire.
293+
*/
294+
$config['csrf_protection'] = FALSE;
295+
$config['csrf_token_name'] = 'csrf_test_name';
296+
$config['csrf_cookie_name'] = 'csrf_cookie_name';
297+
$config['csrf_expire'] = 7200;
298+
268299
/*
269300
|--------------------------------------------------------------------------
270301
| Output Compression
@@ -279,7 +310,7 @@
279310
| means you are prematurely outputting something to your browser. It could
280311
| even be a line of whitespace at the end of one of your scripts. For
281312
| compression to work, nothing can be sent before the output buffer is called
282-
| by the output class. Do not "echo" any values with compression enabled.
313+
| by the output class. Do not 'echo' any values with compression enabled.
283314
|
284315
*/
285316
$config['compress_output'] = FALSE;
@@ -289,9 +320,9 @@
289320
| Master Time Reference
290321
|--------------------------------------------------------------------------
291322
|
292-
| Options are "local" or "gmt". This pref tells the system whether to use
293-
| your server's local time as the master "now" reference, or convert it to
294-
| GMT. See the "date helper" page of the user guide for information
323+
| Options are 'local' or 'gmt'. This pref tells the system whether to use
324+
| your server's local time as the master 'now' reference, or convert it to
325+
| GMT. See the 'date helper' page of the user guide for information
295326
| regarding date handling.
296327
|
297328
*/
@@ -326,4 +357,4 @@
326357

327358

328359
/* End of file config.php */
329-
/* Location: ./system/application/config/config.php */
360+
/* Location: ./application/config/config.php */

application/config/constants.php

100644100755
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@
2727
|
2828
*/
2929

30-
define('FOPEN_READ', 'rb');
30+
define('FOPEN_READ', 'rb');
3131
define('FOPEN_READ_WRITE', 'r+b');
32-
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
33-
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
34-
define('FOPEN_WRITE_CREATE', 'ab');
35-
define('FOPEN_READ_WRITE_CREATE', 'a+b');
36-
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
32+
define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
33+
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
34+
define('FOPEN_WRITE_CREATE', 'ab');
35+
define('FOPEN_READ_WRITE_CREATE', 'a+b');
36+
define('FOPEN_WRITE_CREATE_STRICT', 'xb');
3737
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
3838

3939

4040
/* End of file constants.php */
41-
/* Location: ./system/application/config/constants.php */
41+
/* Location: ./application/config/constants.php */

0 commit comments

Comments
 (0)