Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace:

Diff

1497
 
1507
 
1507
 
language.php
_> 11 <?php
  22 /*
<> 3 -  $Id: language.php 1497 2007-03-29 13:40:05Z hpdl $
   3+  $Id: language.php 1507 2007-03-29 21:09:06Z hpdl $
44 
  55   osCommerce, Open Source E-Commerce Solutions
  66   http://www.oscommerce.com
  77 
<> 8 -  Copyright (c) 2006 osCommerce
   8+  Copyright (c) 2007 osCommerce
99 
  1010   This program is free software; you can redistribute it and/or modify
  1111   it under the terms of the GNU General Public License v2 (1991)
     
 !
4141                                                               'text_direction' => $Qlanguages->value('text_direction'),
  4242                                                               'currencies_id' => $Qlanguages->valueInt('currencies_id'),
  4343                                                               'numeric_separator_decimal' => $Qlanguages->value('numeric_separator_decimal'),
<> 44 -                                                              'numeric_separator_thousands' => $Qlanguages->value('numeric_separator_thousands'));
   44+                                                              'numeric_separator_thousands' => $Qlanguages->value('numeric_separator_thousands'),
   45+                                                              'parent_id' => $Qlanguages->valueInt('parent_id'));
4546       }
  4647 
  4748       $Qlanguages->freeResult();
     
 !
5152 
  5253 /* Public methods */
  5354 
<> 54 -    function load($key) {
   55+    function load($key, $language_code = null) {
5556       global $osC_Database;
  5657 
<>  58+      if ( is_null($language_code) ) {
   59+        $language_code = $this->_code;
   60+      }
   61+
   62+      if ( $this->_languages[$language_code]['parent_id'] > 0 ) {
   63+        $this->load($key, $this->getCodeFromID($this->_languages[$language_code]['parent_id']));
   64+      }
   65+
5766       $Qdef = $osC_Database->query('select * from :table_languages_definitions where languages_id = :languages_id and content_group = :content_group');
  5867       $Qdef->bindTable(':table_languages_definitions', TABLE_LANGUAGES_DEFINITIONS);
<> 59 -      $Qdef->bindInt(':languages_id', $this->getID());
   68+      $Qdef->bindInt(':languages_id', $this->getData('id', $language_code));
6069       $Qdef->bindValue(':content_group', $key);
<> 61 -      $Qdef->setCache('languages-' . $this->_code . '-' . $key);
   70+      $Qdef->setCache('languages-' . $language_code . '-' . $key);
<_ 6271       $Qdef->execute();
  6372 
  6473       while ($Qdef->next()) {