Skip to content

Commit 2006920

Browse files
kasper FranzDaneEveritt
authored andcommitted
added a check if the task has run yet (pterodactyl#385)
* added a null check on the last_run * corrected a mistake made when changing the file * another mistake :/ * changed to be less specific and so it checks against the value instead of >
1 parent f59e4e0 commit 2006920

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
55

66
## v0.6.0-beta.3 (Courageous Carniadactylus)
77
### Fixed
8+
* `[beta.2]` — Corrected the information when a task has not run yet.
89
* `[beta.2]` — Fixes filemanager 404 when editing a file within a directory.
10+
* `[beta.2]` — Fixes exception in tasks when deleting a server.
911

1012
## v0.6.0-beta.2 (Courageous Carniadactylus)
1113
### Fixed

resources/lang/en/strings.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
'queued' => 'Queued',
5858
'last_run' => 'Last Run',
5959
'next_run' => 'Next Run',
60+
'not_run_yet' => 'Not Run Yet',
6061
'yes' => 'Yes',
6162
'no' => 'No',
6263
'delete' => 'Delete',

resources/themes/pterodactyl/server/tasks/index.blade.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@
6565
<span class="label label-default">@lang('strings.no')</span>
6666
@endif
6767
</td>
68-
<td class="middle">{{ Carbon::parse($task->last_run)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($task->last_run)->diffForHumans() }})</span></td>
68+
<td class="middle">
69+
@if($task->last_run)
70+
{{ Carbon::parse($task->last_run)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($task->last_run)->diffForHumans() }})</span>
71+
@else
72+
@lang('strings.not_run_yet')
73+
@endif
74+
</td>
6975
<td class="middle">
7076
@if($task->active !== 0)
7177
{{ Carbon::parse($task->next_run)->toDayDateTimeString() }}<br /><span class="text-muted small">({{ Carbon::parse($task->next_run)->diffForHumans() }})</span>

0 commit comments

Comments
 (0)