Skip to content

Commit

Permalink
(fixes #1453) fixed to treat as English User when the language is not…
Browse files Browse the repository at this point in the history
… supported
  • Loading branch information
Tajima Itsuro committed Sep 22, 2010
1 parent 1cd3238 commit cae4f98
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion lib/config/opApplicationConfiguration.class.php
Expand Up @@ -215,11 +215,15 @@ public function filterTemplateParameters(sfEvent $event, $parameters)

$table = Doctrine::getTable('SnsTerm');
$application = sfConfig::get('sf_app');
if($application == 'pc_backend')
if ($application == 'pc_backend')
{
$application = 'pc_frontend';
}
$table->configure(sfContext::getInstance()->getUser()->getCulture(), $application);
if (!$table['member'])
{
$table->configure('en', $application);
}
$parameters['op_term'] = $table;
sfOutputEscaper::markClassAsSafe('SnsTermTable');

Expand Down
7 changes: 5 additions & 2 deletions lib/i18n/opI18N.class.php
Expand Up @@ -20,14 +20,17 @@ public function initialize(sfApplicationConfiguration $configuration, sfCache $c
{
parent::initialize($configuration, $cache, $options);

$this->terms = Doctrine::getTable('SnsTerm');
$application = sfConfig::get('sf_app');
if($application == 'pc_backend')
if ($application == 'pc_backend')
{
$application = 'pc_frontend';
}
$this->terms = Doctrine::getTable('SnsTerm');
$this->terms->configure($this->culture, $application);
if (!$this->terms['member'])
{
$this->terms->configure('en', $application);
}
}

public function generateApplicationMessages($dirs)
Expand Down

0 comments on commit cae4f98

Please sign in to comment.