42 lines
909 B
PHP
42 lines
909 B
PHP
<?php
|
|
|
|
/**
|
|
* user actions.
|
|
*
|
|
* @package pae
|
|
* @subpackage user
|
|
* @author Your name here
|
|
* @version SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
|
|
*/
|
|
class userActions extends sfActions
|
|
{
|
|
/**
|
|
* Executes index action
|
|
*
|
|
*/
|
|
public function executeIndex()
|
|
{
|
|
$this->forward('default', 'module');
|
|
}
|
|
/**
|
|
* Toggles language from german to english
|
|
* or english to german as appropriate.
|
|
*
|
|
* @return void
|
|
* @author Benjamin Ramey <ben.ramey@gmail.com>
|
|
**/
|
|
public function executeToggleLanguage()
|
|
{
|
|
$newCulture = 'en';
|
|
$curCulture = $this->getUser()->getCulture();
|
|
|
|
if($curCulture == "en")
|
|
$newCulture = 'de';
|
|
|
|
$this->getUser()->setCulture($newCulture);
|
|
|
|
$redirectUrl = str_replace("/".$curCulture."/", "/".$newCulture."/", $this->getRequest()->getReferer());
|
|
$this->redirect($redirectUrl);
|
|
}
|
|
}
|