fix #262 : archive task / waiting for a 'magic file' in any subfolder locked whole archiving

This commit is contained in:
jygaulier
2012-01-31 19:30:40 +01:00
parent 536876ac45
commit ab44742882

View File

@@ -825,7 +825,20 @@ class task_period_archive extends task_abstract
$xp = new DOMXPath($dom);
while (($file = $listFolder->read()) !== NULL)
if(($sxDotPhrasea = @simplexml_load_file($path . '/.phrasea.xml')))
{
// on gere le magicfile
if(($magicfile = trim((string) ($sxDotPhrasea->magicfile))) != '')
{
$magicmethod = strtoupper($sxDotPhrasea->magicfile['method']);
if($magicmethod == 'LOCK' && file_exists($path . '/' . $magicfile))
return;
elseif($magicmethod == 'UNLOCK' && !file_exists($path . '/' . $magicfile))
return;
}
}
while(($file = $listFolder->read()) !== NULL)
{
if ($this->isIgnoredFile($file))
continue;