Skip to content

Commit 6ce4b43

Browse files
author
Shaun Kutch
committed
upgraded Codeigniter
1 parent b12d1dd commit 6ce4b43

File tree

230 files changed

+19712
-12329
lines changed

Some content is hidden

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

230 files changed

+19712
-12329
lines changed

.DS_Store

0 Bytes
Binary file not shown.

application/.DS_Store

-3 KB
Binary file not shown.
File renamed without changes.

application/config/autoload.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
*/
5353

5454
//sale
55-
$autoload['helper'] = array('form','url','table','mailchimp','text','currency', 'html','download', 'active');
55+
$autoload['helper'] = array('form','url','table','mailchimp','text','currency', 'html','download', 'active', 'language');
5656

5757

5858
/*
@@ -108,7 +108,7 @@
108108
|
109109
*/
110110

111-
$autoload['model'] = array('Appconfig','Person','Customer','Employee','Module','Item', 'Item_taxes', 'Sale', 'Sale_suspended', 'Supplier','Inventory','Receiving','Giftcard', 'Item_kit', 'Item_kit_items');
111+
$autoload['model'] = array('Sync','Appconfig','Person','Customer','Employee','Module','Item', 'Item_taxes', 'Sale', 'Sale_suspended', 'Supplier','Inventory','Receiving','Giftcard', 'Item_kit', 'Item_kit_items');
112112

113113

114114
/*

application/config/config.php

Lines changed: 80 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
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'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
15-
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
16-
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
17+
$config['base_url'] = '';
18+
1719
/*
1820
|--------------------------------------------------------------------------
1921
| Index File
@@ -24,15 +26,15 @@
2426
| variable so that it is blank.
2527
|
2628
*/
27-
$config['index_page'] = "index.php";
29+
$config['index_page'] = 'index.php';
2830

2931
/*
3032
|--------------------------------------------------------------------------
3133
| URI PROTOCOL
3234
|--------------------------------------------------------------------------
3335
|
3436
| This item determines which server global should be used to retrieve the
35-
| URI string. The default setting of "AUTO" works for most servers.
37+
| URI string. The default setting of 'AUTO' works for most servers.
3638
| If your links do not seem to work, try one of the other delicious flavors:
3739
|
3840
| 'AUTO' Default - auto detects
@@ -42,7 +44,7 @@
4244
| 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
4345
|
4446
*/
45-
$config['uri_protocol'] = "AUTO";
47+
$config['uri_protocol'] = 'AUTO';
4648

4749
/*
4850
|--------------------------------------------------------------------------
@@ -55,7 +57,7 @@
5557
| http://codeigniter.com/user_guide/general/urls.html
5658
*/
5759

58-
$config['url_suffix'] = "";
60+
$config['url_suffix'] = '';
5961

6062
/*
6163
|--------------------------------------------------------------------------
@@ -67,7 +69,7 @@
6769
| than english.
6870
|
6971
*/
70-
$config['language'] = "english";
72+
$config['language'] = 'english';
7173

7274
/*
7375
|--------------------------------------------------------------------------
@@ -78,14 +80,14 @@
7880
| that require a character set to be provided.
7981
|
8082
*/
81-
$config['charset'] = "UTF-8";
83+
$config['charset'] = 'UTF-8';
8284

8385
/*
8486
|--------------------------------------------------------------------------
8587
| Enable/Disable System Hooks
8688
|--------------------------------------------------------------------------
8789
|
88-
| 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
8991
| setting this variable to TRUE (boolean). See the user guide for details.
9092
|
9193
*/
@@ -135,12 +137,15 @@
135137
| By default CodeIgniter uses search-engine friendly segment based URLs:
136138
| example.com/who/what/where/
137139
|
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+
|
138143
| You can optionally enable standard query string based URLs:
139144
| example.com?who=me&what=something&where=here
140145
|
141146
| Options are: TRUE or FALSE (boolean)
142147
|
143-
| 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
144149
| invoke your controllers and its functions:
145150
| example.com/index.php?c=controller&m=function
146151
|
@@ -149,17 +154,18 @@
149154
| use segment based URLs.
150155
|
151156
*/
152-
$config['enable_query_strings'] = TRUE;
153-
$config['directory_trigger'] = 'd'; // experimental not currently in use
154-
$config['controller_trigger'] = 'c';
155-
$config['function_trigger'] = 'm';
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
156162

157163
/*
158164
|--------------------------------------------------------------------------
159165
| Error Logging Threshold
160166
|--------------------------------------------------------------------------
161167
|
162-
| 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
163169
| determine what gets logged. Threshold options are:
164170
| You can enable error logging by setting a threshold over zero. The
165171
| threshold determines what gets logged. Threshold options are:
@@ -182,7 +188,7 @@
182188
|--------------------------------------------------------------------------
183189
|
184190
| Leave this BLANK unless you would like to set something other than the default
185-
| system/logs/ folder. Use a full server path with trailing slash.
191+
| application/logs/ folder. Use a full server path with trailing slash.
186192
|
187193
*/
188194
$config['log_path'] = '';
@@ -214,32 +220,39 @@
214220
| Encryption Key
215221
|--------------------------------------------------------------------------
216222
|
217-
| If you use the Encryption class or the Sessions class with encryption
218-
| 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.
219225
|
220226
*/
221-
$config['encryption_key'] = "";
227+
$config['encryption_key'] = 'X5B7Gs8szq1B';
222228

223229
/*
224230
|--------------------------------------------------------------------------
225231
| Session Variables
226232
|--------------------------------------------------------------------------
227233
|
228-
| 'session_cookie_name' = the name you want for the cookie
229-
| 'encrypt_sess_cookie' = TRUE/FALSE (boolean). Whether to encrypt the cookie
230-
| 'session_expiration' = the number of SECONDS you want the session to last.
231-
| by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
232-
| '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
233245
|
234246
*/
235247
$config['sess_cookie_name'] = 'ci_session';
236-
$config['sess_expiration'] = 0;
248+
$config['sess_expiration'] = 7200;
249+
$config['sess_expire_on_close'] = FALSE;
237250
$config['sess_encrypt_cookie'] = FALSE;
238-
$config['sess_use_database'] = TRUE;
239-
$config['sess_table_name'] = 'sessions';
251+
$config['sess_use_database'] = FALSE;
252+
$config['sess_table_name'] = 'ci_sessions';
240253
$config['sess_match_ip'] = FALSE;
241254
$config['sess_match_useragent'] = TRUE;
242-
$config['sess_time_to_update'] = PHP_INT_MAX;
255+
$config['sess_time_to_update'] = 300;
243256

244257
/*
245258
|--------------------------------------------------------------------------
@@ -249,11 +262,13 @@
249262
| 'cookie_prefix' = Set a prefix if you need to avoid collisions
250263
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
251264
| 'cookie_path' = Typically will be a forward slash
265+
| 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists.
252266
|
253267
*/
254268
$config['cookie_prefix'] = "";
255269
$config['cookie_domain'] = "";
256270
$config['cookie_path'] = "/";
271+
$config['cookie_secure'] = FALSE;
257272

258273
/*
259274
|--------------------------------------------------------------------------
@@ -264,7 +279,24 @@
264279
| COOKIE data is encountered
265280
|
266281
*/
267-
$config['global_xss_filtering'] = TRUE;
282+
$config['global_xss_filtering'] = FALSE;
283+
284+
/*
285+
|--------------------------------------------------------------------------
286+
| Cross Site Request Forgery
287+
|--------------------------------------------------------------------------
288+
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
289+
| checked on a submitted form. If you are accepting user data, it is strongly
290+
| recommended CSRF protection be enabled.
291+
|
292+
| 'csrf_token_name' = The token name
293+
| 'csrf_cookie_name' = The cookie name
294+
| 'csrf_expire' = The number in seconds the token should expire.
295+
*/
296+
$config['csrf_protection'] = FALSE;
297+
$config['csrf_token_name'] = 'csrf_test_name';
298+
$config['csrf_cookie_name'] = 'csrf_cookie_name';
299+
$config['csrf_expire'] = 7200;
268300

269301
/*
270302
|--------------------------------------------------------------------------
@@ -280,7 +312,7 @@
280312
| means you are prematurely outputting something to your browser. It could
281313
| even be a line of whitespace at the end of one of your scripts. For
282314
| compression to work, nothing can be sent before the output buffer is called
283-
| by the output class. Do not "echo" any values with compression enabled.
315+
| by the output class. Do not 'echo' any values with compression enabled.
284316
|
285317
*/
286318
$config['compress_output'] = FALSE;
@@ -290,9 +322,9 @@
290322
| Master Time Reference
291323
|--------------------------------------------------------------------------
292324
|
293-
| Options are "local" or "gmt". This pref tells the system whether to use
294-
| your server's local time as the master "now" reference, or convert it to
295-
| GMT. See the "date helper" page of the user guide for information
325+
| Options are 'local' or 'gmt'. This pref tells the system whether to use
326+
| your server's local time as the master 'now' reference, or convert it to
327+
| GMT. See the 'date helper' page of the user guide for information
296328
| regarding date handling.
297329
|
298330
*/
@@ -312,5 +344,19 @@
312344
$config['rewrite_short_tags'] = FALSE;
313345

314346

347+
/*
348+
|--------------------------------------------------------------------------
349+
| Reverse Proxy IPs
350+
|--------------------------------------------------------------------------
351+
|
352+
| If your server is behind a reverse proxy, you must whitelist the proxy IP
353+
| addresses from which CodeIgniter should trust the HTTP_X_FORWARDED_FOR
354+
| header in order to properly identify the visitor's IP address.
355+
| Comma-delimited, e.g. '10.0.1.200,10.0.1.201'
356+
|
357+
*/
358+
$config['proxy_ips'] = '';
359+
360+
315361
/* End of file config.php */
316362
/* Location: ./application/config/config.php */

application/config/constants.php

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2-
3-
/*
4-
|--------------------------------------------------------------------------
5-
| File and Directory Modes
6-
|--------------------------------------------------------------------------
7-
|
8-
| These prefs are used when checking and setting modes when working
9-
| with the file system. The defaults are fine on servers with proper
10-
| security, but you may wish (or even need) to change the values in
11-
| certain environments (Apache running a separate process for each
12-
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
13-
| always be used to set the mode correctly.
14-
|
15-
*/
16-
define('FILE_READ_MODE', 0644);
17-
define('FILE_WRITE_MODE', 0666);
18-
define('DIR_READ_MODE', 0755);
19-
define('DIR_WRITE_MODE', 0777);
20-
21-
/*
22-
|--------------------------------------------------------------------------
23-
| File Stream Modes
24-
|--------------------------------------------------------------------------
25-
|
26-
| These modes are used when working with fopen()/popen()
27-
|
28-
*/
29-
30-
define('FOPEN_READ', 'rb');
31-
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');
37-
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
38-
39-
40-
/* End of file constants.php */
1+
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2+
3+
/*
4+
|--------------------------------------------------------------------------
5+
| File and Directory Modes
6+
|--------------------------------------------------------------------------
7+
|
8+
| These prefs are used when checking and setting modes when working
9+
| with the file system. The defaults are fine on servers with proper
10+
| security, but you may wish (or even need) to change the values in
11+
| certain environments (Apache running a separate process for each
12+
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
13+
| always be used to set the mode correctly.
14+
|
15+
*/
16+
define('FILE_READ_MODE', 0644);
17+
define('FILE_WRITE_MODE', 0666);
18+
define('DIR_READ_MODE', 0755);
19+
define('DIR_WRITE_MODE', 0777);
20+
21+
/*
22+
|--------------------------------------------------------------------------
23+
| File Stream Modes
24+
|--------------------------------------------------------------------------
25+
|
26+
| These modes are used when working with fopen()/popen()
27+
|
28+
*/
29+
30+
define('FOPEN_READ', 'rb');
31+
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');
37+
define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
38+
39+
40+
/* End of file constants.php */
4141
/* Location: ./application/config/constants.php */

0 commit comments

Comments
 (0)