Changeset 374

Show
Ignore:
Timestamp:
06/14/09 14:06:02 (11 years ago)
Author:
kovell
Message:

kills posted with external id of null, not 0
kb3_pilots unique index on external id changed to index (default is 0, not null)
kb3_kills columns created in correct order

Location:
dev
Files:
3 modified

Legend:

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

    r370 r374  
    851851                if ( $this->timestamp_ == "" || !$this->victimid_ || !$this->victimship_->getID() || !$this->solarsystem_->getID() || 
    852852                !$this->victimallianceid_ || !$this->victimcorpid_ || !$this->getFBAllianceID() || !$this->getFBCorpID() || 
    853                 !$this->getFBPilotID() ) 
    854                 return 0; 
     853                !$this->getFBPilotID() ) return 0; 
    855854                if ($id == null) 
    856855                { 
     
    868867                $qry = new DBQuery(); 
    869868                $sql = "INSERT INTO kb3_kills 
    870             (kll_id , kll_timestamp , kll_victim_id , kll_all_id , kll_crp_id , kll_ship_id , kll_system_id , kll_fb_plt_id , kll_points , kll_dmgtaken, kll_isk_loss) 
     869            (kll_id , kll_timestamp , kll_victim_id , kll_all_id , kll_crp_id , kll_ship_id , kll_system_id , kll_fb_plt_id , kll_points , kll_dmgtaken, kll_external_id, kll_isk_loss) 
    871870            VALUES (".$qid.", 
    872871                    date_format('".$this->timestamp_."', '%Y.%m.%d %H:%i:%s'), 
     
    879878            ".$this->calculateKillPoints().", 
    880879            ".$this->dmgtaken.", 
     880                        NULL, 
    881881            ".$this->calculateISKLoss()." )"; 
    882882                $qry->autocommit(false); 
  • dev/packages/database/kb3_kills/table.xml

    r371 r374  
    1111  `kll_ship_id` int(3) NOT NULL default 0, 
    1212  `kll_system_id` int(4) NOT NULL default 0, 
    13   `kll_fb_all_id` int(3) default NULL, 
     13  `kll_fb_plt_id` int(3) default NULL, 
    1414  `kll_points` int(11) NOT NULL default 0, 
     15  `kll_dmgtaken` int(11) NOT NULL default 0, 
    1516  `kll_external_id` int(3) default NULL, 
    1617  `kll_isk_loss` float NOT NULL default 0, 
    17   `kll_dmgtaken` int(11) NOT NULL default 0, 
    1818  PRIMARY KEY  (`kll_timestamp`,`kll_id`), 
    1919  UNIQUE KEY `kll_id` (`kll_id`), 
     
    2323  KEY `kll_crp_id` (`kll_crp_id`), 
    2424  KEY `kll_system_id` (`kll_system_id`), 
    25   KEY `kll_fb_all_id` (`kll_fb_all_id`), 
     25  KEY `kll_fb_plt_id` (`kll_fb_plt_id`), 
    2626  UNIQUE KEY `kll_external_id` (`kll_external_id`) 
    2727) Type=InnoDB  DEFAULT CHARSET=utf8;</structure> 
  • dev/packages/database/kb3_pilots/table.xml

    r371 r374  
    1111  PRIMARY KEY  (`plt_id`), 
    1212  UNIQUE KEY `plt_name` (`plt_name`), 
    13   UNIQUE KEY `plt_externalid` (`plt_externalid`) 
     13  KEY `plt_externalid` (`plt_externalid`) 
    1414) Type=InnoDB  DEFAULT CHARSET=utf8;</structure> 
    1515</kb3>