Compare commits

..

13 Commits

Author SHA1 Message Date
snipe
81fcb4c7b3 Merge remote-tracking branch 'origin/develop' 2020-10-21 13:33:04 -07:00
snipe
5ae65d5329 Fixed #8566 - PDF files displaying as ascii instead of downloading 2020-10-21 13:32:46 -07:00
snipe
d04b0e4d4b Merge remote-tracking branch 'origin/develop' 2020-10-21 12:23:44 -07:00
snipe
a6d0209e93 Fixed #8567 - don’t require model for custom report 2020-10-21 12:23:27 -07:00
snipe
810f6a3970 Merge remote-tracking branch 'origin/develop'
# Conflicts:
#	config/version.php
2020-10-21 12:03:23 -07:00
snipe
1379821876 Removed accompanying method, since we don’t use it 2020-10-21 12:02:25 -07:00
snipe
33236f16ac Bumped minor version 2020-10-21 12:01:36 -07:00
snipe
90dddee923 Remove the storage moving commands - we don’t use this 2020-10-21 12:00:40 -07:00
snipe
7869ffcc79 Merge pull request #8557 from fashberg/develop
Fixed #8543: Change trustedproxy.php to read env('APP_TRUSTED_PROXIES') again
2020-10-21 11:19:23 -07:00
Folke Ashberg
1687e4b850 Fix for Issue #8543
* trustedproxy.php sets 'proxies' again according to
  env('APP_TRUSTED_PROXIES') again
2020-10-21 10:36:27 +02:00
snipe
c19f1b77b0 Merge pull request #8542 from benwa/patch-2
Fix typo
2020-10-20 10:51:45 -07:00
Bennett Blodinger
132f296f03 Fix typo 2020-10-20 08:13:52 -05:00
snipe
870b097f03 Derp. Should be master 2020-10-19 17:49:56 -07:00
7 changed files with 13 additions and 67 deletions

View File

@@ -143,11 +143,10 @@ class LicenseFilesController extends Controller
// We have to override the URL stuff here, since local defaults in Laravel's Flysystem
// won't work, as they're not accessible via the web
if (config('filesystems.default') == 'local') {
\Log::debug('The private filesystem is local');
return Response::make(Storage::get($file));
return Storage::download($file);
} else {
if ($download != 'true') {
\Log::debug('display the file');
if ($contents = file_get_contents(Storage::url($file))) {
return Response::make(Storage::url($file)->header('Content-Type', mime_content_type($file)));
}

View File

@@ -33,7 +33,8 @@ return [
* how many proxies that client's request has
* subsequently passed through.
*/
'proxies' => null, // [<ip addresses>,], '*'
'proxies' => env('APP_TRUSTED_PROXIES') !== null ?
explode(',', env('APP_TRUSTED_PROXIES')) : '*',
/*
* To trust one or more specific proxies that connect

View File

@@ -1,10 +1,10 @@
<?php
return array (
'app_version' => 'v5.0.0',
'full_app_version' => 'v5.0.0 - build 4484-g33cf4896d',
'build_version' => '4484',
'app_version' => 'v5.0.1',
'full_app_version' => 'v5.0.1 - build 5383-g870b097f0',
'build_version' => '5383',
'prerelease_version' => '',
'hash_version' => 'g33cf4896d',
'full_hash' => 'v5.0.0-1-g33cf4896d',
'branch' => 'develop',
'hash_version' => 'g870b097f0',
'full_hash' => 'v5.0.0-1-g870b097f0',
'branch' => 'master',
);

View File

@@ -47,7 +47,7 @@
</div>
@include ('partials.forms.edit.model-select', ['translated_name' => trans('admin/hardware/form.model'), 'fieldname' => 'model_id', 'required' => 'true'])
@include ('partials.forms.edit.model-select', ['translated_name' => trans('admin/hardware/form.model'), 'fieldname' => 'model_id', 'field_req' => true])
<div id='custom_fields_content'>

View File

@@ -4,7 +4,7 @@
{{ Form::label($fieldname, $translated_name, array('class' => 'col-md-3 control-label')) }}
<div class="col-md-7{{ ((isset($required) && ($required =='true'))) ? ' required' : '' }}">
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}" data-validation="required" required>
<select class="js-data-ajax" data-endpoint="models" data-placeholder="{{ trans('general.select_model') }}" name="{{ $fieldname }}" style="width: 100%" id="model_select_id" aria-label="{{ $fieldname }}" {{ (isset($field_req) ? 'data-validation="required" required' : '') }}>
@if ($model_id = old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $model_id }}" selected="selected">
{{ (\App\Models\AssetModel::find($model_id)) ? \App\Models\AssetModel::find($model_id)->name : '' }}

View File

@@ -128,7 +128,7 @@
<div id="purgebarcodesstatus-error" class="text-danger"></div>
</div>
<div class="col-md-9 col-md-offset-3">
<p class="help-block">This will attempt to delete cached barcodes. This would typically only be used if your barcode dettings have changed, or if your Snipe-IT URL has changed. Barcodes will be re-generated when accessed next.</p>
<p class="help-block">This will attempt to delete cached barcodes. This would typically only be used if your barcode settings have changed, or if your Snipe-IT URL has changed. Barcodes will be re-generated when accessed next.</p>
</div>
</div>

View File

@@ -187,29 +187,6 @@ $up = shell_exec('php artisan up');
echo '-- '.$up."\n\n";
echo "--------------------------------------------------------\n";
echo "Step 11: Checking for v5 public storage directories: \n";
echo "--------------------------------------------------------\n\n";
if ((!file_exists('storage/app/public')) && (!is_dir('storage/app/public'))) {
echo "- No public directory found in storage/app - creating one.\n\n";
if (!mkdir('storage/app/public', 0777, true)) {
echo "ERROR: Failed to create directory at storage/app/public. You should do this manually.\n\n";
}
$storage_simlink = shell_exec('php artisan storage:link');
echo $storage_simlink;
} else {
echo "- Public storage directory already exists. Skipping...\n\n";
}
echo "- Copying files into storage/app/public.\n\n";
if (rmove('public/uploads','storage/app/public')) {
echo "- Copy successful.\n\n";
} else {
echo "- Copy failed - you should do this manually by copying the files from public/uploads into the storage/app/public directory.\n\n";
}
echo "--------------------------------------------------------\n";
echo "FINISHED! Clear your browser cookies and re-login to use :\n";
@@ -217,34 +194,3 @@ echo "your upgraded Snipe-IT.\n";
echo "--------------------------------------------------------\n\n";
/**
* Recursively move files from one directory to another
*
* @param String $src - Source of files being moved
* @param String $dest - Destination of files being moved
*/
function rmove($src, $dest){
// If source is not a directory stop processing
if(!is_dir($src)) return false;
// If the destination directory does not exist create it
if(!is_dir($dest)) {
if(!mkdir($dest)) {
// If the destination directory could not be created stop processing
return false;
}
}
// Open the source directory to read in files
$i = new DirectoryIterator($src);
foreach($i as $f) {
if($f->isFile()) {
rename($f->getRealPath(), "$dest/" . $f->getFilename());
} else if(!$f->isDot() && $f->isDir()) {
rmove($f->getRealPath(), "$dest/$f");
unlink($f->getRealPath());
}
}
unlink($src);
}