issue #0001547 : Remove plugin

This commit is contained in:
Michael RICOIS 2013-05-27 15:54:05 +00:00
parent c295f9a4b6
commit d1eba87bb8

View File

@ -1,24 +0,0 @@
<?php
class Application_Controller_Plugin_Language extends Zend_Controller_Plugin_Abstract
{
public function postDispatch(Zend_Controller_Request_Abstract $request)
{
$registry = Zend_Registry::getInstance();
$translate = $registry->get('Zend_Translate');
$currLocale = $translate->getLocale();
$user = new Scores_Utilisateur();
if ( $user->isLog() ) {
$langtmp = $request->getParam('langtmp', '');
if (!$langtmp)
$langtmp = $user->getLangTmp() ? $user->getLangTmp() : $user->getLang();
$newLocale = new Zend_Locale();
$newLocale->setLocale($langtmp);
$registry->set('Zend_Locale', $newLocale);
$translate->setLocale($langtmp);
$user->setLangTmp($langtmp);
$registry->set('Zend_Translate', $translate);
} else {
$langtmp = 'fr';
}
}
}