From 178913091c4d4885d5331bbf86b027765ee046bb Mon Sep 17 00:00:00 2001 From: Darko Date: Mon, 8 Jun 2015 09:29:27 +0200 Subject: [PATCH] Fix references to site in api.php. (cherry picked from commit c301393) --- www/pages/api.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/www/pages/api.php b/www/pages/api.php index 19c5ac379..e6234d366 100644 --- a/www/pages/api.php +++ b/www/pages/api.php @@ -1,5 +1,6 @@ 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); }