mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-18 22:43:47 +01:00
LSio::import/export: set timeout according to the number of objects
This commit is contained in:
parent
0ffbf3274a
commit
573737adfd
1 changed files with 8 additions and 0 deletions
|
@ -227,6 +227,10 @@ class LSio extends LSlog_staticLoggerClass {
|
||||||
$objectsInError = array();
|
$objectsInError = array();
|
||||||
self :: log_trace("import(): objects data=".varDump($objectsData));
|
self :: log_trace("import(): objects data=".varDump($objectsData));
|
||||||
|
|
||||||
|
// Reset & increase time limit: allow one seconds by object to handle,
|
||||||
|
// with a minimum of 30 seconds
|
||||||
|
set_time_limit((count($objectsData)>30?count($objectsData):30));
|
||||||
|
|
||||||
// Browse inputed objects
|
// Browse inputed objects
|
||||||
foreach($objectsData as $objData) {
|
foreach($objectsData as $objData) {
|
||||||
$globalErrors = array();
|
$globalErrors = array();
|
||||||
|
@ -379,6 +383,10 @@ class LSio extends LSlog_staticLoggerClass {
|
||||||
}
|
}
|
||||||
self :: log_debug(count($objects)." object(s) found to export");
|
self :: log_debug(count($objects)." object(s) found to export");
|
||||||
|
|
||||||
|
// Reset & increase time limit: allow one seconds by object to handle,
|
||||||
|
// with a minimum of 30 seconds
|
||||||
|
set_time_limit((count($objects)>30?count($objects):30));
|
||||||
|
|
||||||
// Export objects using LSioFormat object
|
// Export objects using LSioFormat object
|
||||||
if (!$ioFormat -> exportObjects($objects, $stream)) {
|
if (!$ioFormat -> exportObjects($objects, $stream)) {
|
||||||
LSerror :: addErrorCode('LSio_07');
|
LSerror :: addErrorCode('LSio_07');
|
||||||
|
|
Loading…
Reference in a new issue