Correct require_once path
This commit is contained in:
parent
dd4292c696
commit
641e6cd97d
@ -3,12 +3,12 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
require_once '/WorldCheck/WsWorldCheck.php';
|
||||
require_once 'WorldCheck/WsWorldCheck.php';
|
||||
require_once 'WorldCheck/SessionWorldcheck.php';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
@ -19,26 +19,26 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
$param->dirPrenom = $request->getParam('dirPrenom');
|
||||
$param->dirType = $request->getParam('dirType');
|
||||
$param->Siren = $request->getParam('siren');
|
||||
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
$session = new SessionWorldcheck();
|
||||
$wc = new WsWorldCheck();
|
||||
$wcLocal = new Application_Model_Worldcheck();
|
||||
|
||||
|
||||
//check worldcheck data correctness in the session
|
||||
if (!$session->getName() || $session->getName()!=$param->dirNom || substr($session->getNameIdentifier(),0,3)!='so_' || $session->getNameType()!=$param->dirType)
|
||||
{
|
||||
$param->idClient = $user->getIdClient();
|
||||
$param->login = $user->getLogin();
|
||||
$localDBParams = $wcLocal->getScreenerId($param);
|
||||
$localDBParams = $wcLocal->getScreenerId($param);
|
||||
$param->matchCount = $localDBParams->matchCount;
|
||||
$param->nameIdentifier = $localDBParams->nameIdentifier;
|
||||
$session->setSession($param);
|
||||
}
|
||||
|
||||
|
||||
$nameIdentifier = $session->getNameIdentifier();
|
||||
$matchCount = $session->getMatchCount();
|
||||
|
||||
|
||||
if ($matchCount!==0)
|
||||
{
|
||||
$summary = new stdClass();
|
||||
@ -68,7 +68,7 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
//end
|
||||
$resultWC = $filteredWC;
|
||||
}
|
||||
|
||||
|
||||
$filtres = array(
|
||||
'tout' => array(
|
||||
'txt'=>'Résultats par Nom',
|
||||
@ -81,23 +81,23 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
'value' => 1,
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
$filtres[$filtre]['select'] = ' selected';
|
||||
|
||||
|
||||
$this->view->assign('filtres', $filtres);
|
||||
//end
|
||||
|
||||
|
||||
$configWC = new Zend_Config_Ini('/Worldcheck/applicationWC.ini');
|
||||
$cacheConfig = $configWC->worldcheck->toArray();
|
||||
|
||||
|
||||
|
||||
|
||||
/*$frontendOptions = array(
|
||||
'lifetime' => $cacheConfig['cachedir']['lifetime'],
|
||||
'automatic_serialization' => true
|
||||
);
|
||||
$backendOptions = array('cache_dir' => $cacheConfig['cachedir']['path'].$cacheConfig['cachedir']['name']);
|
||||
$cache = Zend_Cache::factory('Output','File',$frontendOptions,$backendOptions);*/
|
||||
|
||||
|
||||
//paginate results list
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('worldcheck/controls.phtml');
|
||||
$paginator = Zend_Paginator::factory($resultWC);
|
||||
@ -105,31 +105,31 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
$itemCount = $cacheConfig['page']['items'];
|
||||
$page = $this->_getParam('page', 1);
|
||||
$ol_number = ($page-1)*$itemCount+1;
|
||||
|
||||
|
||||
/*if(!($cache->load('page_'.$page))) {
|
||||
$cache->save($paginator, 'page_'.$page);
|
||||
}*/
|
||||
|
||||
|
||||
$paginator->setCurrentPageNumber($page);
|
||||
$paginator->setItemCountPerPage($itemCount);
|
||||
|
||||
|
||||
$this->view->assign('ol_number', $ol_number);
|
||||
$this->view->assign('itemCount', $itemCount);
|
||||
//end
|
||||
|
||||
|
||||
$this->view->assign('resultWC', $resultWC);
|
||||
$this->view->assign('allMatches', $wc->getMatchesArrName($summary));
|
||||
$this->view->assign('param', $param);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Affichage le quantite des occurences de la bdd en popup.
|
||||
*/
|
||||
public function occurenceAction()
|
||||
{
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
|
||||
if ( $request->isXmlHttpRequest() ) {
|
||||
$this->_helper->layout()->disableLayout();
|
||||
$data = new stdClass();
|
||||
@ -142,22 +142,22 @@ class WorldcheckController extends Zend_Controller_Action
|
||||
$this->view->assign('occurrence', $wcLocal->getCount($data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Affichage le resultat de recherche en WorldCheck
|
||||
*/
|
||||
public function matchcontentAction()
|
||||
{
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$session = new SessionWorldcheck();
|
||||
|
||||
|
||||
$param = new stdClass();
|
||||
$param->matchIdentifier = $request->getParam('matchIdentifier');
|
||||
$param->nameType = $session->getNameType();
|
||||
|
||||
|
||||
$wc = new WsWorldCheck();
|
||||
$content = $wc->getDetailsContent($param);
|
||||
|
||||
|
||||
$this->view->assign('matchIdentifier', $param->matchIdentifier);
|
||||
$this->view->assign('content', $content);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user