Apply fixes from StyleCI

This commit is contained in:
StyleCI Bot 2023-03-16 07:23:51 +00:00 committed by Yury Pikhtarev
commit 1f75f4e997
2 changed files with 4 additions and 5 deletions

View file

@ -101,14 +101,14 @@ class Ajax
case 'guest': case 'guest':
break; break;
// USER // USER
case 'user': case 'user':
if (IS_GUEST) { if (IS_GUEST) {
$this->ajax_die($lang['NEED_TO_LOGIN_FIRST']); $this->ajax_die($lang['NEED_TO_LOGIN_FIRST']);
} }
break; break;
// MOD // MOD
case 'mod': case 'mod':
if (!IS_AM) { if (!IS_AM) {
$this->ajax_die($lang['ONLY_FOR_MOD']); $this->ajax_die($lang['ONLY_FOR_MOD']);
@ -116,7 +116,7 @@ class Ajax
$this->check_admin_session(); $this->check_admin_session();
break; break;
// ADMIN // ADMIN
case 'admin': case 'admin':
if (!IS_ADMIN) { if (!IS_ADMIN) {
$this->ajax_die($lang['ONLY_FOR_ADMIN']); $this->ajax_die($lang['ONLY_FOR_ADMIN']);
@ -124,7 +124,7 @@ class Ajax
$this->check_admin_session(); $this->check_admin_session();
break; break;
// SUPER_ADMIN // SUPER_ADMIN
case 'super_admin': case 'super_admin':
if (!IS_SUPER_ADMIN) { if (!IS_SUPER_ADMIN) {
$this->ajax_die($lang['ONLY_FOR_SUPER_ADMIN']); $this->ajax_die($lang['ONLY_FOR_SUPER_ADMIN']);

View file

@ -719,7 +719,6 @@ class Torrent
$attempts = $success = $response = 0; $attempts = $success = $response = 0;
while (!$success && $attempts++ < $max_attempts) { while (!$success && $attempts++ < $max_attempts) {
// Send request // Send request
$file = fsockopen($bb_cfg['ocelot']['host'], $bb_cfg['ocelot']['port'], $error_num, $error_string); $file = fsockopen($bb_cfg['ocelot']['host'], $bb_cfg['ocelot']['port'], $error_num, $error_string);
if ($file) { if ($file) {