mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 09:15:15 +02:00
Refresh & delete collections Async - synchronization
This commit is contained in:
parent
a7c1c49636
commit
4db0f75763
@ -98,7 +98,9 @@ if (empty($apiPassword) === true
|
||||
&& (enterprise_hook('metaconsole_validate_origin', [get_parameter('server_auth')]) === true
|
||||
|| enterprise_hook('console_validate_origin', [get_parameter('server_auth')]) === true)
|
||||
) {
|
||||
// Allow internal direct node -> metaconsole connection.
|
||||
// Allow internal direct node -> metaconsole connection
|
||||
// or node -> own console connection.
|
||||
$config['__internal_call'] = true;
|
||||
$config['id_usuario'] = 'admin';
|
||||
// Compat.
|
||||
$config['id_user'] = 'admin';
|
||||
|
@ -55,6 +55,10 @@ class Files
|
||||
(\ZipArchive::CREATE | \ZipArchive::OVERWRITE)
|
||||
);
|
||||
|
||||
if (substr($path, (strlen($path) - 1), 1) !== '/') {
|
||||
$path .= '/';
|
||||
}
|
||||
|
||||
$rdi = new \RecursiveDirectoryIterator(
|
||||
$path
|
||||
);
|
||||
@ -70,9 +74,10 @@ class Files
|
||||
// Get real and relative
|
||||
// path for current file.
|
||||
$filePath = $file->getRealPath();
|
||||
$relativePath = substr(
|
||||
$filePath,
|
||||
(strlen($path) + 1)
|
||||
$relativePath = str_replace(
|
||||
$path,
|
||||
'',
|
||||
$filePath
|
||||
);
|
||||
|
||||
// Add current file to archive.
|
||||
@ -166,22 +171,14 @@ class Files
|
||||
$pf = $folder.$pf;
|
||||
|
||||
if (is_dir($pf) === true) {
|
||||
echo $pf.'/'."\n";
|
||||
// It's a directory.
|
||||
if (in_array($pf.'/', $exclusions) === false) {
|
||||
echo ' => borro'."\n";
|
||||
self::rmrf($pf.'/');
|
||||
} else {
|
||||
echo ' => no borro'."\n";
|
||||
}
|
||||
} else {
|
||||
echo $pf."\n";
|
||||
// It's a file.
|
||||
if (in_array($pf, $exclusions) === false) {
|
||||
echo ' => borro'."\n";
|
||||
unlink($pf);
|
||||
} else {
|
||||
echo ' => no borro'."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user