File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55- Fixed some minor error screen layout issues
66- Make User::fresh() compatible with Eloquent\Model v5.2.40+
77- Update composer require to allow for Fortress 1.x bugfixes
8+ - Allow database port definitions in config-userfrosting.php
89
910## v0.3.1.18
1011
Original file line number Diff line number Diff line change 4141 ],
4242 'db ' => [
4343 'db_host ' => 'localhost ' ,
44+ 'db_port ' => '' , // Leave blank to use the default port for your database driver (eg. 3306 for MySQL)
4445 'db_name ' => 'userfrosting ' ,
4546 'db_user ' => 'admin ' ,
4647 'db_pass ' => 'password ' ,
9091 ],
9192 'db ' => [
9293 'db_host ' => 'localhost ' ,
94+ 'db_port ' => '' , // Leave blank to use the default port for your database driver (eg. 3306 for MySQL)
9395 'db_name ' => 'userfrosting ' ,
9496 'db_user ' => 'admin ' ,
9597 'db_pass ' => 'password ' ,
Original file line number Diff line number Diff line change 4040
4141$ dbx = $ app ->config ('db ' );
4242
43- $ capsule -> addConnection ( [
43+ $ connection_array = [
4444 'driver ' => 'mysql ' ,
4545 'host ' => $ dbx ['db_host ' ],
4646 'database ' => $ dbx ['db_name ' ],
4949 'charset ' => 'utf8 ' ,
5050 'collation ' => 'utf8_unicode_ci ' ,
5151 'prefix ' => ''
52- ]);
52+ ];
53+
54+ // This is for backwards compatibility. Pre-0.3.1.19 configuration files won't have $dbx['db_port'] defined at all.
55+ if (isset ($ dbx ['db_port ' ]))
56+ {
57+ $ connection_array ['port ' ] = $ dbx ['db_port ' ];
58+ }
59+
60+ $ capsule ->addConnection ($ connection_array );
5361
5462// Register as global connection
5563$ capsule ->setAsGlobal ();
You can’t perform that action at this time.
0 commit comments