Show
Ignore:
Timestamp:
12/05/07 20:53:40 (15 years ago)
Author:
exi
Message:

Merging 242:253 branch into dev

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/includes/class.toplist.php

    r234 r254  
    885885    { 
    886886        $sql = "select count(*) as cnt, ind.ind_wep_id as itm_id 
    887               from kb3_inv_detail ind 
    888               inner join kb3_items itm on ( itm_id = ind.ind_wep_id )"; 
     887                from kb3_inv_detail ind 
     888                    inner join kb3_items itm on (itm_id = ind.ind_wep_id)"; 
     889        if (DB_USE_CCP) 
     890        { 
     891            $sql = "select count(*) as cnt, ind.ind_wep_id as itm_id 
     892                      from kb3_inv_detail ind 
     893                      inner join kb3_invtypes itm on (typeID = ind.ind_wep_id)"; 
     894        } 
    889895 
    890896        if ($this->invplt_) 
     
    907913 
    908914        $this->setSQLTop($sql); 
     915        if (DB_USE_CCP) 
     916        { 
     917            // since ccps database doesnt have icons for ships this will also fix the ship as weapon bug 
     918            $this->setSQLBottom(" and itm.icon != '' 
     919                                  and itm.typeName != 'Unknown' 
     920                                  group by ind.ind_wep_id order by 1 desc limit 20"); 
     921        } 
     922        else 
    909923        $this->setSQLBottom(" and itm.itm_icon not in ( '1', 'icon_null' ) 
    910924                             and itm.itm_name != 'Unknown' 
    911                              group by ind.ind_wep_id order by 1 desc 
    912                              limit 20"); 
     925                             group by ind.ind_wep_id order by 1 desc limit 20"); 
    913926    } 
    914927}