CMS
Version 3.9
batch_import.inc
Go to the documentation of this file.
1
<?php
2
Fakoli::using
(
"data_sync"
,
"process"
);
3
4
checkRole(
"admin"
);
5
6
if
(!
$process
)
7
{
8
// We are in a user request - spawn the background process and return the ID
9
10
$process
=
new
ProcessManager
();
11
$file
= sanitizePath(
$_SESSION
[
"data_import_file"
]);
12
chmod(
$file
, 0777);
13
14
$data_file_format =
$_SESSION
[
"data_file_format"
];
15
16
$class
=
$_SESSION
[
"data_import_class"
];
17
$import_profile_id
=
$_SESSION
[
"import_profile_id"
];
18
19
$new
= checkNumeric($_GET[
"new"
]);
20
$matching
= checkNumeric($_GET[
"matching"
]);
21
22
23
echo
$process
->run(
"/action/data_sync/batch_import?data_import_file={$file}&new={$new}&matching={$matching}&data_import_class={$class}&import_profile_id={$import_profile_id}&data_file_format={$data_file_format}"
);
24
}
25
else
26
{
27
$file
= sanitizePath($_GET[
"data_import_file"
]);
28
$class
= checkIdentifier($_GET[
"data_import_class"
]);
29
$import_profile_id
= checkNumeric($_GET[
"import_profile_id"
]);
30
$format
= checkIdentifier($_GET[
"data_file_format"
]);
31
32
$new
= checkNumeric($_GET[
"new"
]);
33
$matching
= checkNumeric($_GET[
"matching"
]);
34
35
DataSyncManager::batchImportItems
(
$class
,
$import_profile_id
,
$file
,
$matching
,
$new
,
$process
,
$format
);
36
}
37
?>
$file
$file
Definition:
delete.inc:47
$new
$new
Definition:
batch_import.inc:32
$format
$format
Definition:
batch_import.inc:30
$class
$class
Definition:
batch_import.inc:28
$matching
$matching
Definition:
batch_import.inc:33
$import_profile_id
$import_profile_id
Definition:
batch_import.inc:29
DataSyncManager\batchImportItems
static batchImportItems($class, $import_profile_id, $file, $importMatching, $importNew, $process, $format=null)
Definition:
data_sync_manager.inc:683
Fakoli\using
static using()
Import the datamodels, views and manifest for the specified component(s).
Definition:
core.inc:116
ProcessManager
Provides a central management class for event handlers and common functionality for the process compo...
Definition:
process_manager.inc:46
$_SESSION
$_SESSION["useMobile"]
Definition:
override.inc:7
$process
$process
Definition:
run.php:54
code
cms.sonjara.com
cms
components
data_sync
handlers
batch_import.inc
Generated on Tue Mar 23 2021 15:36:12 for CMS by
1.9.1