Changeset 301
- Timestamp:
- 12/27/07 12:02:37 (15 years ago)
- Location:
- dev
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/includes/class.item.php
r299 r301 67 67 { 68 68 $this->execQuery(); 69 70 // if item has no slot get the slot from parent item 71 if ($this->row_['itt_slot'] == 0) 72 { 73 $qry = new DBQuery(); 74 $query = "select itt_slot from kb3_item_types 75 inner join kb3_dgmtypeattributes d 76 where itt_id = d.value 77 and d.typeID = ".$this->row_['typeID']." 78 and d.attributeID in (137,602);"; 79 $qry->execute($query); 80 $row = $qry->getRow(); 81 return $row['itt_slot']; 82 } 69 83 return $this->row_['itt_slot']; 70 84 } 71 85 72 86 function execQuery() 73 87 { … … 156 170 $this->id_ = $row['itm_id']; 157 171 } 158 172 173 159 174 function get_item_id($name) 160 175 { … … 175 190 } 176 191 192 function get_used_launcher_group($name) 193 { 194 $qry = new DBQuery(); 195 // I dont think CCP will change this attribute in near future ;-) 196 $query = "SELECT value 197 FROM kb3_dgmtypeattributes d 198 INNER JOIN kb3_invtypes i ON i.typeID = d.typeID 199 WHERE i.typeName = '".slashfix($name)."' AND d.attributeID IN (137,602);"; 200 $qry->execute($query); 201 $row = $qry->getRow(); 202 return $row['value']; 203 } 204 177 205 function get_group_id($name) 178 206 { -
dev/common/includes/globals.php
r298 r301 1 1 <?php 2 2 // current subversion revision 3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 298$', $match);3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 301 $', $match); 4 4 define('SVN_REV', $match[1]); 5 5 -
dev/mods/fitting/kill_detail.php
r297 r301 122 122 { 123 123 //Admin is able to see classified Systems 124 if ($page->isAdmin()){ 124 if ($page->isAdmin()) 125 { 125 126 $smarty->assign('System', $system->getName().' (Classified)'); 126 127 $smarty->assign('SystemURL', "?a=system_detail&sys_id=".$system->getID()); 127 128 $smarty->assign('SystemSecurity', $system->getSecurity(true)); 128 }else{ 129 } 130 else 131 { 129 132 $smarty->assign('System', 'Classified'); 130 133 $smarty->assign('SystemURL', ""); … … 164 167 165 168 166 $fitting_unwanted_groups = explode(";",config::get('fitting_unwanted_types'));167 169 //Fitting, KE - add destroyed items to an array of all fitted items. 168 if($destroyed->getLocationID() < 6 && !in_array($item->get_group_id($item->getName()), $fitting_unwanted_groups)){ 169 $count_quntity = 0; 170 if($destroyed->getLocationID() < 6 && ($item->get_used_launcher_group($item->getName()) == 0) 171 { 172 $count_quntity = 0; 170 173 while ($count_quntity < $destroyed->getQuantity()) 171 174 { … … 200 203 201 204 //Fitting -KE, add dropped items to the list 202 if(($dropped->getLocationID() != 4) && !in_array($item->get_group_id($item->getName()) , $fitting_unwanted_groups))205 if(($dropped->getLocationID() != 4) && ($item->get_used_launcher_group($item->getName()) == 0)) 203 206 { 204 $count_quntity = 0;207 $count_quntity = 0; 205 208 while ($count_quntity < $dropped->getQuantity()) 206 209 { 207 $fitting_array[$dropped->getLocationID()][]=array('Name'=>$item->getName(), 'Icon' => $item->getIcon(32), 'itemID' => $item->getID());208 ++$count_quntity;210 $fitting_array[$dropped->getLocationID()][]=array('Name'=>$item->getName(), 'Icon' => $item->getIcon(32), 'itemID' => $item->getID()); 211 ++$count_quntity; 209 212 } 210 213 } … … 222 225 $sort_by_nameh["Name"][] = $array_rowh["Name"]; 223 226 } 224 array_multisort($sort_by_nameh["Name"],SORT_ASC,$fitting_array[1]);227 array_multisort($sort_by_nameh["Name"],SORT_ASC,$fitting_array[1]); 225 228 } 226 229 -
dev/mods/fitting/settings.php
r297 r301 6 6 $html .= "No settings to make yet."; 7 7 8 if(!is_array(config::get('fitting_unwanted_types'))){9 //Array of item types we dont want added to the fitted items array.. ammo, scripts etc.10 // - need to find a better place for this.11 $fitting_unwanted_groups = array("",85,377,86,374,376,83,479,492,548,87,482,372,386,655,476,721,);12 config::set('fitting_unwanted_types', implode(";",$fitting_unwanted_groups));13 $html .= "<p>Config option added. Nothing else needs doing<br/><br/>Greetings Knifee & Ralle030583</p>";14 }15 16 8 $page->setContent( $html ); 17 9 $page->addContext( $menubox->generate() );