Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81fcb4c7b3 | ||
|
|
5ae65d5329 | ||
|
|
d04b0e4d4b | ||
|
|
a6d0209e93 | ||
|
|
810f6a3970 | ||
|
|
1379821876 | ||
|
|
33236f16ac | ||
|
|
90dddee923 | ||
|
|
7869ffcc79 | ||
|
|
1687e4b850 | ||
|
|
c19f1b77b0 | ||
|
|
132f296f03 | ||
|
|
870b097f03 |
@@ -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)));
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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',
|
||||
);
|
||||
@@ -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'>
|
||||
|
||||
@@ -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 : '' }}
|
||||
|
||||
@@ -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>
|
||||
|
||||
54
upgrade.php
54
upgrade.php
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user