mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Remove unused code from UpdateAssetAction.php
Removed commented-out code related to handling encrypted custom fields in UpdateAssetAction.php. This cleanup helps to maintain a more readable and maintainable codebase.
This commit is contained in:
parent
5aa2f307cd
commit
93e42ce939
|
@ -169,30 +169,6 @@ class UpdateAssetAction
|
||||||
// Need to investigate and fix. Using static method for now.
|
// Need to investigate and fix. Using static method for now.
|
||||||
|
|
||||||
// the gui method
|
// the gui method
|
||||||
//if (($model) && ($model->fieldset)) {
|
|
||||||
// foreach ($model->fieldset->fields as $field) {
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// if ($field->field_encrypted == '1') {
|
|
||||||
// if (Gate::allows('assets.view.encrypted_custom_fields')) {
|
|
||||||
// if (is_array($request->input($field->db_column))) {
|
|
||||||
// $asset->{$field->db_column} = Crypt::encrypt(implode(', ', $request->input($field->db_column)));
|
|
||||||
// } else {
|
|
||||||
// $asset->{$field->db_column} = Crypt::encrypt($request->input($field->db_column));
|
|
||||||
// }
|
|
||||||
// throw new CustomFieldPermissionException();
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// if (is_array($request->input($field->db_column))) {
|
|
||||||
// $asset->{$field->db_column} = implode(', ', $request->input($field->db_column));
|
|
||||||
// } else {
|
|
||||||
// $asset->{$field->db_column} = $request->input($field->db_column);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
// the api method
|
|
||||||
$model = $asset->model;
|
$model = $asset->model;
|
||||||
if (($model) && (isset($model->fieldset))) {
|
if (($model) && (isset($model->fieldset))) {
|
||||||
foreach ($model->fieldset->fields as $field) {
|
foreach ($model->fieldset->fields as $field) {
|
||||||
|
|
Loading…
Reference in a new issue