]> git.p6c8.net - jirafeau/jirafeau.git/commitdiff
Download statistics were not shown in the admin interface 26/head
authorPatrick Canterino <patrick@patrick-canterino.de>
Sat, 9 Aug 2025 13:13:44 +0000 (15:13 +0200)
committerPatrick Canterino <patrick@patrick-canterino.de>
Sat, 9 Aug 2025 13:13:44 +0000 (15:13 +0200)
This feature got accidentally lost during refactoring

lib/functions.php

index 5d4602e6c235fedb8e56e5ffb98c52b55fdc52fc..578276f7e5642496696c703b46cfd10a4d19f394 100644 (file)
@@ -771,6 +771,9 @@ function jirafeau_admin_list($name, $file_hash, $link_hash)
                     if (!empty($link_hash) && $link_hash != $node) {
                         continue;
                     }
+
+                    /* Get download statistics */
+                    $ld = jirafeau_get_download_stats($node);
                     /* Print link information. */
                     echo '<tr>';
                     echo '<td><strong>';
@@ -793,6 +796,11 @@ function jirafeau_admin_list($name, $file_hash, $link_hash)
                     if (strlen($l['ip']) > 0) {
                         echo t('ORIGIN') . ': ' . $l['ip'] . '<br/>';
                     }
+                    echo t('DOWNLOAD_COUNT') . ': ' . $ld['count'] . '<br/>';
+                    if ($ld['count'] > 0) {
+                        echo t('DOWNLOAD_DATE') . ': ' . jirafeau_get_datetimefield($ld['date']) . '<br/>';
+                        echo t('DOWNLOAD_IP') . ': ' . $ld['ip'] . '<br/>';
+                    }
                     echo '</td><td>';
 
                     if (!$l['crypted'] && !$l['crypted_legacy']) {

patrick-canterino.de