Ignore:
Timestamp:
07/02/08 17:27:46 (4 years ago)
Author:
hverton
Message:

bugfixes, added a missing download title field

File:
1 edited

Legend:

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

    r1464 r1506  
    3030    // check if we need to get a local download counter 
    3131    if ($data['dlsc_download_id']) { 
    32         $result2 = dbquery("SELECT * FROM ".$db_prefix."downloads WHERE download_id = '".$data['dlsc_download_id']."'"); 
     32        $result2 = dbquery("SELECT d.*, c.download_cat_access FROM ".$db_prefix."downloads d LEFT JOIN ".$db_prefix."download_cats c ON d.download_cat = c.download_cat_id WHERE d.download_id = '".$data['dlsc_download_id']."'"); 
    3333        if ($data2 = dbarray($result2)) { 
    34             // get the counter and the download category (needed to create a link) 
    35             $data['download_cat'] = $data2['download_cat']; 
    36             $data['count'] = $data2['download_count']; 
     34            // check if the user has access to it 
     35            if (checkgroup($data2['download_cat_access'])) { 
     36                // get the counter and the download category (needed to create a link) 
     37                $data['download_cat'] = $data2['download_cat']; 
     38                $data['count'] = $data2['download_count']; 
     39            } 
    3740        } 
    3841    } 
Note: See TracChangeset for help on using the changeset viewer.