Merge from 1.2

This commit is contained in:
Michael RICOIS 2012-08-08 12:30:46 +00:00
commit f7d5ef8060
3 changed files with 33 additions and 14 deletions

View File

@ -46,13 +46,29 @@ class FieldsController extends Zend_Controller_Action
switch ($name) {
case 'ape_etab':
case 'ape_entrep':
/**
* @todo : Ajouter la recherche par code
*/
$separator = ' , ';
$table = new Application_Model_Naf();
$sql = $table->select();
$sql->where('LOWER(lib) LIKE "%'.$q.'%"');
if (count($queries)>0) {
$where = '';
$i = 0;
foreach ($queries as $item) {
if (strlen($item)>2) {
$where = 'LIKE "%'.strtolower($item).'%"';
}
$i++;
if (count($queries) < $i){
$where.= ' OR ';
}
}
$sql->where("LOWER(lib) ".$where);
}
$sql->where('niveau = 5');
$result = $table->fetchAll($sql);
foreach ($result as $item) {
$output[] = array(

View File

@ -76,7 +76,7 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
$identity->time = time() + $identity->timeout;
$layout = Zend_Layout::getMVCInstance();
if ( !empty($identity->dateContrat) && $layout->isEnabled() )
if ( !isset($identity->dateContrat) && $layout->isEnabled() )
{
//Get customer's params
$paramsM = new Application_Model_CustomerParams();
@ -84,7 +84,8 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
->where('idClient = ?', $identity->idClient)
//@todo : add service from WebService
->order('dateContrat DESC')->limit(1);
Zend_Registry::get('firebug')->info($sql->__toString());
$params = $paramsM->fetchAll($sql)->toArray();
if (count($params)>0) {
$identity->filterRNCS = $params[0]['filterRNCS'];
@ -115,8 +116,10 @@ class Application_Controller_Plugin_Auth extends Zend_Controller_Plugin_Abstract
}
}
Zend_Registry::get('firebug')->info($identity);
//No contrat define
if ( $identity->dateContrat!=0 ) {
if ( $identity->dateContrat=='0000-00-00 00:00:00' ) {
//If no params are detected, display a message to contact support
$request->setModuleName('default')
->setControllerName('aide')

View File

@ -1,21 +1,21 @@
[local]
webservices.interne.wsdl = "http://webservice-2.1.sd.dev/interne/v0.3?wsdl-auto"
webservices.interne.wsdl = "http://webservice-2.3.sd.dev/interne/v0.3?wsdl-auto"
webservices.interne.options.soap_version = SOAP_1_2
webservices.entreprise.wsdl = "http://webservice-2.1.sd.dev/entreprise/v0.4?wsdl-auto"
webservices.entreprise.wsdl = "http://webservice-2.3.sd.dev/entreprise/v0.4?wsdl-auto"
webservices.entreprise.options.soap_version = SOAP_1_2
webservices.gestion.wsdl = "http://webservice-2.1.sd.dev/gestion/v0.1?wsdl-auto"
webservices.gestion.wsdl = "http://webservice-2.3.sd.dev/gestion/v0.1?wsdl-auto"
webservices.gestion.options.soap_version = SOAP_1_2
webservices.exporter.wsdl = "http://webservice-2.1.sd.dev/exporter/v0.1?wsdl-auto"
webservices.exporter.wsdl = "http://webservice-2.3.sd.dev/exporter/v0.1?wsdl-auto"
webservices.exporter.options.soap_version = SOAP_1_2
[sdsrvdev01]
webservices.interne.wsdl = "http://webservice-2.1.sd.lan/interne/v0.3?wsdl-auto"
webservices.interne.wsdl = "http://webservice-2.3.sd.lan/interne/v0.3?wsdl-auto"
webservices.interne.options.soap_version = SOAP_1_2
webservices.entreprise.wsdl = "http://webservice-2.1.sd.lan/entreprise/v0.4?wsdl-auto"
webservices.entreprise.wsdl = "http://webservice-2.3.sd.lan/entreprise/v0.4?wsdl-auto"
webservices.entreprise.options.soap_version = SOAP_1_2
webservices.gestion.wsdl = "http://webservice-2.1.sd.lan/gestion/v0.1?wsdl-auto"
webservices.gestion.wsdl = "http://webservice-2.3.sd.lan/gestion/v0.1?wsdl-auto"
webservices.gestion.options.soap_version = SOAP_1_2
webservices.exporter.wsdl = "http://webservice-2.1.sd.lan/exporter/v0.1?wsdl-auto"
webservices.exporter.wsdl = "http://webservice-2.3.sd.lan/exporter/v0.1?wsdl-auto"
webservices.exporter.options.soap_version = SOAP_1_2
[sd-25137]