Merge remote-tracking branch 'origin/develop'

# Conflicts:
#	config/version.php
This commit is contained in:
snipe 2020-10-21 12:03:23 -07:00
commit 810f6a3970
4 changed files with 8 additions and 61 deletions

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',
'hash_version' => 'g870b097f0',
'full_hash' => 'v5.0.0-1-g870b097f0',
'branch' => 'master',
);

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);
}