Use replace getById user lookup with User model find built in function(does the same thing as custom function)

This commit is contained in:
DariusIII
2018-02-02 10:29:40 +01:00
parent 90220850e4
commit 73432fe3d9
12 changed files with 27 additions and 22 deletions
+3 -3
View File
@@ -12,8 +12,8 @@ if (empty($_GET['id'])) {
$page->show404();
}
$user = User::getById(User::currentUserId());
if ($user['queuetype'] != 2) {
$user = User::find(User::currentUserId());
if ((int) $user['queuetype'] !== 2) {
$sab = new SABnzbd($page);
if (empty($sab->url)) {
$page->show404();
@@ -22,7 +22,7 @@ if ($user['queuetype'] != 2) {
$page->show404();
}
$sab->sendToSab($_GET['id']);
} elseif ($user['queuetype'] == 2) {
} elseif ((int) $user['queuetype'] === 2) {
$nzbget = new NZBGet($page);
$nzbget->sendURLToNZBGet($_GET['id']);
}