Merge branch 'master' into v2.2

This commit is contained in:
Andy Heathershaw 2019-08-06 21:18:09 +01:00
commit 5d84a67085
4 changed files with 15 additions and 2 deletions

View File

@ -204,16 +204,19 @@ class DefaultController extends Controller
return redirect($returnUrl);
}
$albumViews = UserConfig::allowedAlbumViews();
$album = new Album();
$album->storage_id = Storage::where('is_default', true)->first()->id;
$album->user_id = Auth::user()->id;
$album->default_view = UserConfig::get('default_album_view');
$album->name = $albumName;
$album->description = '';
$album->is_permissions_inherited = true;
$album->save();
// Rebuild the permissions cache
$helper = new PermissionsHelper();
$helper->rebuildCache();
$request->request->set('album_id', $album->id);
}

View File

@ -5,6 +5,7 @@ namespace App\Http\Middleware;
use App\DataMigration;
use App\Facade\UserConfig;
use App\Helpers\MiscHelper;
use App\Helpers\PermissionsHelper;
use Closure;
use Illuminate\Foundation\Application;
use Illuminate\Http\Request;
@ -133,6 +134,10 @@ class AppInstallation
// Save the new version number
$versionNumber->value = $appVersionNumber;
$versionNumber->save();
// Rebuild the permissions cache
$helper = new PermissionsHelper();
$helper->rebuildCache();
}
}
}

View File

@ -14,6 +14,7 @@ return [
'post_max_exceeded' => 'Your upload exceeded the maximum size the web server is configured to allow. Please check the value of the "post_max_size" parameter in php.ini.',
'powered_by' => 'Powered by :link_startBlue Twilight:link_end - the self-hosted PHP photo gallery software.',
'quick_upload' => [
'inherit_by_default' => 'A new album will inherit your gallery\'s default permissions. You can change this afterwards on the album\'s Permissions tab.',
'intro' => 'Use the quick upload feature to quickly add a new photo to an album.',
'or' => '- or -',
'title' => 'Quick Upload'

View File

@ -31,6 +31,10 @@
<label class="control-label" for="quick-upload-album-name">@lang('forms.create_album_label')</label>
<input type="text" name="album_name" class="form-control" id="quick-upload-album-name" />
<div class="alert alert-info mt-2">
@lang('global.quick_upload.inherit_by_default')
</div>
</div>
</div>
<div class="modal-footer">