3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-03-31 04:44:14 +00:00

Change $request->has to $request->filled unilaterally

This commit is contained in:
snipe
2018-07-24 22:51:31 -07:00
parent 0714ac4248
commit 86c1f11bec
32 changed files with 234 additions and 234 deletions

View File

@ -326,7 +326,7 @@ class SettingsController extends Controller
$setting->modellist_displays = '';
if (($request->has('show_in_model_list')) && (count($request->input('show_in_model_list')) > 0))
if (($request->filled('show_in_model_list')) && (count($request->input('show_in_model_list')) > 0))
{
$setting->modellist_displays = implode(',', $request->input('show_in_model_list'));
}
@ -419,7 +419,7 @@ class SettingsController extends Controller
$setting->brand = 1;
// If they are uploading an image, validate it and upload it
} elseif ($request->hasFile('image')) {
} elseif ($request->filledFile('image')) {
if (!config('app.lock_passwords')) {
$image = $request->file('image');
@ -496,7 +496,7 @@ class SettingsController extends Controller
$setting->pwd_secure_complexity = '';
if ($request->has('pwd_secure_complexity')) {
if ($request->filled('pwd_secure_complexity')) {
$setting->pwd_secure_complexity = implode('|', $request->input('pwd_secure_complexity'));
}
@ -795,31 +795,31 @@ class SettingsController extends Controller
if ($request->has('labels_display_name')) {
if ($request->filled('labels_display_name')) {
$setting->labels_display_name = 1;
} else {
$setting->labels_display_name = 0;
}
if ($request->has('labels_display_serial')) {
if ($request->filled('labels_display_serial')) {
$setting->labels_display_serial = 1;
} else {
$setting->labels_display_serial = 0;
}
if ($request->has('labels_display_tag')) {
if ($request->filled('labels_display_tag')) {
$setting->labels_display_tag = 1;
} else {
$setting->labels_display_tag = 0;
}
if ($request->has('labels_display_tag')) {
if ($request->filled('labels_display_tag')) {
$setting->labels_display_tag = 1;
} else {
$setting->labels_display_tag = 0;
}
if ($request->has('labels_display_model')) {
if ($request->filled('labels_display_model')) {
$setting->labels_display_model = 1;
} else {
$setting->labels_display_model = 0;