mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-22 01:38:49 -05:00
(Update) Add Torrent List Setting
- Torrents Layout Setting - You can now set your default torrents layout. Then when you visit torrents icon in side nav it will automatically goto your preferred torrents layout. You can find this new setting on your Account Settings page. - The default is the original Torrent List Layout. - requires `php artisan migrate` - - requires `php artisan clear:all`
This commit is contained in:
@@ -104,7 +104,7 @@ class UserController extends Controller
|
||||
$user = auth()->user();
|
||||
// Avatar
|
||||
$max_upload = config('image.max_upload_size');
|
||||
if ($request->hasFile('image')) {
|
||||
if ($request->hasFile('image') && $request->file('image')->getError() == 0) {
|
||||
$image = $request->file('image');
|
||||
if (in_array($image->getClientOriginalExtension(), ['jpg', 'JPG', 'jpeg', 'bmp', 'png', 'PNG', 'tiff', 'gif']) && preg_match('#image/*#', $image->getMimeType())) {
|
||||
if ($max_upload >= $image->getSize()) {
|
||||
@@ -183,6 +183,7 @@ class UserController extends Controller
|
||||
$user->peer_hidden = $request->input('peer_hidden');
|
||||
|
||||
// Torrent Settings
|
||||
$user->torrent_layout = (int)$request->input('torrent_layout');
|
||||
$user->show_poster = $request->input('show_poster');
|
||||
$user->ratings = $request->input('ratings');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user