Skip to content

Commit

Permalink
Merge branch 'develop' into feature/twig-hooks-filters
Browse files Browse the repository at this point in the history
  • Loading branch information
slawkens committed Jul 14, 2024
2 parents 592bfae + cff62cc commit 28d61ee
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions install/steps/7-finish.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@

$account_used->setCustomField('web_flags', FLAG_ADMIN + FLAG_SUPER_ADMIN);
$account_used->setCustomField('country', 'us');
$account_used->setCustomField('email_verified', 1);

if($db->hasColumn('accounts', 'group_id'))
$account_used->setCustomField('group_id', $groups->getHighestId());
if($db->hasColumn('accounts', 'type'))
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ parameters:
- '#Variable \$[a-zA-Z0-9\\_]+ might not be defined#'
# Eloquent models
- '#Call to an undefined static method [a-zA-Z0-9\\_]+::[a-zA-Z0-9\\_]+()#'
- '#Call to an undefined method object::toArray\(\)#'
# system/pages/highscores.php
- '#Call to an undefined method Illuminate\\Database\\Query\\Builder::withOnlineStatus\(\)#'
- '#Access to an undefined property Illuminate\\Database\\Eloquent\\Model::\$online_status#'
Expand Down
7 changes: 5 additions & 2 deletions system/pages/monsters.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@

// display monster
$monster_name = urldecode(stripslashes(ucwords(strtolower($_REQUEST['name']))));
$monster = Monster::where('hide', '!=', 1)->where('name', $monster_name)->first()->toArray();
$monsterModel = Monster::where('hide', '!=', 1)->where('name', $monster_name)->first();

if ($monsterModel && isset($monsterModel->name)) {
/** @var array $monster */
$monster = $monsterModel->toArray();

if (isset($monster['name'])) {
function sort_by_chance($a, $b)
{
if ($a['chance'] == $b['chance']) {
Expand Down
4 changes: 2 additions & 2 deletions system/templates/highscores.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<select onchange="location = this.value;" aria-label="skillFilter" id="skillFilter">
{% set i = 0 %}
{% for link, name in types %}
<option value="{{ getLink('highscores') }}/{{ link }}{% if vocation is defined %}/{{ vocation }}{% endif %}" class="size_xs">{{ name }}</option>
<option value="{{ getLink('highscores') }}/{{ link }}{% if vocation is not null %}{{ vocation }}{% endif %}" class="size_xs">{{ name }}</option>
{% endfor %}
</select>
</td>
Expand Down Expand Up @@ -105,7 +105,7 @@
<tr bgcolor="{{ config.lightborder }}">
<td>
{% for link, name in types %}
<a href="{{ getLink('highscores') }}/{{ link }}{% if vocation is defined %}/{{ vocation }}{% endif %}" class="size_xs">{{ name }}</a><br/>
<a href="{{ getLink('highscores') }}/{{ link }}{% if vocation is not null %}/{{ vocation }}{% endif %}" class="size_xs">{{ name }}</a><br/>
{% endfor %}
</td>
</tr>
Expand Down

0 comments on commit 28d61ee

Please sign in to comment.