<?php
class UrlManager extends CUrlManager
{
public function createUrl($route,$params=array(),$ampersand='&')
{
if (!isset($params['language'])) {
if (Yii::app()->user->hasState('language'))
Yii::app()->language = Yii::app()->user->getState('language');
else if(isset(Yii::app()->request->cookies['language']))
Yii::app()->language = Yii::app()->request->cookies['language']->value;
$params['language']=Yii::app()->language;
}
return parent::createUrl($route, $params, $ampersand);
}
}
?>
'<language:(ru|uk)>/' => 'site/index',
'<language:(ru|uk)>/sitemap.xml'=>'sitemap/main/viewxml',
'<language:(ru|uk)>/property/<id:\d+>'=>'apartments/main/view',
'<language:(ru|uk)>/news'=>'news/main/index',
'<language:(ru|uk)>/news/<id:\d+>'=>'news/main/view',
'<language:(ru|uk)>/faq'=>'articles/main/index',
'<language:(ru|uk)>/faq/<id:\d+>'=>'articles/main/view',
'<language:(ru|uk)>/contact-us'=>'contactform/main/index',
'<language:(ru|uk)>/specialoffers'=>'specialoffers/main/index',
'<language:(ru|uk)>/page/<id:\d+>'=>'menumanager/main/view',
'<language:(ru|uk)>/service-<serviceId:\d+>' => 'quicksearch/main/mainsearch',
'<language:(ru|uk)>/<controller:(quicksearch|specialoffers)>/main/index' => '<controller>/main/index',
'<language:(ru|uk)>/<_m>/<_c>/<_a>' => '<_m>/<_c>/<_a>',
'<language:(ru|uk)>/<_c>/<_a>' => '<_c>/<_a>',
'<language:(ru|uk)>/<module:\w+>/backend/<controller:\w+>/<action:\w+>'=>'<module>/backend/<controller>/<action>',
san4ezzzpro писал(а):Посмотрел в firebug ошибка на POST /configuration/backend/main/updateAjax 400 CHttpException.
Вернуться в Вопросы и помощь по изменениям
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 68