[Optimize] Switched calls to username from id
This commit is contained in:
parent
3d72da0ca4
commit
4b98c09fb2
@ -8,13 +8,14 @@ $api->isActive();
|
|||||||
|
|
||||||
// Check user token
|
// Check user token
|
||||||
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
$user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUEST['id']);
|
||||||
|
$username = $user->getUsername($user_id)
|
||||||
|
|
||||||
// Fetch settings
|
// Fetch settings
|
||||||
if ( ! $interval = $setting->getValue('statistics_ajax_data_interval')) $interval = 300;
|
if ( ! $interval = $setting->getValue('statistics_ajax_data_interval')) $interval = 300;
|
||||||
|
|
||||||
// Gather un-cached data
|
// Gather un-cached data
|
||||||
$statistics->setGetCache(false);
|
$statistics->setGetCache(false);
|
||||||
$sharerate = $statistics->getUserSharerate($user_id, $interval);
|
$sharerate = $statistics->getUserSharerate($username, $interval);
|
||||||
$statistics->setGetCache(true);
|
$statistics->setGetCache(true);
|
||||||
|
|
||||||
// Output JSON format
|
// Output JSON format
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user