@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_cover_page'), $page, $request->url(), $request->query()); |
54 | 54 | $maxwords = 50; |
55 | 55 | foreach ($results as $result) { |
56 | - if (! empty($result->overview)) { |
|
56 | + if (!empty($result->overview)) { |
|
57 | 57 | $words = explode(' ', $result->overview); |
58 | 58 | if (\count($words) > $maxwords) { |
59 | 59 | $newwords = \array_slice($words, 0, $maxwords); |
@@ -63,10 +63,10 @@ discard block |
||
63 | 63 | $books[] = $result; |
64 | 64 | } |
65 | 65 | |
66 | - $author = ($request->has('author') && ! empty($request->input('author'))) ? stripslashes($request->input('author')) : ''; |
|
66 | + $author = ($request->has('author') && !empty($request->input('author'))) ? stripslashes($request->input('author')) : ''; |
|
67 | 67 | $this->smarty->assign('author', $author); |
68 | 68 | |
69 | - $title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : ''; |
|
69 | + $title = ($request->has('title') && !empty($request->input('title'))) ? stripslashes($request->input('title')) : ''; |
|
70 | 70 | $this->smarty->assign('title', $title); |
71 | 71 | |
72 | 72 | $browseby_link = '&title='.$title.'&author='.$author; |
@@ -41,11 +41,11 @@ discard block |
||
41 | 41 | $cpapi = $this->userdata->cp_api; |
42 | 42 | $cpurl = $this->userdata->cp_url; |
43 | 43 | $releaseRegex = ''; |
44 | - if (! empty($data)) { |
|
44 | + if (!empty($data)) { |
|
45 | 45 | $releaseRegex = ReleaseRegex::query()->where('releases_id', '=', $data['id'])->first(); |
46 | 46 | } |
47 | 47 | |
48 | - if (! $data) { |
|
48 | + if (!$data) { |
|
49 | 49 | return redirect()->back(); |
50 | 50 | } |
51 | 51 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | if ($data['imdbid'] !== '' && $data['imdbid'] !== 0000000) { |
72 | 72 | $movie = new Movie(['Settings' => $this->settings]); |
73 | 73 | $mov = $movie->getMovieInfo($data['imdbid']); |
74 | - if (! empty($mov['title'])) { |
|
74 | + if (!empty($mov['title'])) { |
|
75 | 75 | $mov['title'] = str_replace(['/', '\\'], '', $mov['title']); |
76 | 76 | $mov['actors'] = makeFieldLinks($mov, 'actors', 'movies'); |
77 | 77 | $mov['genre'] = makeFieldLinks($mov, 'genre', 'movies'); |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $rslt = $games->getGamesRange($page, $catarray, $offset, config('nntmux.items_per_cover_page'), $orderby, '', $this->userdata->categoryexclusions); |
42 | 42 | $results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_cover_page'), $page, $request->url(), $request->query()); |
43 | 43 | |
44 | - $title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : ''; |
|
44 | + $title = ($request->has('title') && !empty($request->input('title'))) ? stripslashes($request->input('title')) : ''; |
|
45 | 45 | $this->smarty->assign('title', $title); |
46 | 46 | |
47 | 47 | $genres = $gen->getGenres(Genres::GAME_TYPE, true); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | $maxwords = 50; |
60 | 60 | foreach ($results as $result) { |
61 | - if (! empty($result->review)) { |
|
61 | + if (!empty($result->review)) { |
|
62 | 62 | $words = explode(' ', $result->review); |
63 | 63 | if (\count($words) > $maxwords) { |
64 | 64 | $newwords = \array_slice($words, 0, $maxwords); |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | $consoles[] = $result; |
69 | 69 | } |
70 | 70 | |
71 | - $platform = ($request->has('platform') && ! empty($request->input('platform'))) ? stripslashes($request->input('platform')) : ''; |
|
71 | + $platform = ($request->has('platform') && !empty($request->input('platform'))) ? stripslashes($request->input('platform')) : ''; |
|
72 | 72 | $this->smarty->assign('platform', $platform); |
73 | 73 | |
74 | - $title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : ''; |
|
74 | + $title = ($request->has('title') && !empty($request->input('title'))) ? stripslashes($request->input('title')) : ''; |
|
75 | 75 | $this->smarty->assign('title', $title); |
76 | 76 | |
77 | 77 | $genres = $gen->getGenres(Genres::CONSOLE_TYPE, true); |
@@ -59,17 +59,17 @@ |
||
59 | 59 | { |
60 | 60 | $this->setPreferences(); |
61 | 61 | $ids = null; |
62 | - if (! empty($id) && ! \is_array($id)) { |
|
62 | + if (!empty($id) && !\is_array($id)) { |
|
63 | 63 | $ids = explode(',', $id); |
64 | 64 | } elseif (\is_array($id)) { |
65 | 65 | $ids = $id; |
66 | 66 | } |
67 | 67 | |
68 | - if (! empty($ids) && UsersRelease::delCartByGuid($ids, $this->userdata->id)) { |
|
68 | + if (!empty($ids) && UsersRelease::delCartByGuid($ids, $this->userdata->id)) { |
|
69 | 69 | return redirect()->to('/cart/index'); |
70 | 70 | } |
71 | 71 | |
72 | - if (! $id) { |
|
72 | + if (!$id) { |
|
73 | 73 | return redirect()->to('/cart/index'); |
74 | 74 | } |
75 | 75 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $privateProfiles = (int) Settings::settingValue('..privateprofiles') === 1; |
34 | 34 | $publicView = false; |
35 | 35 | |
36 | - if ($privileged || ! $privateProfiles) { |
|
36 | + if ($privileged || !$privateProfiles) { |
|
37 | 37 | $altID = ($request->has('id') && (int) $request->input('id') >= 0) ? (int) $request->input('id') : false; |
38 | 38 | $altUsername = ($request->has('name') && $request->input('name') !== '') ? $request->input('name') : false; |
39 | 39 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | } |
64 | 64 | |
65 | 65 | // Check if the user selected a theme. |
66 | - if (! isset($this->userdata->style) || $this->userdata->style === 'None') { |
|
66 | + if (!isset($this->userdata->style) || $this->userdata->style === 'None') { |
|
67 | 67 | $this->userdata->style = 'Using the admin selected theme.'; |
68 | 68 | } |
69 | 69 | $this->smarty->assign( |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $action = $request->input('action') ?? 'view'; |
115 | 115 | |
116 | 116 | $userid = $this->userdata->id; |
117 | - if (! $this->userdata) { |
|
117 | + if (!$this->userdata) { |
|
118 | 118 | $this->show404('No such user!'); |
119 | 119 | } |
120 | 120 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | (int) Settings::settingValue('site.main.userselstyle') === 1 ? $request->input('style') : 'None' |
154 | 154 | ); |
155 | 155 | |
156 | - if ((int) $request->input('viewconsole') === 1 && $this->userdata->can('view console') && ! $this->userdata->hasDirectPermission('view console')) { |
|
156 | + if ((int) $request->input('viewconsole') === 1 && $this->userdata->can('view console') && !$this->userdata->hasDirectPermission('view console')) { |
|
157 | 157 | $this->userdata->givePermissionTo('view console'); |
158 | 158 | } elseif ((int) $request->input('viewconsole') === 0 && $this->userdata->can('view console') && $this->userdata->hasDirectPermission('view console')) { |
159 | 159 | $this->userdata->revokePermissionTo('view console'); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $this->userdata->revokePermissionTo('view console'); |
162 | 162 | } |
163 | 163 | |
164 | - if ((int) $request->input('viewmovies') === 1 && $this->userdata->can('view movies') && ! $this->userdata->hasDirectPermission('view movies')) { |
|
164 | + if ((int) $request->input('viewmovies') === 1 && $this->userdata->can('view movies') && !$this->userdata->hasDirectPermission('view movies')) { |
|
165 | 165 | $this->userdata->givePermissionTo('view movies'); |
166 | 166 | } elseif ((int) $request->input('viewmovies') === 0 && $this->userdata->can('view movies') && $this->userdata->hasDirectPermission('view movies')) { |
167 | 167 | $this->userdata->revokePermissionTo('view movies'); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $this->userdata->revokePermissionTo('view movies'); |
170 | 170 | } |
171 | 171 | |
172 | - if ((int) $request->input('viewaudio') === 1 && $this->userdata->can('view audio') && ! $this->userdata->hasDirectPermission('view audio')) { |
|
172 | + if ((int) $request->input('viewaudio') === 1 && $this->userdata->can('view audio') && !$this->userdata->hasDirectPermission('view audio')) { |
|
173 | 173 | $this->userdata->givePermissionTo('view audio'); |
174 | 174 | } elseif ((int) $request->input('viewaudio') === 0 && $this->userdata->can('view audio') && $this->userdata->hasDirectPermission('view audio')) { |
175 | 175 | $this->userdata->revokePermissionTo('view audio'); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $this->userdata->revokePermissionTo('view audio'); |
178 | 178 | } |
179 | 179 | |
180 | - if ((int) $request->input('viewpc') === 1 && $this->userdata->can('view pc') && ! $this->userdata->hasDirectPermission('view pc')) { |
|
180 | + if ((int) $request->input('viewpc') === 1 && $this->userdata->can('view pc') && !$this->userdata->hasDirectPermission('view pc')) { |
|
181 | 181 | $this->userdata->givePermissionTo('view pc'); |
182 | 182 | } elseif ((int) $request->input('viewpc') === 0 && $this->userdata->can('view pc') && $this->userdata->hasDirectPermission('view pc')) { |
183 | 183 | $this->userdata->revokePermissionTo('view pc'); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $this->userdata->revokePermissionTo('view pc'); |
186 | 186 | } |
187 | 187 | |
188 | - if ((int) $request->input('viewtv') === 1 && $this->userdata->can('view tv') && ! $this->userdata->hasDirectPermission('view tv')) { |
|
188 | + if ((int) $request->input('viewtv') === 1 && $this->userdata->can('view tv') && !$this->userdata->hasDirectPermission('view tv')) { |
|
189 | 189 | $this->userdata->givePermissionTo('view tv'); |
190 | 190 | } elseif ((int) $request->input('viewtv') === 0 && $this->userdata->can('view tv') && $this->userdata->hasDirectPermission('view tv')) { |
191 | 191 | $this->userdata->revokePermissionTo('view tv'); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $this->userdata->revokePermissionTo('view tv'); |
194 | 194 | } |
195 | 195 | |
196 | - if ((int) $request->input('viewadult') === 1 && $this->userdata->can('view adult') && ! $this->userdata->hasDirectPermission('view adult')) { |
|
196 | + if ((int) $request->input('viewadult') === 1 && $this->userdata->can('view adult') && !$this->userdata->hasDirectPermission('view adult')) { |
|
197 | 197 | $this->userdata->givePermissionTo('view adult'); |
198 | 198 | } elseif ((int) $request->input('viewadult') === 0 && $this->userdata->can('view adult') && $this->userdata->hasDirectPermission('view adult')) { |
199 | 199 | $this->userdata->revokePermissionTo('view adult'); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $this->userdata->revokePermissionTo('view adult'); |
202 | 202 | } |
203 | 203 | |
204 | - if ((int) $request->input('viewbooks') === 1 && $this->userdata->can('view books') && ! $this->userdata->hasDirectPermission('view books')) { |
|
204 | + if ((int) $request->input('viewbooks') === 1 && $this->userdata->can('view books') && !$this->userdata->hasDirectPermission('view books')) { |
|
205 | 205 | $this->userdata->givePermissionTo('view books'); |
206 | 206 | } elseif ((int) $request->input('viewbooks') === 0 && $this->userdata->can('view books') && $this->userdata->hasDirectPermission('view books')) { |
207 | 207 | $this->userdata->revokePermissionTo('view books'); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $this->userdata->revokePermissionTo('view books'); |
210 | 210 | } |
211 | 211 | |
212 | - if ((int) $request->input('viewother') === 1 && $this->userdata->can('view other') && ! $this->userdata->hasDirectPermission('view other')) { |
|
212 | + if ((int) $request->input('viewother') === 1 && $this->userdata->can('view other') && !$this->userdata->hasDirectPermission('view other')) { |
|
213 | 213 | $this->userdata->givePermissionTo('view other'); |
214 | 214 | } elseif ((int) $request->input('viewother') === 0 && $this->userdata->can('view other') && $this->userdata->hasDirectPermission('view other')) { |
215 | 215 | $this->userdata->revokePermissionTo('view other'); |
@@ -217,12 +217,12 @@ discard block |
||
217 | 217 | $this->userdata->revokePermissionTo('view other'); |
218 | 218 | } |
219 | 219 | |
220 | - if ($request->has('password') && ! empty($request->input('password'))) { |
|
220 | + if ($request->has('password') && !empty($request->input('password'))) { |
|
221 | 221 | User::updatePassword($userid, $request->input('password')); |
222 | 222 | } |
223 | 223 | |
224 | - if (! $this->userdata->hasRole('Admin')) { |
|
225 | - if (! empty($request->input('email')) && $this->userdata->email !== $request->input('email')) { |
|
224 | + if (!$this->userdata->hasRole('Admin')) { |
|
225 | + if (!empty($request->input('email')) && $this->userdata->email !== $request->input('email')) { |
|
226 | 226 | $this->userdata->email = $request->input('email'); |
227 | 227 | |
228 | 228 | $verify_user = $this->userdata; |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | $this->setPreferences(); |
276 | 276 | $userId = $request->input('id'); |
277 | 277 | |
278 | - if ($userId !== null && (int) $userId === $this->userdata->id && ! $this->userdata->hasRole('Admin')) { |
|
278 | + if ($userId !== null && (int) $userId === $this->userdata->id && !$this->userdata->hasRole('Admin')) { |
|
279 | 279 | $user = User::find($userId); |
280 | 280 | SendAccountDeletedEmail::dispatch($user); |
281 | 281 | Auth::logout(); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | // Get the default user role. |
148 | 148 | $userDefault = Role::query()->where('isdefault', '=', 1)->first(); |
149 | 149 | |
150 | - if (! empty($error)) { |
|
150 | + if (!empty($error)) { |
|
151 | 151 | return $this->showRegistrationForm($request, $error); |
152 | 152 | } |
153 | 153 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | break; |
171 | 171 | case 'view': |
172 | 172 | // See if it is a valid invite. |
173 | - if (($inviteCode !== null) && ! Invite::isValid($inviteCode)) { |
|
173 | + if (($inviteCode !== null) && !Invite::isValid($inviteCode)) { |
|
174 | 174 | $error = 'Invalid invitation token!'; |
175 | 175 | $showRegister = 0; |
176 | 176 | } else { |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | } |
203 | 203 | |
204 | 204 | if ((int) Settings::settingValue('..registerstatus') === Settings::REGISTER_STATUS_INVITE) { |
205 | - if (! empty($inviteCode)) { |
|
205 | + if (!empty($inviteCode)) { |
|
206 | 206 | if (Invite::isValid($inviteCode)) { |
207 | 207 | $error = ''; |
208 | 208 | $showRegister = 1; |
@@ -76,7 +76,7 @@ |
||
76 | 76 | |
77 | 77 | public function disable2fa(Disable2faPasswordSecurityRequest $request): \Illuminate\Routing\Redirector|RedirectResponse|\Illuminate\Contracts\Foundation\Application |
78 | 78 | { |
79 | - if (! (Hash::check($request->get('current-password'), $request->user()->password))) { |
|
79 | + if (!(Hash::check($request->get('current-password'), $request->user()->password))) { |
|
80 | 80 | // The passwords matches |
81 | 81 | return redirect()->back()->with('error', 'Your password does not match with your account password. Please try again.'); |
82 | 82 | } |
@@ -47,11 +47,11 @@ discard block |
||
47 | 47 | $meta_keywords = 'view,anime,anidb,description,details'; |
48 | 48 | $meta_description = 'View '.$aniDbInfo->title.' Anime'; |
49 | 49 | |
50 | - if (! $this->releases && ! $aniDbInfo) { |
|
50 | + if (!$this->releases && !$aniDbInfo) { |
|
51 | 51 | $this->smarty->assign('nodata', 'No releases and AniDB info for this series.'); |
52 | - } elseif (! $aniDbInfo) { |
|
52 | + } elseif (!$aniDbInfo) { |
|
53 | 53 | $this->smarty->assign('nodata', 'No AniDB information for this series.'); |
54 | - } elseif (! $aniDbReleases) { |
|
54 | + } elseif (!$aniDbReleases) { |
|
55 | 55 | $this->smarty->assign('nodata', 'No releases for this series.'); |
56 | 56 | } else { |
57 | 57 | $this->smarty->assign('animeEpisodeTitles', $aniDbReleases); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $this->setPreferences(); |
88 | 88 | $letter = ($request->has('id') && preg_match('/^(0\-9|[A-Z])$/i', $request->input('id'))) ? $request->input('id') : '0-9'; |
89 | 89 | |
90 | - $animeTitle = ($request->has('title') && ! empty($request->input('title'))) ? $request->input('title') : ''; |
|
90 | + $animeTitle = ($request->has('title') && !empty($request->input('title'))) ? $request->input('title') : ''; |
|
91 | 91 | |
92 | 92 | if ($animeTitle !== '' && $request->missing('id')) { |
93 | 93 | $letter = ''; |