Simplified tracking.injector.php file

Changed all PM table names to uppercase in queries (to be compliant with table names in PM DB)
Fixed a lot of CS issues
Deleted obsolete comments
Deleted config folder
Changed version to 3.1.3

Fixes #8
Fixes #13
Fixes #14
This commit is contained in:
tomolimo
2017-05-06 18:38:24 +02:00
parent 72d9aefdcf
commit a499665e77
35 changed files with 4261 additions and 6155 deletions

View File

@@ -12,24 +12,14 @@ if (!defined('GLPI_ROOT')) {
die("Can not access directly to this file");
}
//include_once dirname(__FILE__)."/../inc/asynchronousdata.class.php" ;
include_once dirname(__FILE__)."/../inc/crontaskaction.class.php" ;
if( isset($_SERVER['REQUEST_METHOD']) ) {
switch($_SERVER['REQUEST_METHOD']) {
//case 'OPTIONS' :
// header("Access-Control-Allow-Origin: *") ;
// header("Access-Control-Allow-Methods: POST");
// header("Access-Control-Allow-Headers: Content-Type");
// break ;
case 'POST' :
//header("Access-Control-Allow-Origin: *") ;
//header("Content-Type: application/json; charset=UTF-8");
$request_body = file_get_contents('php://input');
$datas = json_decode($request_body, true);
// $asyncdata = new PluginProcessmakerAsynchronousdata ;
$asyncdata = new PluginProcessmakerCrontaskaction ;
if( isset($datas['id']) && $asyncdata->getFromDB( $datas['id'] ) && $asyncdata->fields['state'] == PluginProcessmakerCrontaskaction::WAITING_DATAS ) {
$initialdatas = json_decode($asyncdata->fields['postdatas'], true);