Merge branch 'master' into v2.2
This commit is contained in:
commit
5d84a67085
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
@ -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'
|
||||
|
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user