Skip to content

Commit 49ff47f

Browse files
committed
Merge branch 'develop' into visited_link-color-change
2 parents 5eebdcd + 77c978d commit 49ff47f

File tree

12 files changed

+53
-27
lines changed

12 files changed

+53
-27
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3298,6 +3298,15 @@
32983298
"contributions": [
32993299
"code"
33003300
]
3301+
},
3302+
{
3303+
"login": "Fiala06",
3304+
"name": "Fiala06",
3305+
"avatar_url": "https://avatars.githubusercontent.com/u/5183146?v=4",
3306+
"profile": "https://github.com/Fiala06",
3307+
"contributions": [
3308+
"code"
3309+
]
33013310
}
33023311
]
33033312
}

CONTRIBUTORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Thanks goes to all of these wonderful people ([emoji key](https://github.com/ken
5353
| [<img src="https://avatars.githubusercontent.com/u/55590532?v=4" width="110px;"/><br /><sub>squintfox</sub>](https://github.com/squintfox)<br />[💻](https://github.com/snipe/snipe-it/commits?author=squintfox "Code") | [<img src="https://avatars.githubusercontent.com/u/1380084?v=4" width="110px;"/><br /><sub>Jeff Clay</sub>](https://github.com/jeffclay)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jeffclay "Code") | [<img src="https://avatars.githubusercontent.com/u/52716446?v=4" width="110px;"/><br /><sub>Phil J R</sub>](https://github.com/PP-JN-RL)<br />[💻](https://github.com/snipe/snipe-it/commits?author=PP-JN-RL "Code") | [<img src="https://avatars.githubusercontent.com/u/1496725?v=4" width="110px;"/><br /><sub>i_virus</sub>](https://www.corelight.com/)<br />[💻](https://github.com/snipe/snipe-it/commits?author=chandanchowdhury "Code") | [<img src="https://avatars.githubusercontent.com/u/1020541?v=4" width="110px;"/><br /><sub>Paul Grime</sub>](https://github.com/gitgrimbo)<br />[💻](https://github.com/snipe/snipe-it/commits?author=gitgrimbo "Code") | [<img src="https://avatars.githubusercontent.com/u/922815?v=4" width="110px;"/><br /><sub>Lee Porte</sub>](https://leeporte.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=LeePorte "Code") | [<img src="https://avatars.githubusercontent.com/u/23613427?v=4" width="110px;"/><br /><sub>BRYAN </sub>](https://github.com/bryanlopezinc)<br />[💻](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Code") [⚠️](https://github.com/snipe/snipe-it/commits?author=bryanlopezinc "Tests") |
5454
| [<img src="https://avatars.githubusercontent.com/u/64061710?v=4" width="110px;"/><br /><sub>U-H-T</sub>](https://github.com/U-H-T)<br />[💻](https://github.com/snipe/snipe-it/commits?author=U-H-T "Code") | [<img src="https://avatars.githubusercontent.com/u/5395363?v=4" width="110px;"/><br /><sub>Matt Tyree</sub>](https://github.com/Tyree)<br />[📖](https://github.com/snipe/snipe-it/commits?author=Tyree "Documentation") | [<img src="https://avatars.githubusercontent.com/u/292081?v=4" width="110px;"/><br /><sub>Florent Bervas</sub>](http://spoontux.net)<br />[💻](https://github.com/snipe/snipe-it/commits?author=FlorentDotMe "Code") | [<img src="https://avatars.githubusercontent.com/u/4498077?v=4" width="110px;"/><br /><sub>Daniel Albertsen</sub>](https://ditscheri.com)<br />[💻](https://github.com/snipe/snipe-it/commits?author=dbakan "Code") | [<img src="https://avatars.githubusercontent.com/u/100710244?v=4" width="110px;"/><br /><sub>r-xyz</sub>](https://github.com/r-xyz)<br />[💻](https://github.com/snipe/snipe-it/commits?author=r-xyz "Code") | [<img src="https://avatars.githubusercontent.com/u/47491036?v=4" width="110px;"/><br /><sub>Steven Mainor</sub>](https://github.com/DrekiDegga)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DrekiDegga "Code") | [<img src="https://avatars.githubusercontent.com/u/65785975?v=4" width="110px;"/><br /><sub>arne-kroeger</sub>](https://github.com/arne-kroeger)<br />[💻](https://github.com/snipe/snipe-it/commits?author=arne-kroeger "Code") |
5555
| [<img src="https://avatars.githubusercontent.com/u/167117705?v=4" width="110px;"/><br /><sub>Glukose1</sub>](https://github.com/Glukose1)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Glukose1 "Code") | [<img src="https://avatars.githubusercontent.com/u/1197791?v=4" width="110px;"/><br /><sub>Scarzy</sub>](https://github.com/Scarzy)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Scarzy "Code") | [<img src="https://avatars.githubusercontent.com/u/37372069?v=4" width="110px;"/><br /><sub>setpill</sub>](https://github.com/setpill)<br />[💻](https://github.com/snipe/snipe-it/commits?author=setpill "Code") | [<img src="https://avatars.githubusercontent.com/u/3755203?v=4" width="110px;"/><br /><sub>swift2512</sub>](https://github.com/swift2512)<br />[🐛](https://github.com/snipe/snipe-it/issues?q=author%3Aswift2512 "Bug reports") | [<img src="https://avatars.githubusercontent.com/u/6136439?v=4" width="110px;"/><br /><sub>Darren Rainey</sub>](https://darrenraineys.co.uk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=DarrenRainey "Code") | [<img src="https://avatars.githubusercontent.com/u/133033121?v=4" width="110px;"/><br /><sub>maciej-poleszczyk</sub>](https://github.com/maciej-poleszczyk)<br />[💻](https://github.com/snipe/snipe-it/commits?author=maciej-poleszczyk "Code") | [<img src="https://avatars.githubusercontent.com/u/143394709?v=4" width="110px;"/><br /><sub>Sebastian Groß</sub>](https://github.com/sgross-emlix)<br />[💻](https://github.com/snipe/snipe-it/commits?author=sgross-emlix "Code") |
56-
| [<img src="https://avatars.githubusercontent.com/u/41107778?v=4" width="110px;"/><br /><sub>Anouar Touati</sub>](https://github.com/AnouarTouati)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AnouarTouati "Code") | [<img src="https://avatars.githubusercontent.com/u/25596663?v=4" width="110px;"/><br /><sub>aHVzY2g</sub>](https://github.com/aHVzY2g)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aHVzY2g "Code") | [<img src="https://avatars.githubusercontent.com/u/13408130?v=4" width="110px;"/><br /><sub>林博仁 Buo-ren Lin</sub>](https://brlin.me)<br />[💻](https://github.com/snipe/snipe-it/commits?author=brlin-tw "Code") | [<img src="https://avatars.githubusercontent.com/u/18550946?v=4" width="110px;"/><br /><sub>Adugna Gizaw</sub>](https://orbalia.pythonanywhere.com/)<br />[🌍](#translation-addex12 "Translation") | [<img src="https://avatars.githubusercontent.com/u/760989?v=4" width="110px;"/><br /><sub>Jesse Ostrander</sub>](https://github.com/jostrander)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jostrander "Code") | [<img src="https://avatars.githubusercontent.com/u/31522486?v=4" width="110px;"/><br /><sub>James M</sub>](https://github.com/azmcnutt)<br />[💻](https://github.com/snipe/snipe-it/commits?author=azmcnutt "Code") |
56+
| [<img src="https://avatars.githubusercontent.com/u/41107778?v=4" width="110px;"/><br /><sub>Anouar Touati</sub>](https://github.com/AnouarTouati)<br />[💻](https://github.com/snipe/snipe-it/commits?author=AnouarTouati "Code") | [<img src="https://avatars.githubusercontent.com/u/25596663?v=4" width="110px;"/><br /><sub>aHVzY2g</sub>](https://github.com/aHVzY2g)<br />[💻](https://github.com/snipe/snipe-it/commits?author=aHVzY2g "Code") | [<img src="https://avatars.githubusercontent.com/u/13408130?v=4" width="110px;"/><br /><sub>林博仁 Buo-ren Lin</sub>](https://brlin.me)<br />[💻](https://github.com/snipe/snipe-it/commits?author=brlin-tw "Code") | [<img src="https://avatars.githubusercontent.com/u/18550946?v=4" width="110px;"/><br /><sub>Adugna Gizaw</sub>](https://orbalia.pythonanywhere.com/)<br />[🌍](#translation-addex12 "Translation") | [<img src="https://avatars.githubusercontent.com/u/760989?v=4" width="110px;"/><br /><sub>Jesse Ostrander</sub>](https://github.com/jostrander)<br />[💻](https://github.com/snipe/snipe-it/commits?author=jostrander "Code") | [<img src="https://avatars.githubusercontent.com/u/31522486?v=4" width="110px;"/><br /><sub>James M</sub>](https://github.com/azmcnutt)<br />[💻](https://github.com/snipe/snipe-it/commits?author=azmcnutt "Code") | [<img src="https://avatars.githubusercontent.com/u/5183146?v=4" width="110px;"/><br /><sub>Fiala06</sub>](https://github.com/Fiala06)<br />[💻](https://github.com/snipe/snipe-it/commits?author=Fiala06 "Code") |
5757
<!-- ALL-CONTRIBUTORS-LIST:END -->
5858

5959
This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!

app/Console/Commands/SendExpirationAlerts.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct()
4242
public function handle()
4343
{
4444
$settings = Setting::getSettings();
45-
$threshold = $settings->alert_interval;
45+
$alert_interval = $settings->alert_interval;
4646

4747
if (($settings->alert_email != '') && ($settings->alerts_enabled == 1)) {
4848

@@ -51,18 +51,18 @@ public function handle()
5151
->map(fn($item) => trim($item)) // Trim each email
5252
->all();
5353
// Expiring Assets
54-
$assets = Asset::getExpiringWarrantee($threshold);
54+
$assets = Asset::getExpiringWarrantee($alert_interval);
5555

5656
if ($assets->count() > 0) {
57-
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $threshold]));
58-
Mail::to($recipients)->send(new ExpiringAssetsMail($assets, $threshold));
57+
$this->info(trans_choice('mail.assets_warrantee_alert', $assets->count(), ['count' => $assets->count(), 'threshold' => $alert_interval]));
58+
Mail::to($recipients)->send(new ExpiringAssetsMail($assets, $alert_interval));
5959
}
6060

6161
// Expiring licenses
62-
$licenses = License::getExpiringLicenses($threshold);
62+
$licenses = License::getExpiringLicenses($alert_interval);
6363
if ($licenses->count() > 0) {
64-
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $threshold]));
65-
Mail::to($recipients)->send(new ExpiringLicenseMail($licenses, $threshold));
64+
$this->info(trans_choice('mail.license_expiring_alert', $licenses->count(), ['count' => $licenses->count(), 'threshold' => $alert_interval]));
65+
Mail::to($recipients)->send(new ExpiringLicenseMail($licenses, $alert_interval));
6666
}
6767
} else {
6868
if ($settings->alert_email == '') {

app/Exceptions/Handler.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ public function render($request, Throwable $e)
125125
// This is traaaaash but it handles models that are not found while using route model binding :(
126126
// The only alternative is to set that at *each* route, which is crazypants
127127
if ($e instanceof \Illuminate\Database\Eloquent\ModelNotFoundException) {
128-
$model_name = last(explode('\\', $e->getModel()));
128+
129+
// This gets the MVC model name from the exception and formats in a way that's less fugly
130+
$model_name = strtolower(implode(" ", preg_split('/(?=[A-Z])/', last(explode('\\', $e->getModel())))));
129131
$route = str_plural(strtolower(last(explode('\\', $e->getModel())))).'.index';
130132

131133
// Sigh.

app/Http/Controllers/SettingsController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,8 @@ public function postLdapSettings(StoreLdapSettings $request) : RedirectResponse
850850
$setting->ldap_fname_field = $request->input('ldap_fname_field');
851851
$setting->ldap_auth_filter_query = $request->input('ldap_auth_filter_query');
852852
$setting->ldap_version = $request->input('ldap_version', 3);
853-
$setting->ldap_active_flag = $request->input('ldap_active_flag');
854-
$setting->ldap_invert_active_flag = $request->input('ldap_invert_active_flag');
853+
$setting->ldap_active_flag = $request->input('ldap_active_flag', 0);
854+
$setting->ldap_invert_active_flag = $request->input('ldap_invert_active_flag', 0);
855855
$setting->ldap_emp_num = $request->input('ldap_emp_num');
856856
$setting->ldap_email = $request->input('ldap_email');
857857
$setting->ldap_manager = $request->input('ldap_manager');

app/Models/Asset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ public static function getExpiringWarrantee($days = 30)
785785
->whereNotNull('warranty_months')
786786
->whereNotNull('purchase_date')
787787
->whereNull('deleted_at')
788-
->whereRaw('DATE_ADD(`purchase_date`,INTERVAL `warranty_months` MONTH) <= DATE(NOW() + INTERVAL '
788+
->whereRaw('DATE_ADD(`purchase_date`, INTERVAL `warranty_months` MONTH) <= DATE_ADD(NOW(), INTERVAL '
789789
. $days
790790
. ' DAY) AND DATE_ADD(`purchase_date`, INTERVAL `warranty_months` MONTH) > NOW()')
791791
->orderByRaw('DATE_ADD(`purchase_date`,INTERVAL `warranty_months` MONTH)')

config/version.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22
return array (
3-
'app_version' => 'v8.0.2',
4-
'full_app_version' => 'v8.0.2 - build 17048-g44dd06161',
5-
'build_version' => '17048',
3+
'app_version' => 'v8.0.3',
4+
'full_app_version' => 'v8.0.3 - build 17154-ged8a48672',
5+
'build_version' => '17154',
66
'prerelease_version' => '',
7-
'hash_version' => 'g44dd06161',
8-
'full_hash' => 'v8.0.2-54-g44dd06161',
7+
'hash_version' => 'ged8a48672',
8+
'full_hash' => 'v8.0.3-99-ged8a48672',
99
'branch' => 'develop',
1010
);

database/migrations/2025_02_26_153413_add_ldap_invert_active_flag_to_setting_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public function up(): void
1313
{
1414
Schema::table('settings', function (Blueprint $table) {
15-
$table->boolean('ldap_invert_active_flag')->default(false);
15+
$table->boolean('ldap_invert_active_flag')->default(0);
1616
});
1717
}
1818

resources/views/hardware/view.blade.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1211,7 +1211,11 @@ class="form-inline"
12111211
<a href="{{ route('components.show', $component->id) }}">{{ $component->name }}</a>
12121212
</td>
12131213
<td>{{ $component->pivot->assigned_qty }}</td>
1214-
<td>{{ trans('general.cost_each', ['amount' => Helper::formatCurrencyOutput($component->purchase_cost)]) }} </td>
1214+
<td>
1215+
@if ($component->purchase_cost!='')
1216+
{{ trans('general.cost_each', ['amount' => Helper::formatCurrencyOutput($component->purchase_cost)]) }}
1217+
@endif
1218+
</td>
12151219
<td>{{ $component->serial }}</td>
12161220
<td>
12171221
<a href="{{ route('components.checkin.show', $component->pivot->id) }}" class="btn btn-sm bg-purple hidden-print" data-tooltip="true">{{ trans('general.checkin') }}</a>

resources/views/settings/ldap.blade.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@
171171
<!-- LDAP Client-Side TLS key -->
172172
<div class="form-group {{ $errors->has('ldap_client_tls_key') ? 'error' : '' }}">
173173
<div class="col-md-3">
174-
{{ Form::label('ldap_client_tls_key', trans('admin/settings/general.ldap_client_tls_key')) }}
174+
<label for="ldap_client_tls_key">
175+
{{ trans('admin/settings/general.ldap_client_tls_key') }}
176+
</label>
175177
</div>
176178
<div class="col-md-8">
177179
<x-input.textarea
@@ -557,27 +559,34 @@
557559
<!-- LDAP invert active flag -->
558560
<div class="form-group">
559561
<div class="col-md-3">
560-
{{ Form::label('ldap_invert_active_flag', trans('admin/settings/general.ldap_invert_active_flag')) }}
562+
<label for="ldap_invert_active_flag">
563+
{{ trans('admin/settings/general.ldap_invert_active_flag') }}
564+
</label>
561565
</div>
562566
<div class="col-md-8">
563567
<label class="form-control">
564568
<input type="checkbox" name="ldap_invert_active_flag" value="1" id="ldap_invert_active_flag" @checked(old('ldap_invert_active_flag', $setting->ldap_invert_active_flag)) />
565-
<p class="help-block">{!! trans('admin/settings/general.ldap_invert_active_flag_help') !!}</p>
569+
{{ trans('general.yes') }}
566570
</label>
567571
@error('ldap_invert_active_flag')
568-
<span class="alert-msg">
572+
<span class="alert-msg">
569573
<x-icon type="x" />
570574
{{ $message }}
571575
</span>
572576
@enderror
573577

578+
<p class="help-block">
579+
{!! trans('admin/settings/general.ldap_invert_active_flag_help') !!}
580+
</p>
581+
574582
@if (config('app.lock_passwords')===true)
575583
<p class="text-warning">
576584
<x-icon type="locked" />
577-
{{ trans('general.feature_disabled') }}
585+
{!! trans('general.feature_disabled') !!}
578586
</p>
579587
@endif
580588
</div>
589+
581590
</div>
582591

583592
<!-- LDAP emp number -->

0 commit comments

Comments
 (0)