Development

Changeset 8296

You must first sign up to be able to contribute.

Changeset 8296

Show
Ignore:
Timestamp:
04/04/08 18:16:30 (5 months ago)
Author:
fabien
Message:

fixed sfI18n and Propel (closes #3261 - it took me 6 hours to fix it)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/plugins/sfPropelPlugin/lib/propel/sfPropel.class.php

    r6493 r8296  
    77 * For the full copyright and license information, please view the LICENSE 
    88 * file that was distributed with this source code. 
    9  */ 
    10  
    11 /** 
    12  * @package    symfony 
    13  * @subpackage propel 
    14  * @author     Fabien Potencier <fabien.potencier@symfony-project.com> 
    15  * @version    SVN: $Id$ 
    169 */ 
    1710 
     
    3427    { 
    3528      self::setDefaultCulture($culture); 
     29    } 
     30    else if (class_exists('sfContext', false) && sfContext::hasInstance()) 
     31    { 
     32      self::setDefaultCulture(sfContext::getInstance()->getUser()->getCulture()); 
    3633    } 
    3734  } 
  • branches/1.1/lib/plugins/sfPropelPlugin/test/functional/fixtures/config/schema.xml

    r7147 r8296  
    4545  </table> 
    4646 
     47  <table name="movie" isI18N="true" i18nTable="movie_i18n"> 
     48    <column name="id" type="integer" required="true" primaryKey="true" autoincrement="true" /> 
     49    <column name="director" type="varchar" size="255" /> 
     50  </table> 
     51 
     52  <table name="movie_i18n"> 
     53    <column name="id" type="integer" required="true" primaryKey="true" /> 
     54    <foreign-key foreignTable="movie" onDelete="cascade"> 
     55      <reference local="id" foreign="id"/> 
     56    </foreign-key> 
     57    <column name="culture" type="varchar" size="7" required="true" primaryKey="true" isCulture="true" /> 
     58    <column name="title" type="varchar" /> 
     59  </table> 
     60 
    4761</database> 
  • branches/1.1/lib/plugins/sfPropelPlugin/test/functional/fixtures/data/fixtures/fixtures.yml

    r8258 r8296  
    3434  helene: 
    3535    name: Hélène 
     36 
     37Movie: 
     38  la_vita_e_bella: 
     39    director: Roberto Benigni 
     40 
     41MovieI18n: 
     42  la_vita_e_bella_it: 
     43    id:      la_vita_e_bella 
     44    culture: it 
     45    title:   La Vita è bella 
     46  la_vita_e_bella_fr: 
     47    id:      la_vita_e_bella 
     48    culture: fr 
     49    title:   La Vie est belle