mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-02 03:08:53 +00:00
Fix references to site in api.php.
This commit is contained in:
+4
-3
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
use newznab\utility\Utility;
|
||||
use newznab\db\Settings;
|
||||
|
||||
$rc = new ReleaseComments;
|
||||
|
||||
@@ -94,8 +95,8 @@ if ($page->users->isLoggedIn()) {
|
||||
//
|
||||
// A hash of the users ip to record against the api hit
|
||||
//
|
||||
if ($page->site->storeuserips == 1)
|
||||
$hosthash = $page->users->getHostHash($_SERVER["REMOTE_ADDR"], $page->site->siteseed);
|
||||
if ($page->settings->getSetting('storeuserips') == 1)
|
||||
$hosthash = $page->users->getHostHash($_SERVER["REMOTE_ADDR"], $page->settings->getSetting('siteseed'));
|
||||
$maxRequests = $res['apirequests'];
|
||||
}
|
||||
}
|
||||
@@ -441,7 +442,7 @@ switch ($function) {
|
||||
case 'r':
|
||||
verifyEmptyParameter('email');
|
||||
|
||||
if (!in_array((int)$page->site->registerstatus, [Sites::REGISTER_STATUS_OPEN, Sites::REGISTER_STATUS_API_ONLY])) {
|
||||
if (!in_array((int)$page->settings->getSetting('registerstatus'), [Settings::REGISTER_STATUS_OPEN, Settings::REGISTER_STATUS_API_ONLY])) {
|
||||
showApiError(104);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user