Remove autoloading Form_
This commit is contained in:
parent
81a4e690fa
commit
5a703145f6
@ -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()) {
|
||||
|
@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class Form_Login extends Zend_Form {
|
||||
class Application_Form_Login extends Zend_Form {
|
||||
|
||||
public function init()
|
||||
{
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user