Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

393
 
394
 
394
 
language.php
_> 11 <?php
  22 /*
<> 3 -  $Id: language.php 393 2006-01-20 22:54:31Z hpdl $
   3+  $Id: language.php 394 2006-01-22 04:43:29Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
     
 !
5050 /* Public methods */
  5151 
  5252     function load($key) {
<> 53 -      global $osC_Cache;
   53+      global $osC_Database;
5454 
<> 55 -      if ($osC_Cache->read('languages-' . $this->_code . '-' . $key)) {
  56 -        $this->_definitions = array_merge($this->_definitions, $osC_Cache->getCache());
  57 -      } else {
  58 -        $osC_XML = new osC_XML('includes/languages/' . $this->_code . '.xml');
  59 -        $osC_XML->parse();
   55+      $Qdef = $osC_Database->query('select * from :table_languages_definitions where languages_id = :languages_id and content_group = :content_group');
   56+      $Qdef->bindTable(':table_languages_definitions', TABLE_LANGUAGES_DEFINITIONS);
   57+      $Qdef->bindInt(':languages_id', $this->getID());
   58+      $Qdef->bindValue(':content_group', $key);
   59+      $Qdef->setCache('languages-' . $this->_code . '-' . $key);
   60+      $Qdef->execute();
6061 
<> 61 -        $definitions = $osC_XML->getArray();
  62 -
  63 -        foreach ($definitions['language']['definitions']['definition'] as $def) {
  64 -          if ($def['group']['VALUE'] == $key) {
  65 -            $this->_definitions[$def['key']['VALUE']] = (string)$def['value']['VALUE'];
  66 -          }
  67 -        }
  68 -
  69 -        $osC_Cache->writeBuffer($this->_definitions);
   62+      while ($Qdef->next()) {
   63+        $this->_definitions[$Qdef->value('definition_key')] = $Qdef->value('definition_value');
7064       }
<>  65+
   66+      $Qdef->freeResult();
<_ 7167     }
  7268 
  7369     function get($key) {