Ignore:
Timestamp:
Jul 2, 2009, 9:41:51 PM (15 years ago)
Author:
maron
Message:

oprava funkce pro zjištění struktury dbc souborů

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/global_function.php

    r226 r232  
    125125  } else
    126126  {
    127         return(false);
     127    if(isset($_SERVER['REMOTE_ADDR']))
     128        {
     129          return(true);
     130        } else {
     131          return(false);
     132        }
    128133  }
    129134}
     
    281286function GetBuildNumber($Version)
    282287{
    283   global $Database;
     288  global $Database,$BuildNumbers;
    284289       
    285   $sql = 'SELECT BuildNumber FROM `wow_client_version` WHERE Version = "'.$Version.'"';
    286   $BuildNumber = mysql_fetch_assoc($Database->SQLCommand($sql));
    287   return($BuildNumber['BuildNumber']);
     290  if (isset($VersionsWOW[$BuildNumber]) == false)
     291  {
     292    $sql = 'SELECT BuildNumber FROM `wow_client_version` WHERE Version = "'.$Version.'"';
     293    $DbRow = mysql_fetch_assoc($Database->SQLCommand($sql));
     294    $BuildNumbers[$Version] = $DbRow['BuildNumber'];
     295  }
     296  return($BuildNumbers[$Version]);
    288297}
    289298
     
    302311function GetDBCColumns($Version,$DBCFileName)
    303312{
    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]);
     313  global $Database;
     314  $sql = 'SELECT DBCColumns_'.$DBCFileName.' as DBCColumns FROM `wow_client_version` WHERE Version = "'.$Version.'"';
     315  $DbRow = mysql_fetch_assoc($Database->SQLCommand($sql));
     316  return($DbRow['DBCColumns']);
    312317}
    313318
Note: See TracChangeset for help on using the changeset viewer.