Merge branch 'master' into v2.2
This commit is contained in:
commit
5d84a67085
@ -204,16 +204,19 @@ class DefaultController extends Controller
|
|||||||
return redirect($returnUrl);
|
return redirect($returnUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
$albumViews = UserConfig::allowedAlbumViews();
|
|
||||||
|
|
||||||
$album = new Album();
|
$album = new Album();
|
||||||
$album->storage_id = Storage::where('is_default', true)->first()->id;
|
$album->storage_id = Storage::where('is_default', true)->first()->id;
|
||||||
$album->user_id = Auth::user()->id;
|
$album->user_id = Auth::user()->id;
|
||||||
$album->default_view = UserConfig::get('default_album_view');
|
$album->default_view = UserConfig::get('default_album_view');
|
||||||
$album->name = $albumName;
|
$album->name = $albumName;
|
||||||
$album->description = '';
|
$album->description = '';
|
||||||
|
$album->is_permissions_inherited = true;
|
||||||
$album->save();
|
$album->save();
|
||||||
|
|
||||||
|
// Rebuild the permissions cache
|
||||||
|
$helper = new PermissionsHelper();
|
||||||
|
$helper->rebuildCache();
|
||||||
|
|
||||||
$request->request->set('album_id', $album->id);
|
$request->request->set('album_id', $album->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ namespace App\Http\Middleware;
|
|||||||
use App\DataMigration;
|
use App\DataMigration;
|
||||||
use App\Facade\UserConfig;
|
use App\Facade\UserConfig;
|
||||||
use App\Helpers\MiscHelper;
|
use App\Helpers\MiscHelper;
|
||||||
|
use App\Helpers\PermissionsHelper;
|
||||||
use Closure;
|
use Closure;
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
@ -133,6 +134,10 @@ class AppInstallation
|
|||||||
// Save the new version number
|
// Save the new version number
|
||||||
$versionNumber->value = $appVersionNumber;
|
$versionNumber->value = $appVersionNumber;
|
||||||
$versionNumber->save();
|
$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.',
|
'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.',
|
'powered_by' => 'Powered by :link_startBlue Twilight:link_end - the self-hosted PHP photo gallery software.',
|
||||||
'quick_upload' => [
|
'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.',
|
'intro' => 'Use the quick upload feature to quickly add a new photo to an album.',
|
||||||
'or' => '- or -',
|
'or' => '- or -',
|
||||||
'title' => 'Quick Upload'
|
'title' => 'Quick Upload'
|
||||||
|
@ -31,6 +31,10 @@
|
|||||||
|
|
||||||
<label class="control-label" for="quick-upload-album-name">@lang('forms.create_album_label')</label>
|
<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" />
|
<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>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
Loading…
Reference in New Issue
Block a user