Ignore:
Timestamp:
07/08/08 18:12:41 (4 years ago)
Author:
hverton
Message:

updated the batch tools to support the new "external download" field

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/common/download_statistics/php-files/modules/download_statistics/batch/get_statistics.php

    r1492 r1531  
    172172                                $oldfile = $newfile; 
    173173                            } 
     174                            // update download counters if need be 
     175                            if ($settings['dlstats_remote']) { 
     176                                // do we have a download record for this URL? 
     177                                $result2 = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_url LIKE '%".$download['path']."' AND download_external = 1"); 
     178                                while ($data2 = dbarray($result2)) { 
     179                                    // check if this is a full URL match 
     180                                    $data2['url'] = parse_url($data2['download_url']); 
     181                                    if ($download['path'] == $data2['url']['path']) { 
     182                                        // match found, update the counter 
     183                                        $result3 = dbquery("UPDATE ".$db_prefix."downloads SET download_counter=download_counter+1 WHERE download_id = '".$data2['download_id']."'"); 
     184                                    } 
     185                                } 
     186                            } 
    174187                            // create a log record 
    175188                            // 
Note: See TracChangeset for help on using the changeset viewer.