Skip to content

Commit 2feb97f

Browse files
committed
Merge branch 'hotfix-0.3.1.19'
2 parents 44f7845 + 6db45ae commit 2feb97f

10 files changed

Lines changed: 29 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change Log
22

3+
## v0.3.1.19
4+
5+
- Fix some minor error screen layout issues
6+
- Make User::fresh() compatible with Eloquent\Model v5.2.40+
7+
- Update composer require to allow for Fortress 1.x bugfixes
8+
- Allow database port definitions in config-userfrosting.php
9+
- Fix fatal error when evaluateCondition is called before the router populates current route information
10+
311
## v0.3.1.18
412

513
- Add check for logging being enabled but log file not existing yet

userfrosting/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"twig/twig" : "~1.0",
2222
"slim/slim" : "2.*",
2323
"slim/views" : "0.1.3",
24-
"userfrosting/fortress" : "1.0",
24+
"userfrosting/fortress" : "1.*",
2525
"wikimedia/composer-merge-plugin": "~1"
2626
},
2727
"extra": {

userfrosting/config-userfrosting-example.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
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',
@@ -90,6 +91,7 @@
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',

userfrosting/initialize.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
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'],
@@ -49,7 +49,15 @@
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();
@@ -147,7 +155,7 @@
147155
'guest_theme' => 'default',
148156
'minify_css' => '0',
149157
'minify_js' => '0',
150-
'version' => '0.3.1.18',
158+
'version' => '0.3.1.19',
151159
'author' => 'Alex Weissman',
152160
'show_terms_on_register' => '1',
153161
'site_location' => 'The State of Indiana'

userfrosting/models/auth/AccessConditionExpression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function evaluateCondition($condition, $params){
6767
$params['self'] = $this->_app->user->export();
6868

6969
$route = $this->_app->router()->getCurrentRoute();
70-
$params['route'] = $route->getParams();
70+
$params['route'] = (is_null($route) ? [] : $route->getParams());
7171

7272
/* Traverse the parse tree, and execute all function calls as methods of class AccessCondition.
7373
Replace the function node with the return value of the method.

userfrosting/models/database/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static function isLoggedIn(){
8989
*
9090
* @see http://stackoverflow.com/a/27748794/2970321
9191
*/
92-
public function fresh(array $options = []){
92+
public function fresh($options = []){
9393
// TODO: Update table and column info, in case it has changed?
9494
$user = parent::fresh($options);
9595
$user->getGroupIds();

userfrosting/templates/themes/default/errors/404.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{% block content %}
1414
<div class="container text-center">
1515
<h1>Error 404</h1>
16-
<img src="{{site.uri.image}}/fry.png">
16+
<img class="img-fluid m-b-1 m-x-auto" src="{{site.uri.image}}/fry.png">
1717
<br><br>
1818
<p class="lead">Either way, click <a href="{{site.uri.public}}">here</a> to return to the front page.</p>
1919
</div> <!-- /container -->

userfrosting/templates/themes/default/errors/bad-config.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{% block content %}
1414
<div class="container text-center">
1515
<h1>Your server doesn't seem to be configured properly.</h1>
16-
<img src="{{site.uri.image}}/eniac.png">
16+
<img class="img-fluid m-b-1 m-x-auto" src="{{site.uri.image}}/eniac.png">
1717
<br><br>
1818
<p class="lead">Specifically, it looks like you are using Apache but don't have the <code>mod_rewrite</code> module enabled. Please see the <a href="http://www.userfrosting.com/troubleshooting/#blank-page">troubleshooting guide</a> to get this sorted out.</p>
1919
</div> <!-- /container -->

userfrosting/templates/themes/default/errors/compromised.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
{% block content %}
1414
<div class="container text-center">
1515
<h1>Your account may have been compromised!</h1>
16-
<img src="{{site.uri.image}}/compromised.jpg">
16+
<img class="img-fluid m-b-1 m-x-auto" src="{{site.uri.image}}/compromised.jpg">
1717
<br><br>
18-
<p class="lead">Someone may have used your login information to acccess this page. For your safety, all sessions were logged out. Please <a href="{{site.uri.public}}/account/login">log in</a> and check your account for suspicious activity. You may also wish to change your password.</p>
18+
<p class="lead">Someone may have used your login information to access this page. For your safety, all sessions were logged out. Please <a href="{{site.uri.public}}/account/login">log in</a> and check your account for suspicious activity. You may also wish to change your password.</p>
1919
</div> <!-- /container -->
2020
{% endblock %}

userfrosting/templates/themes/default/errors/database.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{% block content %}
1414
<div class="container text-center">
1515
<h1>We can't seem to connect to the database.</h1>
16-
<img class="img-fluid" src="{{site.uri.image}}/database.png">
16+
<img class="img-fluid m-b-1 m-x-auto" src="{{site.uri.image}}/database.png">
1717
<br><br>
1818
<p class="lead">Have you tried hacking into the mainframe? Seriously though, check your PHP error log to figure out what's up. You probably just need to enter your database credentials in <code>userfrosting/config-userfrosting.php</code>. If you are sure that your credentials are fine, try simply reloading the page.</p>
1919
</div> <!-- /container -->

0 commit comments

Comments
 (0)