]> dev.renevier.net Git - syj.git/blobdiff - application/controllers/AccountController.php
cache js, css and png files
[syj.git] / application / controllers / AccountController.php
index 57ea4d41d04be8c489a63181d8db3ad7e4bf7a34..9db12047c197b87330754f9013ad04e269a7ec3c 100644 (file)
@@ -1,23 +1,20 @@
 <?php
-/*  This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
+/*  This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
     and is published under the AGPL license. */
 
 class AccountController extends Zend_Controller_Action
 {
 
     public function init() {
-        $this->_helper->SyjSession->needsLogin();
+        $this->_helper->SyjUserManager->needsLogin();
+        $this->_helper->SyjMedias->addScripts('account');
+        $this->_helper->SyjMedias->addStyleSheets('account');
 
-        $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', 'all');
-        $this->view->headLink()->appendStylesheet('css/account.css', 'all');
         $this->view->headTitle($this->view->translate("my account"));
     }
 
     public function indexAction() {
-        $user = $this->_helper->SyjSession->user();
+        $user = $this->_helper->SyjUserManager->current();
         $request = $this->getRequest();
 
         $form = new Syj_Form_Account(array('name' => 'accountform'));
@@ -68,7 +65,7 @@ class AccountController extends Zend_Controller_Action
 
     protected function _jsLocaleStrings() {
         $this->view->jslocales = array(
-            'notEmptyField' => __("Value is required and can't be empty"),
+            'notEmptyField' => __("Value is required"),
             'passwordNoMatchWarn' => __("Password do not match"),
             'passwordLenghtWarn' => array(__("At least %d characters"), 6),
             'nochangeWarn' => __("You have made no change"),