Remove autoloading Form_

This commit is contained in:
Michael RICOIS 2013-05-23 06:51:18 +00:00
parent 81a4e690fa
commit 5a703145f6
6 changed files with 14 additions and 18 deletions

View File

@ -13,7 +13,7 @@ class UserController extends Zend_Controller_Action
//@todo : gestion des affichages particuliers pour les clients
$this->view->headTitle()->append('Connexion');
$form = new Form_Login();
$form = new Application_Form_Login();
$this->view->form = $form;
$request = $this->getRequest();
if ($request->isPost()) {

View File

@ -58,14 +58,13 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
$layout = Zend_Layout::getMVCInstance();
//Authentifié => on met à jour la session
if ( $auth->hasIdentity() )
{
if ( $auth->hasIdentity() && time() < $auth->getIdentity()->time ) {
$identity = $auth->getIdentity();
$identity->time = time() + $identity->timeout;
if ( !isset($identity->dateContrat) && $layout->isEnabled() )
{
if ( !isset($identity->dateContrat) && $layout->isEnabled() ) {
//Get customer's params
$paramsM = new Application_Model_CiblageCustomerParams();
$sql = $paramsM->select()
@ -146,7 +145,7 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
Zend_Session::namespaceUnset('login');
}
} elseif (time() > $auth->getIdentity()->time ) {
} elseif ($auth->hasIdentity() && time() > $auth->getIdentity()->time ) {
if ( $request->getControllerName()=='index' && $request->getActionName()=='index' ) {
$request->setModuleName('default')
@ -161,17 +160,17 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
} else {
if ( !$request->isXmlHttpRequest() ) {
if ($request->isXmlHttpRequest()) {
$request->setModuleName('default')
->setControllerName('user')
->setActionName('logout')
->setParam('ajax', 1);
} else {
$session = new Zend_Session_Namespace('login');
$session->url = $_SERVER['REQUEST_URI'];
$request->setModuleName('default')
->setControllerName('user')
->setActionName('login');
} else {
$request->setModuleName('default')
->setControllerName('user')
->setActionName('logout')
->setParam('ajax', 1);
->setControllerName('user')
->setActionName('login');
}
}

View File

@ -1,5 +1,5 @@
<?php
class Form_Login extends Zend_Form {
class Application_Form_Login extends Zend_Form {
public function init()
{

View File

@ -19,7 +19,6 @@ resources.layout.layoutPath = APPLICATION_PATH "/views/default"
resources.view.basePath = APPLICATION_PATH "/views/default"
autoloaderNamespaces[] = "Application_"
autoloaderNamespaces[] = "Scores_"
autoloaderNamespaces[] = "Form_"
; Scores configuration
profil.server.name = Odea

View File

@ -19,7 +19,6 @@ resources.layout.layoutPath = APPLICATION_PATH "/views/default"
resources.view.basePath = APPLICATION_PATH "/views/default"
autoloaderNamespaces[] = "Application_"
autoloaderNamespaces[] = "Scores_"
autoloaderNamespaces[] = "Form_"
; Scores configuration
profil.server.name = development

View File

@ -19,7 +19,6 @@ resources.layout.layoutPath = APPLICATION_PATH "/views/default"
resources.view.basePath = APPLICATION_PATH "/views/default"
autoloaderNamespaces[] = "Application_"
autoloaderNamespaces[] = "Scores_"
autoloaderNamespaces[] = "Form_"
; Scores configuration
profil.server.name = development