mirror of
https://github.com/torrentpier/torrentpier
synced 2025-07-08 14:01:17 -07:00
If-return-return could be simplified.
This commit is contained in:
parent
ca6d6222ae
commit
bcf57cd68a
2 changed files with 2 additions and 10 deletions
|
@ -454,11 +454,7 @@ function user_in_group($user_id, $group_id)
|
|||
$num_rows = DB()->num_rows($result);
|
||||
DB()->sql_freeresult($result);
|
||||
|
||||
if ($num_rows == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return !($num_rows == 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -624,11 +624,7 @@ function ocelot_update_tracker($action, $updates)
|
|||
$max_attempts = 3;
|
||||
$err = false;
|
||||
|
||||
if (ocelot_send_request($get, $max_attempts, $err) === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return !(ocelot_send_request($get, $max_attempts, $err) === false);
|
||||
}
|
||||
|
||||
function ocelot_send_request($get, $max_attempts = 1, &$err = false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue