Plugin désactivation les requêtes ajax
This commit is contained in:
parent
1e6845f1f5
commit
fabc376200
@ -9,16 +9,20 @@ class Application_Controller_Plugin_Cgu extends Zend_Controller_Plugin_Abstract
|
||||
*/
|
||||
public function preDispatch(Zend_Controller_Request_Abstract $request)
|
||||
{
|
||||
Zend_Registry::get('firebug')->info('PLUGIN CGU - START');
|
||||
|
||||
$module = $request->getModuleName();
|
||||
$controller = $request->getControllerName();
|
||||
$action = $request->getActionName();
|
||||
|
||||
if ($request->isXmlHttpRequest()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($module == 'default' && $controller == 'index' && $action = 'index') {
|
||||
return;
|
||||
}
|
||||
|
||||
Zend_Registry::get('firebug')->info('PLUGIN CGU - START');
|
||||
|
||||
$layout = Zend_Layout::getMVCInstance();
|
||||
if ($layout->isEnabled()) {
|
||||
$tabCgu = array(
|
||||
|
@ -7,6 +7,10 @@ class Application_Controller_Plugin_Histo extends Zend_Controller_Plugin_Abstrac
|
||||
$controller = $request->getControllerName();
|
||||
$action = $request->getActionName();
|
||||
|
||||
if ($request->isXmlHttpRequest()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !in_array($module, array('legal', 'search')) ) {
|
||||
return;
|
||||
}
|
||||
|
@ -7,6 +7,10 @@ class Application_Controller_Plugin_Input extends Zend_Controller_Plugin_Abstrac
|
||||
$controller = $request->getControllerName();
|
||||
$action = $request->getActionName();
|
||||
|
||||
if ($request->isXmlHttpRequest()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (in_array($module, array('default', 'auth'))) {
|
||||
return;
|
||||
}
|
||||
|
@ -24,7 +24,11 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
|
||||
$controller = $request->getControllerName();
|
||||
$action = $request->getActionName();
|
||||
|
||||
if ($module == 'default' && $controller == 'index' && $action = 'index') {
|
||||
if ($request->isXmlHttpRequest()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($module == 'default' && $controller == 'index' && $action == 'index') {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -80,10 +84,22 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
|
||||
$view->MenuAdvanced = true;
|
||||
$view->MenuLabel = 'Informations légales';
|
||||
$config = include APPLICATION_PATH . '/configs/menu.legal.php';
|
||||
|
||||
// @todo : Ajouter les paramètres essentiel "cid" et "ctype" sur chaque page
|
||||
|
||||
$container = new Zend_Navigation($config);
|
||||
|
||||
if ($container->hasPages()) {
|
||||
foreach($container->getPages() as $head) {
|
||||
if ($head->hasChildren()) {
|
||||
foreach($head->getPages() as $page) {
|
||||
if ($page->isActive()) {
|
||||
$head->setActive();
|
||||
}
|
||||
// @todo : Set parameters filters by plugin ProxId "cid", "ctype"
|
||||
$page->setParam('siret', $request->getParam('siret'));
|
||||
$page->setParam('id', $request->getParam('id'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$view->navigation($container);
|
||||
$view->headLink()
|
||||
->appendStylesheet('/libs/metisMenu/metisMenu.min.css', 'all');
|
||||
@ -147,4 +163,14 @@ class Application_Controller_Plugin_Menu extends Zend_Controller_Plugin_Abstract
|
||||
|
||||
Zend_Registry::get('firebug')->info('PLUGIN MENU - END');
|
||||
}
|
||||
|
||||
protected function setParentActive($page)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected function setPageParams($pages)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -3,13 +3,20 @@ class Application_Controller_Plugin_Pdf extends Zend_Controller_Plugin_Abstract
|
||||
{
|
||||
public function dispatchLoopShutdown()
|
||||
{
|
||||
$request = $this->_request;
|
||||
|
||||
$module = $request->getModuleName();
|
||||
$controller = $request->getControllerName();
|
||||
$action = $request->getActionName();
|
||||
|
||||
if ($request->isXmlHttpRequest()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Zend_Registry::get('firebug')->info('PLUGIN PDF - START');
|
||||
|
||||
$layout = Zend_Layout::getMVCInstance();
|
||||
if ($layout->isEnabled()) {
|
||||
$controller = $this->_request->getControllerName();
|
||||
$action = $this->_request->getActionName();
|
||||
|
||||
$page = new Scores_Export_Print($controller, $action);
|
||||
if ($page->exportable('pdf')){
|
||||
$layout = $this->_response->getBody();
|
||||
|
@ -46,10 +46,15 @@ class Application_Controller_Plugin_Proxid extends Zend_Controller_Plugin_Abstra
|
||||
$listId[] = $id;
|
||||
}
|
||||
|
||||
/*$ws = new Scores_Ws_Client('interne', '0.6');
|
||||
$params = new stdClass();
|
||||
$ws->getIdentiteLight();*/
|
||||
|
||||
// getIdentiteLight - siren / siret
|
||||
|
||||
}
|
||||
} else {
|
||||
|
||||
// getIdentiteLight - cId
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,10 @@ class Application_Controller_Plugin_Suivi extends Zend_Controller_Plugin_Abstrac
|
||||
$controller = $request->getControllerName();
|
||||
$action = $request->getActionName();
|
||||
|
||||
if ($request->isXmlHttpRequest()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ($module != 'legal') {
|
||||
return;
|
||||
}
|
||||
|
@ -154,6 +154,6 @@ class Application_Controller_Plugin_Theme extends Zend_Controller_Plugin_Abstrac
|
||||
break;
|
||||
}
|
||||
|
||||
Zend_Registry::get('firebug')->info('PLUGIN THEME - STOP');
|
||||
Zend_Registry::get('firebug')->info('PLUGIN THEME - END');
|
||||
}
|
||||
}
|
@ -3,17 +3,22 @@ class Application_Controller_Plugin_Xml extends Zend_Controller_Plugin_Abstract
|
||||
{
|
||||
public function dispatchLoopShutdown()
|
||||
{
|
||||
$request = $this->_request;
|
||||
|
||||
$module = $request->getModuleName();
|
||||
$controller = $request->getControllerName();
|
||||
$action = $request->getActionName();
|
||||
|
||||
if ($request->isXmlHttpRequest()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Zend_Registry::get('firebug')->info('PLUGIN XML - START');
|
||||
|
||||
$layout = Zend_Layout::getMVCInstance();
|
||||
if ($layout->isEnabled()) {
|
||||
|
||||
$user = new Scores_Utilisateur();
|
||||
|
||||
$controller = $this->_request->getControllerName();
|
||||
$action = $this->_request->getActionName();
|
||||
$view = $layout->getView();
|
||||
|
||||
$page = new Scores_Export_Print($controller, $action);
|
||||
if ($page->exportable('xml') && !empty($view->exportObjet) && in_array($user->getIdClient(), array(1,147)) ) {
|
||||
$page->objectToXML($view->exportObjet, $this->_request->getParams());
|
||||
|
Loading…
Reference in New Issue
Block a user