Fix downloads and api hit counts on user profile page.

This commit is contained in:
DariusIII
2015-09-05 16:17:22 +02:00
parent 251b7cceb2
commit 0db3ba5495
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -43,6 +43,7 @@ if (!isset($data['style']) || $data['style'] == 'None') {
$offset = isset($_REQUEST["offset"]) ? $_REQUEST["offset"] : 0;
$page->smarty->assign([
'apirequests' => $page->users->getApiRequests($userID),
'grabstoday' => $page->users->getDownloadRequests($userID),
'userinvitedby' => ($data['invitedby'] != '' ? $page->users->getById($data['invitedby']) : ''),
'user' => $data,
'privateprofiles' => $privateProfiles,
@@ -91,7 +91,7 @@
</tr>
<tr>
<th>Downloads Today</th>
<td><span id="ugrtd">{$user.grabs}</span> /
<td><span id="ugrtd">{$grabstoday}</span> /
Unlimited {if $user.grabs >= $user.downloadrequests}&nbsp;&nbsp;
<small>(Next DL
in {($grabstoday.nextdl/3600)|intval}
@@ -83,7 +83,7 @@
<tr>
<th>API Hits Today</th>
<td>
<span id="uatd">{$apirequests.num}</span> {if $isadmin && $apirequests.num > 0}
<span id="uatd">{$apirequests}</span> {if $isadmin && $apirequests > 0}
<a
onclick="resetapireq({$user.id}, 'api'); document.getElementById('uatd').innerHTML='0'; return false;"
href="#" class="label label-danger">
@@ -91,7 +91,7 @@
</tr>
<tr>
<th>Downloads Today</th>
<td><span id="ugrtd">{$user.grabs}</span> /
<td><span id="ugrtd">{$grabstoday}</span> /
Unlimited {if $user.grabs >= $user.downloadrequests}&nbsp;&nbsp;
<small>(Next DL
in {($grabstoday.nextdl/3600)|intval}