X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=application%2Fcontrollers%2FAccountController.php;h=57ea4d41d04be8c489a63181d8db3ad7e4bf7a34;hb=8e7d8e39a2ee5801a2f68b95cdc0e84b55da1019;hp=76124908d504b90645d13658f53b87f5d9f0a7e1;hpb=05ce9238adfa982746bfc6211b240fd24526af09;p=syj.git diff --git a/application/controllers/AccountController.php b/application/controllers/AccountController.php index 7612490..57ea4d4 100644 --- a/application/controllers/AccountController.php +++ b/application/controllers/AccountController.php @@ -6,11 +6,13 @@ class AccountController extends Zend_Controller_Action { public function init() { + $this->_helper->SyjSession->needsLogin(); + $this->view->headScript()->appendFile('js/prototype.js'); $this->view->headScript()->appendFile('js/utils.js'); $this->view->headScript()->appendFile('js/account.js'); - $this->view->headLink()->appendStylesheet('css/generic.css'); - $this->view->headLink()->appendStylesheet('css/account.css'); + $this->view->headLink()->appendStylesheet('css/generic.css', 'all'); + $this->view->headLink()->appendStylesheet('css/account.css', 'all'); $this->view->headTitle($this->view->translate("my account")); } @@ -18,20 +20,6 @@ class AccountController extends Zend_Controller_Action $user = $this->_helper->SyjSession->user(); $request = $this->getRequest(); - if ($user === null) { - $encodeduri = implode('/', array_map('urlencode', explode('/', $request->getRequestUri()))); - $loginurl = $this->view->addParamToUrl($this->view->baseUrl() . '/' . 'login', 'redirect', $encodeduri); - $translator = Zend_Registry::get('Zend_Translate'); - $lang = Zend_Controller_Front::getInstance()->getRequest()->getQuery('lang'); - if ($lang) { - $adapter = $translator->getAdapter(); - if ($adapter->isAvailable($lang)) { - $loginurl = $this->view->addParamToUrl($loginurl, 'lang', $lang); - } - } - $this->_helper->Redirector->gotoURL($loginurl, array('prependBase' => false)); - } - $form = new Syj_Form_Account(array('name' => 'accountform')); $formData = $request->getPost();