mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-04 01:09:58 -05:00
(Update) Adopt PSR-2 Coding Style
- General Cleanup
This commit is contained in:
@@ -60,7 +60,7 @@ class WishController extends Controller
|
||||
*/
|
||||
public function store(Request $request, $uid)
|
||||
{
|
||||
$imdb = starts_with($request->get('imdb'), 'tt') ? $request->get('imdb') : 'tt'.$request->get('imdb');
|
||||
$imdb = starts_with($request->get('imdb'), 'tt') ? $request->get('imdb') : 'tt' . $request->get('imdb');
|
||||
|
||||
if ($this->wish->exists($uid, $imdb)) {
|
||||
return redirect()
|
||||
@@ -69,7 +69,7 @@ class WishController extends Controller
|
||||
}
|
||||
|
||||
$omdb = $this->wish->omdbRequest($imdb);
|
||||
if($omdb === null || $omdb === false) {
|
||||
if ($omdb === null || $omdb === false) {
|
||||
return redirect()
|
||||
->route('wishlist', ['id' => $uid])
|
||||
->with($this->toastr->error('IMDB Bad Request!', 'Whoops!', ['options']));
|
||||
|
||||
@@ -20,9 +20,9 @@ class CheckIfActive
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param string|null $guard
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @param string|null $guard
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next, $guard = null)
|
||||
@@ -31,7 +31,8 @@ class CheckIfActive
|
||||
if ($user and $user->group_id == 1 || $user->active == 0) {
|
||||
auth()->logout();
|
||||
$request->session()->flush();
|
||||
return redirect('login')->with(Toastr::warning('This account has not been activated and is still in validating group, Please check your email for activation link. If you did not receive the activation code, please click "forgot password" and complete the steps.', 'Whoops!', ['options']));;
|
||||
return redirect('login')
|
||||
->with(Toastr::warning('This account has not been activated and is still in validating group, Please check your email for activation link. If you did not receive the activation code, please click "forgot password" and complete the steps.', 'Whoops!', ['options']));;
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
||||
@@ -15,13 +15,22 @@ namespace App\Repositories;
|
||||
interface WishInterface
|
||||
{
|
||||
public function all();
|
||||
|
||||
public function omdbRequest($imdb);
|
||||
|
||||
public function findById($id);
|
||||
|
||||
public function findByTitle($title);
|
||||
|
||||
public function exists($uid, $id);
|
||||
|
||||
public function isGranted($id);
|
||||
|
||||
public function getSource($id);
|
||||
|
||||
public function getUserWishes($uid);
|
||||
|
||||
public function create(array $data);
|
||||
|
||||
public function delete($id);
|
||||
}
|
||||
+9
-9
@@ -21,13 +21,13 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'enabled' => false,
|
||||
'hostname' => 'example.com',
|
||||
'server' => 'irc.example.com',
|
||||
'port' => '6667',
|
||||
'username' => 'UNIT3D',
|
||||
'password' => 'UNIT3D',
|
||||
'channels' => ['#announce'],
|
||||
'nickservpass' => false,
|
||||
'joinchannels' => false
|
||||
'enabled' => false,
|
||||
'hostname' => 'example.com',
|
||||
'server' => 'irc.example.com',
|
||||
'port' => '6667',
|
||||
'username' => 'UNIT3D',
|
||||
'password' => 'UNIT3D',
|
||||
'channels' => ['#announce'],
|
||||
'nickservpass' => false,
|
||||
'joinchannels' => false
|
||||
];
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author Poppabear
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Model Factories
|
||||
@@ -29,7 +29,7 @@ $factory->define(App\Torrent::class, function (Faker\Generator $faker) {
|
||||
'info_hash' => $faker->md5,
|
||||
'file_name' => str_slug(strtolower($faker->name)),
|
||||
'num_file' => $faker->numberBetween(1, 50),
|
||||
'announce' => config('app.url').'/announce',
|
||||
'announce' => config('app.url') . '/announce',
|
||||
'size' => $faker->randomFloat(1, 0.00, 4000.00),
|
||||
'category_id' => $faker->numberBetween(1, 3),
|
||||
'user_id' => 0,
|
||||
@@ -54,8 +54,8 @@ $factory->define(App\User::class, function (Faker\Generator $faker) {
|
||||
'downloaded' => 1073741824,
|
||||
'fl_tokens' => $faker->numberBetween(0, 30),
|
||||
'seedbonus' => $faker->randomFloat(1, 0.00, 10.00),
|
||||
'invites' => $faker->numberBetween(0,10),
|
||||
'hitandruns' => $faker->numberBetween(0,5),
|
||||
'invites' => $faker->numberBetween(0, 10),
|
||||
'hitandruns' => $faker->numberBetween(0, 5),
|
||||
'remember_token' => str_random(10),
|
||||
];
|
||||
});
|
||||
Reference in New Issue
Block a user