Skip to content

Commit a754b93

Browse files
authored
Merge pull request #1 from bcit-ci/develop
Update latest version
2 parents 99c0797 + e0501ac commit a754b93

File tree

414 files changed

+15215
-7012
lines changed

Some content is hidden

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

414 files changed

+15215
-7012
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ writable/uploads/*
6363

6464
writable/debugbar/*
6565

66+
application/Database/Migrations/2*
67+
68+
php_errors.log
69+
6670
#-------------------------
6771
# User Guide Temp Files
6872
#-------------------------
@@ -122,3 +126,4 @@ nb-configuration.xml
122126
.vscode/
123127

124128
/results/
129+
/phpunit.xml

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ php:
88
matrix:
99
fast_finish: true
1010
allow_failures:
11-
- php: 7.2
1211
- php: nightly
1312

1413
global:
@@ -43,4 +42,4 @@ before_script:
4342
- composer install --prefer-source
4443

4544
after_success:
46-
- travis_retry php tests/bin/coveralls.phar
45+
- travis_retry php tests/bin/coveralls.phar -v

application/Config/App.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ class App extends BaseConfig
270270
| and state of your application during that page display. By default it will
271271
| NOT be displayed under production environments, and will only display if
272272
| CI_DEBUG is true, since if it's not, there's not much to display anyway.
273+
|
274+
| toolbarMaxHistory = Number of history files, 0 for none or -1 for unlimited
275+
|
273276
*/
274277
public $toolbarCollectors = [
275278
'CodeIgniter\Debug\Toolbar\Collectors\Timers',
@@ -281,6 +284,7 @@ class App extends BaseConfig
281284
'CodeIgniter\Debug\Toolbar\Collectors\Routes',
282285
'CodeIgniter\Debug\Toolbar\Collectors\Events',
283286
];
287+
public $toolbarMaxHistory = 20;
284288

285289
/*
286290
|--------------------------------------------------------------------------

application/Config/Autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php namespace Config;
22

3-
require BASEPATH.'Config/AutoloadConfig.php';
3+
require_once BASEPATH.'Config/AutoloadConfig.php';
44

55
/**
66
* -------------------------------------------------------------------

application/Config/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Cache extends BaseConfig
3636
| system.
3737
|
3838
*/
39-
public $path = WRITEPATH.'cache/';
39+
public $storePath = WRITEPATH.'cache/';
4040

4141
/*
4242
|--------------------------------------------------------------------------

application/Config/ContentSecurityPolicy.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ContentSecurityPolicy extends BaseConfig
2323

2424
public $imageSrc = 'self';
2525

26-
public $base_uri = null;
26+
public $baseURI = 'none';
2727

2828
public $childSrc = null;
2929

@@ -38,6 +38,8 @@ class ContentSecurityPolicy extends BaseConfig
3838
public $mediaSrc = null;
3939

4040
public $objectSrc = null;
41+
42+
public $manifestSrc = null;
4143

4244
public $pluginTypes = null;
4345

application/Config/Email.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
class Email
44
{
5+
/**
6+
* @var string
7+
*/
8+
public $fromEmail;
9+
10+
/**
11+
* @var string
12+
*/
13+
public $fromName;
14+
515
/**
616
* The "user agent"
717
* @var string

application/Config/Filters.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,18 @@ class Filters extends BaseConfig
99
public $aliases = [
1010
'csrf' => \App\Filters\CSRF::class,
1111
'toolbar' => \App\Filters\DebugToolbar::class,
12+
'honeypot' => \App\Filters\Honeypot::class
1213
];
1314

1415
// Always applied before every request
1516
public $globals = [
1617
'before' => [
17-
// 'csrf'
18+
//'honeypot'
19+
// 'csrf',
1820
],
1921
'after' => [
20-
'toolbar'
22+
'toolbar',
23+
//'honeypot'
2124
]
2225
];
2326

application/Config/Honeypot.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php namespace Config;
2+
3+
use CodeIgniter\Config\BaseConfig;
4+
5+
class Honeypot extends BaseConfig
6+
{
7+
8+
/**
9+
* Makes Honeypot visible or not to human
10+
*
11+
* @var boolean
12+
*/
13+
public $hidden = true;
14+
/**
15+
* Honeypot Label Content
16+
* @var String
17+
*/
18+
public $label = 'Fill This Field';
19+
20+
/**
21+
* Honeypot Field Name
22+
* @var String
23+
*/
24+
public $name = 'honeypot';
25+
26+
/**
27+
* Honeypot HTML Template
28+
* @var String
29+
*/
30+
public $template = '<label>{label}</label><input type="text" name="{name}" value=""/>';
31+
}

application/Config/Paths.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Modifying these allows you to re-structure your application,
77
* share a system folder between multiple applications, and more.
88
*
9-
* All paths are relative to the application's front controller, index.php
9+
* All paths are relative to the project's root folder.
1010
*/
1111
class Paths
1212
{
@@ -19,7 +19,7 @@ class Paths
1919
* Include the path if the folder is not in the same directory
2020
* as this file.
2121
*/
22-
public $systemDirectory = '../system';
22+
public $systemDirectory = 'system';
2323

2424
/*
2525
*---------------------------------------------------------------
@@ -34,7 +34,7 @@ class Paths
3434
*
3535
* NO TRAILING SLASH!
3636
*/
37-
public $applicationDirectory = '../application';
37+
public $applicationDirectory = 'application';
3838

3939
/*
4040
* ---------------------------------------------------------------
@@ -47,7 +47,7 @@ class Paths
4747
* for maximum security, keeping it out of the application and/or
4848
* system directories.
4949
*/
50-
public $writableDirectory = '../writable';
50+
public $writableDirectory = 'writable';
5151

5252
/*
5353
* ---------------------------------------------------------------
@@ -60,7 +60,7 @@ class Paths
6060
* for maximum security, keeping it out of the application and/or
6161
* system directories.
6262
*/
63-
public $testsDirectory = '../tests';
63+
public $testsDirectory = 'tests';
6464

6565
/*
6666
* ---------------------------------------------------------------

application/Config/Services.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php namespace Config;
22

33
use CodeIgniter\Config\Services as CoreServices;
4+
use CodeIgniter\Config\BaseConfig;
45

56
require_once BASEPATH.'Config/Services.php';
67

@@ -30,5 +31,20 @@ class Services extends CoreServices
3031
// return new \CodeIgniter\Example();
3132
// }
3233

34+
public static function honeypot(BaseConfig $config = null, $getShared = true)
35+
{
36+
if ($getShared)
37+
{
38+
return self::getSharedInstance('honeypot', $config);
39+
}
40+
41+
if (is_null($config))
42+
{
43+
$config = new \Config\Honeypot();
44+
}
45+
46+
return new \CodeIgniter\Honeypot\Honeypot($config);
47+
}
48+
3349

3450
}

0 commit comments

Comments
 (0)