Changeset 382

Show
Ignore:
Timestamp:
06/21/09 12:16:24 (11 years ago)
Author:
kovell
Message:

Admin setting clarifications, autoupgrade uses existing kill settings.

Location:
dev/common
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • dev/common/admin/option_acache.php

    r370 r382  
    2828options::fadd('Reinforcement threshold', 'reinforced_threshold', 'edit:size:4'); 
    2929options::fadd('Disabling threshold', 'reinforced_disable_threshold', 'edit:size:4'); 
    30 options::fadd('Reinforcement chance', 'reinforced_prob', 'edit:size:4'); 
    31 options::fadd('Reinforcement end chance', 'reinforced_rf_prob', 'edit:size:4'); 
     30options::fadd('Reinforcement chance (1/x)', 'reinforced_prob', 'edit:size:4'); 
     31options::fadd('Reinforcement end chance (1/x)', 'reinforced_rf_prob', 'edit:size:4'); 
    3232 
    3333class admin_acache 
  • dev/common/admin/option_appearance.php

    r370 r382  
    2323options::fadd('Display combined kills and losses on Front Page', 'show_comb_home', 'checkbox'); 
    2424options::fadd('Display comment count on Front Page', 'comments_count', 'checkbox'); 
     25options::fadd('Display involved count on Front Page', 'killlist_involved', 'checkbox'); 
    2526options::fadd('Display alliance logos on Front Page', 'killlist_alogo', 'checkbox'); 
    26 options::fadd('Display involved count on Front Page', 'killlist_involved', 'checkbox'); 
    2727options::fadd('Show Corp: / Alliance: on Front Page', 'corpalliance-name', 'checkbox'); 
    2828options::fadd('Display clock on Front Page', 'show_clock', 'checkbox'); 
    2929 
    3030options::cat('Appearance', 'Front Page', 'Kill Summary Tables'); 
    31 options::fadd('Amount in each Row', 'summarytable_rowcount', 'edit:size:2'); 
     31options::fadd('Amount in each Column', 'summarytable_rowcount', 'edit:size:2'); 
    3232options::fadd('Display a summary line below a Summary Table', 'summarytable_summary', 'checkbox'); 
    3333options::fadd('Display efficiency in the summary line', 'summarytable_efficiency', 'checkbox'); 
  • dev/common/includes/autoupgrade.php

    r370 r382  
    242242                // Update price with items destroyed and ship value, excluding 
    243243                // blueprints since default cost is for BPO and BPC looks identical 
    244                 $sql = "UPDATE kb3_kills NATURAL JOIN (SELECT kll_id, ". 
    245                         "sum(if(typeName LIKE '%Blueprint%',0,if(isnull(itd_quantity), ". 
    246                         "0,itd_quantity * if(price = 0 OR isnull(price),basePrice,price)))) ". 
    247                         "+ if(isnull(shp_value),shp_baseprice,shp_value) AS killcost ". 
    248                         "FROM kb3_kills ". 
    249                         "LEFT JOIN kb3_items_destroyed ON kll_id = itd_kll_id ". 
    250                         "INNER JOIN kb3_ships ON kb3_ships.shp_id = kll_ship_id ". 
    251                         "LEFT JOIN kb3_ships_values ON kb3_ships_values.shp_id = kll_ship_id ". 
    252                         "LEFT JOIN kb3_item_price ON kb3_item_price.typeID = itd_itm_id ". 
    253                         "LEFT JOIN kb3_invtypes ON itd_itm_id = kb3_invtypes.typeID ". 
    254                         "GROUP BY kll_id) cost ". 
    255                         "SET kll_isk_loss = killcost"; 
     244                $sql = "UPDATE kb3_kills 
     245                        INNER JOIN kb3_ships ON kb3_ships.shp_id = kll_ship_id 
     246                        LEFT JOIN kb3_ships_values ON kb3_ships_values.shp_id = kll_ship_id 
     247                                set kll_isk_loss = if(isnull(shp_value),shp_baseprice,shp_value)"; 
     248                $qry->execute($sql); 
     249                $sql = "UPDATE kb3_kills INNER JOIN (SELECT itd_kll_id, 
     250                        sum(if(typeName LIKE '%Blueprint%',0,if(isnull(itd_quantity), 
     251                        0,itd_quantity * if(price = 0 OR isnull(price),basePrice,price)))) 
     252                        AS killcost 
     253                        FROM kb3_items_destroyed 
     254                        LEFT JOIN kb3_item_price ON kb3_item_price.typeID = itd_itm_id 
     255                        LEFT JOIN kb3_invtypes ON itd_itm_id = kb3_invtypes.typeID 
     256                        GROUP BY itd_kll_id) cost on kll_id = itd_kll_id 
     257                        SET kll_isk_loss = kll_isk_loss + killcost"; 
     258                $qry->execute($sql); 
     259                if(config::get(kd_droptototal)) 
     260                        $sql = "UPDATE kb3_kills INNER JOIN (SELECT itd_kll_id, 
     261                                sum(if(typeName LIKE '%Blueprint%',0,if(isnull(itd_quantity), 
     262                                0,itd_quantity * if(price = 0 OR isnull(price),basePrice,price)))) 
     263                                AS killcost 
     264                                FROM kb3_items_dropped 
     265                                LEFT JOIN kb3_item_price ON kb3_item_price.typeID = itd_itm_id 
     266                                LEFT JOIN kb3_invtypes ON itd_itm_id = kb3_invtypes.typeID 
     267                                GROUP BY itd_kll_id) cost on kll_id = itd_kll_id 
     268                                SET kll_isk_loss = kll_isk_loss + killcost"; 
    256269                $qry->execute($sql); 
    257270 
  • dev/common/includes/class.apicache.php

    r370 r382  
    2828 
    2929        $db = new DBQuery(true); 
    30                 $db->execute("CREATE TABLE IF NOT EXISTS `kb3_apicache` ( 
    31                  `cfg_site` varchar(16) NOT NULL default '', 
    32                          `cfg_key` varchar(32) NOT NULL default '', 
    33                          `cfg_value` text NOT NULL, 
    34                          PRIMARY KEY  (`cfg_site`,`cfg_key`) 
    35                          )"); 
    3630        $db->execute('select * from kb3_apicache where cfg_site=\''.KB_SITE."'"); 
    3731        $ApiCache = &ApiCache::_getCache(); 
  • dev/common/includes/db.php

    r370 r382  
    99 
    1010// get mysql server info and store it in a define so we know if its 
    11 // safe to use subquerys or not 
    12 $conn = new DBConnection; 
    13 $value = (float)mysql_get_server_info($conn->id_); 
    14 if ($value > 4.1) 
    15 { 
    16     define('KB_MYSQL41', true); 
    17 } 
     11// safe to use subquerys or not. (mysqli only works on 4.1+) 
     12if(DB_TYPE == 'mysqli') define('KB_MYSQL41', true); 
    1813else 
    1914{ 
    20     define('KB_MYSQL41', false); 
     15        $conn = new DBConnection; 
     16        $value = (float) mysql_get_server_info($conn->id_); 
     17        if ($value > 4.1) 
     18        { 
     19                define('KB_MYSQL41', true); 
     20        } 
     21        else 
     22        { 
     23                define('KB_MYSQL41', false); 
     24        } 
    2125} 
    2226