Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
Signed-off-by: snipe <[email protected]>

# Conflicts:
#	config/version.php
  • Loading branch information
snipe committed Jan 22, 2025
2 parents fb857cc + 1212267 commit bebc1f4
Show file tree
Hide file tree
Showing 259 changed files with 3,013 additions and 1,783 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function store(UploadFileRequest $request, $accessoryId = null) : Redirec
}


return redirect()->route('accessories.show', $accessory->id)->with('success', trans('general.file_upload_success'));
return redirect()->route('accessories.show', $accessory->id)->withFragment('files')->with('success', trans('general.file_upload_success'));

}

Expand Down Expand Up @@ -90,8 +90,7 @@ public function destroy($accessoryId = null, $fileId = null) : RedirectResponse

$log->delete();

return redirect()->back()
->with('success', trans('admin/hardware/message.deletefile.success'));
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
}

// Redirect to the licence management page
Expand Down
9 changes: 4 additions & 5 deletions app/Http/Controllers/AssetModelsFilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ public function store(UploadFileRequest $request, $modelId = null) : RedirectRes
$model->logUpload($file_name, $request->get('notes'));
}

return redirect()->back()->with('success', trans('general.file_upload_success'));
return redirect()->back()->withFragment('files')->with('success', trans('general.file_upload_success'));
}

return redirect()->back()->with('error', trans('admin/hardware/message.upload.nofiles'));
return redirect()->back()->withFragment('files')->with('error', trans('admin/hardware/message.upload.nofiles'));
}

/**
Expand Down Expand Up @@ -119,11 +119,10 @@ public function destroy($modelId = null, $fileId = null) : RedirectResponse
}
$log->delete();

return redirect()->back()->with('success', trans('admin/hardware/message.deletefile.success'));
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
}

return redirect()->back()
->with('success', trans('admin/hardware/message.deletefile.success'));
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
}

// Redirect to the hardware management page
Expand Down
20 changes: 7 additions & 13 deletions app/Http/Controllers/Assets/AssetFilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function store(UploadFileRequest $request, $assetId = null) : RedirectRes
$asset->logUpload($file_name, $request->get('notes'));
}

return redirect()->back()->with('success', trans('admin/hardware/message.upload.success'));
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.upload.success'));
}

return redirect()->back()->with('error', trans('admin/hardware/message.upload.nofiles'));
Expand Down Expand Up @@ -97,25 +97,19 @@ public function show($assetId = null, $fileId = null) : View | RedirectResponse
*/
public function destroy($assetId = null, $fileId = null) : RedirectResponse
{
$asset = Asset::find($assetId);
$this->authorize('update', $asset);
$rel_path = 'private_uploads/assets';

// the asset is valid
if (isset($asset->id)) {
if ($asset = Asset::find($assetId)) {
$this->authorize('update', $asset);
$log = Actionlog::find($fileId);
if ($log) {
$rel_path = 'private_uploads/assets';

if ($log = Actionlog::find($fileId)) {
if (Storage::exists($rel_path.'/'.$log->filename)) {
Storage::delete($rel_path.'/'.$log->filename);
}
$log->delete();

return redirect()->back()->with('success', trans('admin/hardware/message.deletefile.success'));
return redirect()->back()->withFragment('files')->with('success', trans('admin/hardware/message.deletefile.success'));
}

return redirect()->back()
->with('success', trans('admin/hardware/message.deletefile.success'));
return redirect()->route('hardware.show', ['hardware' => $asset])->with('error', trans('general.log_record_not_found'));
}

return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.does_not_exist'));
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Components/ComponentsFilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function store(UploadFileRequest $request, $componentId = null)
}


return redirect()->route('components.show', $component->id)->with('success', trans('general.file_upload_success'));
return redirect()->route('components.show', $component->id)->withFragment('files')->with('success', trans('general.file_upload_success'));

}

Expand Down Expand Up @@ -91,7 +91,7 @@ public function destroy($componentId = null, $fileId = null)

$log->delete();

return redirect()->back()
return redirect()->back()->withFragment('files')
->with('success', trans('admin/hardware/message.deletefile.success'));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function store(UploadFileRequest $request, $consumableId = null)
}


return redirect()->route('consumables.show', $consumable->id)->with('success', trans('general.file_upload_success'));
return redirect()->route('consumables.show', $consumable->id)->withFragment('files')->with('success', trans('general.file_upload_success'));

}

Expand Down Expand Up @@ -89,7 +89,7 @@ public function destroy($consumableId = null, $fileId = null)

$log->delete();

return redirect()->back()
return redirect()->back()->withFragment('files')
->with('success', trans('admin/hardware/message.deletefile.success'));
}

Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Users/UserFilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function store(UploadFileRequest $request, $userId = null)
$logActions[] = $logAction;
}
// dd($logActions);
return redirect()->back()->with('success', trans('admin/users/message.upload.success'));
return redirect()->back()->withFragment('files')->with('success', trans('admin/users/message.upload.success'));
}
return redirect()->back()->with('error', trans('admin/users/message.upload.nofiles'));

Expand Down Expand Up @@ -87,7 +87,7 @@ public function destroy($userId = null, $fileId = null)

if (Storage::exists($rel_path.'/'.$filename)) {
Storage::delete($rel_path.'/'.$filename);
return redirect()->back()->with('success', trans('admin/users/message.deletefile.success'));
return redirect()->back()->withFragment('files')->with('success', trans('admin/users/message.deletefile.success'));
}

}
Expand Down
3 changes: 0 additions & 3 deletions app/Http/Requests/UploadFileRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ public function handleFile(string $dirname, string $name_prefix, $file): string
$extension = $file->getClientOriginalExtension();
$file_name = $name_prefix.'-'.str_random(8).'-'.str_slug(basename($file->getClientOriginalName(), '.'.$extension)).'.'.$file->guessExtension();


Log::debug("Your filetype IS: ".$file->getMimeType());
// Check for SVG and sanitize it
if ($file->getMimeType() === 'image/svg+xml') {
Log::debug('This is an SVG');
Expand All @@ -66,7 +64,6 @@ public function handleFile(string $dirname, string $name_prefix, $file): string

} else {
$put_results = Storage::put($dirname.$file_name, file_get_contents($file));
Log::debug("Here are the '$put_results' (should be 0 or 1 or true or false or something?)");
}
return $file_name;
}
Expand Down
10 changes: 5 additions & 5 deletions config/version.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php
return array (
'app_version' => 'v7.1.15',
'full_app_version' => 'v7.1.15 - build 16526-g5e465fa41',
'build_version' => '16526',
'app_version' => 'v7.1.16',
'full_app_version' => 'v7.1.16 - build 16564-gfb857ccf5',
'build_version' => '16564',
'prerelease_version' => '',
'hash_version' => 'g5e465fa41',
'full_hash' => 'v7.1.15-472-g5e465fa41',
'hash_version' => 'gfb857ccf5',
'full_hash' => 'v7.1.16-510-gfb857ccf5',
'branch' => 'master',
);
28 changes: 18 additions & 10 deletions resources/lang/aa-ER/admin/settings/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
'footer_text' => 'crwdns1987:0crwdne1987:0',
'footer_text_help' => 'crwdns1988:0crwdne1988:0',
'general_settings' => 'crwdns1297:0crwdne1297:0',
'general_settings_keywords' => 'crwdns12084:0crwdne12084:0',
'general_settings_help' => 'crwdns6341:0crwdne6341:0',
'generate_backup' => 'crwdns1427:0crwdne1427:0',
'google_workspaces' => 'crwdns12080:0crwdne12080:0',
Expand Down Expand Up @@ -154,7 +153,6 @@
'php' => 'crwdns1120:0crwdne1120:0',
'php_info' => 'crwdns12298:0crwdne12298:0',
'php_overview' => 'crwdns6367:0crwdne6367:0',
'php_overview_keywords' => 'crwdns6369:0crwdne6369:0',
'php_overview_help' => 'crwdns6371:0crwdne6371:0',
'php_gd_info' => 'crwdns833:0crwdne833:0',
'php_gd_warning' => 'crwdns834:0crwdne834:0',
Expand Down Expand Up @@ -231,7 +229,6 @@
'update' => 'crwdns840:0crwdne840:0',
'value' => 'crwdns841:0crwdne841:0',
'brand' => 'crwdns1433:0crwdne1433:0',
'brand_keywords' => 'crwdns6397:0crwdne6397:0',
'brand_help' => 'crwdns6399:0crwdne6399:0',
'web_brand' => 'crwdns5916:0crwdne5916:0',
'about_settings_title' => 'crwdns1434:0crwdne1434:0',
Expand Down Expand Up @@ -319,21 +316,17 @@
'filter_by_keyword' => 'crwdns6431:0crwdne6431:0',
'security' => 'crwdns6433:0crwdne6433:0',
'security_title' => 'crwdns6435:0crwdne6435:0',
'security_keywords' => 'crwdns6437:0crwdne6437:0',
'security_help' => 'crwdns6439:0crwdne6439:0',
'groups_keywords' => 'crwdns6441:0crwdne6441:0',
'groups_help' => 'crwdns6443:0crwdne6443:0',
'localization' => 'crwdns6445:0crwdne6445:0',
'localization_title' => 'crwdns6447:0crwdne6447:0',
'localization_keywords' => 'crwdns6449:0crwdne6449:0',
'localization_help' => 'crwdns6451:0crwdne6451:0',
'notifications' => 'crwdns6453:0crwdne6453:0',
'notifications_help' => 'crwdns11363:0crwdne11363:0',
'asset_tags_help' => 'crwdns6457:0crwdne6457:0',
'labels' => 'crwdns6459:0crwdne6459:0',
'labels_title' => 'crwdns6461:0crwdne6461:0',
'labels_help' => 'crwdns6463:0crwdne6463:0',
'purge_keywords' => 'crwdns6467:0crwdne6467:0',
'labels_help' => 'crwdns12840:0crwdne12840:0',
'purge_help' => 'crwdns6469:0crwdne6469:0',
'ldap_extension_warning' => 'crwdns6471:0crwdne6471:0',
'ldap_ad' => 'crwdns6473:0crwdne6473:0',
Expand Down Expand Up @@ -362,12 +355,14 @@
'label2_2d_type' => 'crwdns11745:0crwdne11745:0',
'label2_2d_type_help' => 'crwdns11747:0crwdne11747:0',
'label2_2d_target' => 'crwdns11749:0crwdne11749:0',
'label2_2d_target_help' => 'crwdns11751:0crwdne11751:0',
'label2_2d_target_help' => 'crwdns12832:0crwdne12832:0',
'label2_fields' => 'crwdns11753:0crwdne11753:0',
'label2_fields_help' => 'crwdns11755:0crwdne11755:0',
'help_asterisk_bold' => 'crwdns11757:0crwdne11757:0',
'help_blank_to_use' => 'crwdns11759:0crwdne11759:0',
'help_default_will_use' => 'crwdns12828:0crwdne12828:0',
'help_default_will_use' => 'crwdns12834:0crwdne12834:0',
'asset_id' => 'crwdns12836:0crwdne12836:0',
'data' => 'crwdns12838:0crwdne12838:0',
'default' => 'crwdns11763:0crwdne11763:0',
'none' => 'crwdns11765:0crwdne11765:0',
'google_callback_help' => 'crwdns11615:0crwdne11615:0',
Expand All @@ -389,4 +384,17 @@
'due_checkin_days_help' => 'crwdns12682:0crwdne12682:0',
'no_groups' => 'crwdns12760:0crwdne12760:0',


/* Keywords for settings overview help */
'keywords' => [
'brand' => 'crwdns12842:0crwdne12842:0',
'general_settings' => 'crwdns12844:0crwdne12844:0',
'groups' => 'crwdns12846:0crwdne12846:0',
'labels' => 'crwdns12848:0crwdne12848:0',
'localization' => 'crwdns12850:0crwdne12850:0',
'php_overview' => 'crwdns12852:0crwdne12852:0',
'purge' => 'crwdns12854:0crwdne12854:0',
'security' => 'crwdns12856:0crwdne12856:0',
],

];
1 change: 1 addition & 0 deletions resources/lang/aa-ER/admin/settings/message.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
'error' => 'crwdns11381:0crwdne11381:0',
'error_redirect' => 'crwdns11843:0crwdne11843:0',
'error_misc' => 'crwdns11383:0crwdne11383:0',
'webhook_fail' => 'crwdns12830:0crwdne12830:0',
]
];
9 changes: 9 additions & 0 deletions resources/lang/aa-ER/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@
'no_results' => 'crwdns1074:0crwdne1074:0',
'no' => 'crwdns1075:0crwdne1075:0',
'notes' => 'crwdns1076:0crwdne1076:0',
'note_added' => 'crwdns12858:0crwdne12858:0',
'add_note' => 'crwdns12860:0crwdne12860:0',
'note_edited' => 'crwdns12862:0crwdne12862:0',
'edit_note' => 'crwdns12864:0crwdne12864:0',
'note_deleted' => 'crwdns12866:0crwdne12866:0',
'delete_note' => 'crwdns12868:0crwdne12868:0',
'order_number' => 'crwdns1829:0crwdne1829:0',
'only_deleted' => 'crwdns10520:0crwdne10520:0',
'page_menu' => 'crwdns1276:0crwdne1276:0',
Expand Down Expand Up @@ -566,5 +572,8 @@
'import_asset_tag_exists' => 'crwdns12692:0crwdne12692:0',
'countries_manually_entered_help' => 'crwdns12702:0crwdne12702:0',
'accessories_assigned' => 'crwdns12800:0crwdne12800:0',
'user_managed_passwords' => 'crwdns12870:0crwdne12870:0',
'user_managed_passwords_disallow' => 'crwdns12872:0crwdne12872:0',
'user_managed_passwords_allow' => 'crwdns12874:0crwdne12874:0',

];
28 changes: 18 additions & 10 deletions resources/lang/af-ZA/admin/settings/general.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
'footer_text' => 'Additional Footer Text ',
'footer_text_help' => 'This text will appear in the right-side footer. Links are allowed using <a href="https://help.github.com/articles/github-flavored-markdown/">Github flavored markdown</a>. Line breaks, headers, images, etc may result in unpredictable results.',
'general_settings' => 'Algemene instellings',
'general_settings_keywords' => 'company support, signature, acceptance, email format, username format, images, per page, thumbnail, eula, gravatar, tos, dashboard, privacy',
'general_settings_help' => 'Default EULA and more',
'generate_backup' => 'Genereer rugsteun',
'google_workspaces' => 'Google Workspaces',
Expand Down Expand Up @@ -154,7 +153,6 @@
'php' => 'PHP weergawe',
'php_info' => 'PHP info',
'php_overview' => 'PHP',
'php_overview_keywords' => 'phpinfo, system, info',
'php_overview_help' => 'PHP System info',
'php_gd_info' => 'Jy moet php-gd installeer om QR-kodes te vertoon, sien installeringsinstruksies.',
'php_gd_warning' => 'PHP Image Processing en GD plugin is NIE geïnstalleer nie.',
Expand Down Expand Up @@ -231,7 +229,6 @@
'update' => 'Opdateer instellings',
'value' => 'waarde',
'brand' => 'Handelsmerk',
'brand_keywords' => 'footer, logo, print, theme, skin, header, colors, color, css',
'brand_help' => 'Logo, Site Name',
'web_brand' => 'Web Branding Type',
'about_settings_title' => 'Oor instellings',
Expand Down Expand Up @@ -319,21 +316,17 @@
'filter_by_keyword' => 'Filter by setting keyword',
'security' => 'Security',
'security_title' => 'Update Security Settings',
'security_keywords' => 'password, passwords, requirements, two factor, two-factor, common passwords, remote login, logout, authentication',
'security_help' => 'Two-factor, Password Restrictions',
'groups_keywords' => 'permissions, permission groups, authorization',
'groups_help' => 'Account permission groups',
'localization' => 'Localization',
'localization_title' => 'Update Localization Settings',
'localization_keywords' => 'localization, currency, local, locale, time zone, timezone, international, internatinalization, language, languages, translation',
'localization_help' => 'Language, date display',
'notifications' => 'Notifications',
'notifications_help' => 'Email Alerts & Audit Settings',
'asset_tags_help' => 'Incrementing and prefixes',
'labels' => 'Labels',
'labels_title' => 'Update Label Settings',
'labels_help' => 'Label sizes &amp; settings',
'purge_keywords' => 'permanently delete',
'labels_help' => 'Barcodes &amp; label settings',
'purge_help' => 'Verwyder verwyderde rekords',
'ldap_extension_warning' => 'It does not look like the LDAP extension is installed or enabled on this server. You can still save your settings, but you will need to enable the LDAP extension for PHP before LDAP syncing or login will work.',
'ldap_ad' => 'LDAP/AD',
Expand Down Expand Up @@ -362,12 +355,14 @@
'label2_2d_type' => '2D Barcode Type',
'label2_2d_type_help' => 'Format for 2D barcodes',
'label2_2d_target' => '2D Barcode Target',
'label2_2d_target_help' => 'The URL the 2D barcode points to when scanned',
'label2_2d_target_help' => 'The data that will be contained in the 2D barcode',
'label2_fields' => 'Field Definitions',
'label2_fields_help' => 'Fields can be added, removed, and reordered in the left column. For each field, multiple options for Label and DataSource can be added, removed, and reordered in the right column.',
'help_asterisk_bold' => 'Text entered as <code>**text**</code> will be displayed as bold',
'help_blank_to_use' => 'Leave blank to use the value from <code>:setting_name</code>',
'help_default_will_use' => '<br>Note that the value of the barcodes must comply with the respective barcode spec in order to be successfully generated. Please see <a href="https://snipe-it.readme.io/docs/barcodes">the documentation <i class="fa fa-external-link"></i></a> for more details. ',
'help_default_will_use' => '<code>:default</code> will use the value from <code>:setting_name</code>. <br>Note that the value of the barcodes must comply with the respective barcode spec in order to be successfully generated. Please see <a href="https://snipe-it.readme.io/docs/barcodes">the documentation <i class="fa fa-external-link"></i></a> for more details. ',
'asset_id' => 'Asset ID',
'data' => 'Data',
'default' => 'Default',
'none' => 'None',
'google_callback_help' => 'This should be entered as the callback URL in your Google OAuth app settings in your organization&apos;s <strong><a href="https://console.cloud.google.com/" target="_blank">Google developer console <i class="fa fa-external-link" aria-hidden="true"></i></a></strong>.',
Expand All @@ -389,4 +384,17 @@
'due_checkin_days_help' => 'How many days before the expected checkin of an asset should it be listed in the "Due for checkin" page?',
'no_groups' => 'No groups have been created yet. Visit <code>Admin Settings > Permission Groups</code> to add one.',


/* Keywords for settings overview help */
'keywords' => [
'brand' => 'footer, logo, print, theme, skin, header, colors, color, css',
'general_settings' => 'company support, signature, acceptance, email format, username format, images, per page, thumbnail, eula, gravatar, tos, dashboard, privacy',
'groups' => 'permissions, permission groups, authorization',
'labels' => 'labels, barcodes, barcode, sheets, print, upc, qr, 1d, 2d',
'localization' => 'localization, currency, local, locale, time zone, timezone, international, internatinalization, language, languages, translation',
'php_overview' => 'phpinfo, system, info',
'purge' => 'permanently delete',
'security' => 'password, passwords, requirements, two factor, two-factor, common passwords, remote login, logout, authentication',
],

];
Loading

0 comments on commit bebc1f4

Please sign in to comment.