Changeset 1530 in ExiteCMS for trunk/downloads.php
- Timestamp:
- 07/08/08 18:10:05 (4 years ago)
- File:
-
- 1 edited
-
trunk/downloads.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/downloads.php
r1468 r1530 71 71 // and the user has access to it... 72 72 if (checkgroup($cdata['download_cat_access'])) { 73 // update the download counter (if we're using internal statistics) 74 if (!isset($settings['dlstats_remote']) || !$settings['dlstats_remote']) $result = dbquery("UPDATE ".$db_prefix."downloads SET download_count=download_count+1 WHERE download_id='$download_id'"); 73 // update download counter 74 if ($data['download_external']) { 75 // do nothing, an external module will update the counters 76 } else { 77 $result = dbquery("UPDATE ".$db_prefix."downloads SET download_count=download_count+1 WHERE download_id='$download_id'"); 78 // download module installed but no external stats collector active? 79 if (isset($settings['dlstats_remote']) && !$settings['dlstats_remote']) { 80 // Then update the IP counters for mapping purposes 81 if (USER_IP != "0.0.0.0") { 82 $result = dbquery("INSERT INTO ".$db_prefix."dlstats_ips (dlsi_ip, dlsi_ccode, dlsi_counter) VALUES ('".USER_IP."', '".USER_CC."', '1') ON DUPLICATE KEY UPDATE dlsi_counter = dlsi_counter + 1"); 83 } 84 } 85 } 75 86 // if a URL is given for the download, redirect to it, else fall back to the download category 76 87 if ($data['download_url']) { 77 88 // download statistics plugin installed but no remote stats used? Then update the IP counters 78 89 if (isset($settings['dlstats_remote']) && !$settings['dlstats_remote']) { 79 if (USER_IP != "0.0.0.0") {80 $result = dbquery("INSERT INTO ".$db_prefix."dlstats_ips (dlsi_ip, dlsi_ccode, dlsi_counter) VALUES ('".USER_IP."', '".USER_CC."', '1') ON DUPLICATE KEY UPDATE dlsi_counter = dlsi_counter + 1");81 }82 90 } 83 91 redirect($data['download_url']);
Note: See TracChangeset
for help on using the changeset viewer.
