Ignore:
Timestamp:
Jul 2, 2009, 11:18:27 AM (15 years ago)
Author:
maron
Message:

Oprava importu dbc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/global_function.php

    r224 r226  
    253253       
    254254 
    255     if ($GroupItem['MangosColumn'] <> '') 
     255    if (($GroupItem['MangosColumn'] <> '') and ($Group['MangosDatabase'] == 'mangos'))
    256256      $new = $Value[$GroupItem['MangosColumn']];
    257257    else
     
    290290function GetVersionWOW($BuildNumber)
    291291{
    292   global $Database;
    293        
    294   $sql = 'SELECT Version FROM `wow_client_version` WHERE BuildNumber = "'.$BuildNumber.'"';
    295   $Version = mysql_fetch_assoc($Database->SQLCommand($sql));
    296   return($Version['Version']);
     292  global $Database,$VersionsWOW;
     293  if (isset($VersionsWOW[$BuildNumber]) == false)
     294  {
     295    $sql = 'SELECT Version FROM `wow_client_version` WHERE BuildNumber = "'.$BuildNumber.'"';
     296    $Version = mysql_fetch_assoc($Database->SQLCommand($sql));
     297    $VersionsWOW[$BuildNumber] = $Version['Version'];
     298  }
     299    return($VersionsWOW[$BuildNumber]);
    297300}
    298301
    299302function GetDBCColumns($Version,$DBCFileName)
    300303{
    301   global $Database;
    302        
    303   $sql = 'SELECT DBCColumns_'.$DBCFileName.' as DBCColumns FROM `wow_client_version` WHERE Version = "'.$Version.'"';
    304   $DbRow = mysql_fetch_assoc($Database->SQLCommand($sql));
    305   return($DbRow['DBCColumns']);
     304  global $Database,$BuildNumbers;
     305  if (isset($BuildNumbers[$Version]) == false)
     306  {
     307    $sql = 'SELECT DBCColumns_'.$DBCFileName.' as DBCColumns FROM `wow_client_version` WHERE Version = "'.$Version.'"';
     308    $DbRow = mysql_fetch_assoc($Database->SQLCommand($sql));
     309    $BuildNumbers[$Version] = $DbRow['DBCColumns'];
     310  }
     311  return($BuildNumbers[$Version]);
    306312}
    307313
Note: See TracChangeset for help on using the changeset viewer.