. */ /** * @brief Script called by an ajax object to process the category change during indexing (index_mlb.php) : possible services from apps or module * * @file * @author Claire Figueras * @date $date$ * @version $Revision$ * @ingroup indexing_searching_mlb */ $core = new core_tools(); $core->load_lang(); if(!isset($_REQUEST['category_id']) || empty($_REQUEST['category_id'])) { $_SESSION['error'] = _CATEGORY.' '._IS_EMPTY; echo "{status : 1, error_txt : '".addslashes($_SESSION['error'])."'}"; exit(); } $services = '['; $_SESSION['indexing_services_cat'] = array(); $_SESSION['indexing_category_id'] = $_REQUEST['category_id']; $_SESSION['category_id'] = $_REQUEST['category_id']; $doc_date = ''; if ($_SESSION['category_id'] == 'outgoing') { $doc_date = ', doc_date : "' . date('d-m-Y') . '"'; $destination = ', destination : "'.$_SESSION['user']['primaryentity']['id']. '"'; $_SESSION['indexing']['diff_list']['dest']['user'] = ''; $diffListOutgoing = array( 'user_id' => $_SESSION['user']['FirstName'], 'lastname' => $_SESSION['user']['LastName'], 'firstname' => $_SESSION['user']['FirstName'], 'entity_id' => $_SESSION['user']['entities'][0]['ENTITY_ID'], 'entity_label' => $_SESSION['user']['entities'][0]['ENTITY_LABEL'], 'visible' => 'Y', 'process_comment' => '' ); $_SESSION['indexing']['diff_list']['dest']['user'][]=$diffListOutgoing; } else { $doc_date = ''; $destination = ''; } // Module and apps services $core->execute_modules_services($_SESSION['modules_services'], 'change_category.php', 'include'); $core->execute_app_services($_SESSION['app_services'], 'change_category.php', 'include'); for($i=0;$i< count($_SESSION['indexing_services_cat']);$i++) { $services .= "{ script : '".$_SESSION['indexing_services_cat'][$i]['script']."', function_to_execute : '".$_SESSION['indexing_services_cat'][$i]['function_to_execute']."', arguments : '["; for($j=0;$j