Changeset 308
- Timestamp:
- 12/31/07 15:37:10 (15 years ago)
- Location:
- dev/common/includes
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/includes/autoupgrade.php
r306 r308 6 6 // 7 7 // 8 if (!config::get("DBUpdate")) 9 config::set("DBUpdate","000"); 10 8 11 // Current update version of Database 9 12 define(CURRENT_DB_UPDATE,config::get("DBUpdate")); 10 13 //Update version of this autoupgrade.php 11 define(LASTEST_DB_UPDATE,"00 1");14 define(LASTEST_DB_UPDATE,"002"); 12 15 13 16 function updateDB(){ … … 15 18 if (CURRENT_DB_UPDATE < LASTEST_DB_UPDATE ){ 16 19 update001(); 20 update002(); 17 21 } 18 22 } … … 20 24 function update001(){ 21 25 //Checking if this Update already done 22 if (CURRENT_DB_UPDATE < "001" ){ 26 if (CURRENT_DB_UPDATE < "001" ) 27 { 23 28 require_once("common/includes/class.item.php"); 24 25 29 // Changing ShieldBooster Slot from None to Mid Slot 26 30 $ShieldBoosterGroup = item::get_group_id("Small Shield Booster I"); … … 58 62 $TractorBeam = item::get_group_id("Small Tractor Beam I"); 59 63 move_item_to_group($SalvagerTypeId,$SalvagerGroup ,$TractorBeam); 64 65 66 update_slot_of_group($TractorBeam, 67 60 68 61 69 //writing Update Status into ConfigDB … … 64 72 } 65 73 74 function update002(){ 75 // to correct the already existing Salvager in med slots. 76 // missed it in update001 77 if (CURRENT_DB_UPDATE < "002" ) 78 { 79 require_once("common/includes/class.item.php"); 80 $SalvagerGroup = item::get_group_id("Salvager I"); 81 update_slot_of_group($SalvagerGroup,2,1); 82 } 83 } 84 66 85 function update_slot_of_group($id,$oldSlot = 0 ,$newSlot){ 67 86 $qry = new DBQuery(); 68 87 $query = "UPDATE kb3_item_types 69 SET itt_slot = $newSlot WHERE itt_id = $id;";88 SET itt_slot = $newSlot WHERE itt_id = $id amd itt_slot = $oldSlot;"; 70 89 $qry->execute($query); 71 90 $query = "UPDATE kb3_items_destroyed -
dev/common/includes/globals.php
r307 r308 1 1 <?php 2 2 // current subversion revision 3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 30 7$', $match);3 preg_match('/\$Re'.'vision: (.*?) \$/', '$Revision: 308 $', $match); 4 4 define('SVN_REV', $match[1]); 5 5