Correction suite à création des modules

This commit is contained in:
Michael RICOIS 2016-05-05 14:29:49 +02:00
parent 6ea1905c74
commit 443eebca00
4 changed files with 40 additions and 9 deletions

View File

@ -28,7 +28,7 @@ class Auth_UserController extends Zend_Controller_Action
// Auth is valid
if ( $result->isValid() ) {
Zend_Registry::get('firebug')->info('Authentification valid');
// Save browser information
$screenSize = $request->getParam('screenSize', 'unknow');
$user = new Scores_Utilisateur();
@ -51,6 +51,7 @@ class Auth_UserController extends Zend_Controller_Action
}
// Auth error
else {
Zend_Registry::get('firebug')->info('Authentification invalid');
$this->view->message = '';
Zend_Registry::get('firebug')->info($result);
foreach ($result->getMessages() as $message) {
@ -80,10 +81,8 @@ class Auth_UserController extends Zend_Controller_Action
$refresh = 5;
$url = 'http://'.$_SERVER['SERVER_NAME'].$this->view->url(array(
'controller' => 'user',
'action' => 'login',
), 'default', true);
$url = 'http://'.$_SERVER['SERVER_NAME'].$this->view->url(array('module'=>'auth', 'controller' => 'user',
'action' => 'login',), 'default', true);
$this->view->assign('url', $url);

View File

@ -1,6 +1,38 @@
<?php
class Search_EntrepriseController extends Zend_Controller_Action
{
public function indexAction(){}
public function listAction(){}
protected $theme;
public function init()
{
// --- Theme
$this->theme = Zend_Registry::get('theme');
}
/**
* Affichage du formulaire de recherche
*/
public function indexAction()
{
$this->view->inlineScript()->appendFile($this->theme->pathScript.'/recherche.js', 'text/javascript');
$request = $this->getRequest();
$this->view->headTitle()->prepend('Recherche Entreprise');
$form = new Application_Form_RechercheEntreprise();
if ( $request->isPost() || $request->isGet() ){
$form->populate($request->getParams());
}
$this->view->assign('message', $request->getParam('message'));
$this->view->assign('form', $form);
$user = new Scores_Utilisateur();
$this->view->assign('SEARCHENT', $user->checkPerm('SEARCHENT'));
}
/**
* Liste des résultats
*/
public function listAction()
{
}
}

View File

@ -1,4 +1,4 @@
<div id="center">
<div id="content">
<div id="recherche">
<?php if (!empty($this->message)){ ?>
<div style="padding:0.7em;" class="ui-state-error ui-corner-all">

View File

@ -137,7 +137,7 @@ if ($this->action=='new') {
<?php
//Consomation
if ( $this->isAdmin || $this->isSuperAdmin ) {
echo $this->action('conso', 'user', null, array('login'=>$this->loginVu, 'idClient'=>$this->options->idClient));
echo $this->action('conso', 'identity', 'user', array('login'=>$this->loginVu, 'idClient'=>$this->options->idClient));
}
?>